EPLAN Electric P8自动化 在C＃中创建脚本基础和实例
关注公众号,在历史文章中点击：来谈谈EPLAN API开发的一点感受 这篇付费文章来获取
Automate EPLAN Electric P8
Basics and examples for creating scripts in C #
Do you know the repetitive and monotonous tasks that require a lot of time during the configuration? There is good news. Most of these tasks can be automated by script. This book is intended for all EPLAN users and administrators who want to use scripting to speed up their workflow in order to gain more time for the main tasks, namely design.
In the beginning, you'll learn how to customize toolbars without any programming. Below you will be introduced step by step into the creation of scripts with C #. The complexity of the programming is kept low, so that even beginners can follow without prior knowledge.
The book covers the following script functions, among others:
- Create and expand menus
- Change individual or multiple settings at the same time by pressing a button
- Create user interfaces with individual controls (checkboxes, loading bars, buttons)
- Program control via user interactions and much more
- Exchange of data with external systems
- New in this edition: Debugging, creating your own classes, overloading action, action with return value
In the chapter "Interface Programming" you will learn the automated generation of labels and PDF files as well as the import / export of BOMs and project properties. In addition, you will learn how to export data to other programs using common exchange formats (CSV, XML). The chapter "Practice examples", which contains ready-to-use scripts that save you from having to write your own solutions, rounds off the content.
Extra: e-book inside
With this book I would like to give you a simple and uncomplicated introduction to the creation of scripts for EPLAN Electric P8. The book is aimed at all EPLAN users, whether they are regular or sporadic designers who want to use scripting to automate their tasks. Programming knowledge is not required. You will be amazed at how quickly a result is created that will excite you. Even with a small script, which consists of only a few lines, you can save a lot of time during the configuration. Based on the information provided in the book, you will quickly be able to use and, if necessary, extend EPLAN actions. In addition, you also learn to program your own extensions. Scripts can be used as of the EPLAN Electric P8 Compact version. The API module is not required for this.
In the script, as in the programming itself, a lot, if not everything, is possible. Therefore, the question arises to what extent this book can cover the topic. The C # language I use to create the scripts is very complex and with its description alone, you could fill several thousand pages without explaining any EPLAN function. For that reason, I limit myself to teaching the basics of C # necessary to create new scripts or extend or modify existing ones. Also on the most important extensions by own program code I enter. All EPLAN actions are described and explained using practical examples. Many of the examples will speed up your workflow. In addition, more time for the essential tasks, namely the construction remains. Everyone knows the recurring, monotonous tasks that z. B. pending completion of the project. Many evaluations and labels must be generated, in addition, the plan must be created as a PDF. All this can be done by pressing a button. As? This is explained step by step in the book.
At this point, I would like to sincerely thank everyone who helped me to write this book.
First and foremost I thank my wife Daniela for the motivation to write the book and the support to find enough time. Many thanks also to my wonderful daughters Leni & Fina for the pleasant interruptions and distractions in writing.
Many thanks to my boss, colleague and friend Michael Kastl for the freedom to write this book. It's just fun to work with you.
A special thanks to Florian Reiter, here has become a friend from a consultant. A big compliment goes to Mr. Andreas Krämer, for always very good help. Finally, I would like to thank Julia Stepp of Carl Hanser Verlag for their help and support.
Johann Weiher works as a consultant at ibKastl and looks after customers around the topic of EPLAN. In addition, he programs customized software in the enterprise sector.
He is known to the EPLAN community for his blog " Suplanus.de " on "Scripting in EPLAN".
This is the documentation for the second edition. You will find the data of the first edition here .