I was recently working on a project for a customer when I found an issue with the way Eplan P8 handles cables within PlaceHolder objects.
PlaceHolders are a nice feature of Eplan P8 that allow you to quickly change properties on a group of components in one simple operation. For example, if you want to provide part numbers for the components of a motor starter (ie the motor, the protection device, the cable(s), terminals etc), then using a PlaceHolder will allow you to switch all the parts at once with predetermined sets of values. Here’s an example:
In the above screenshot, we can identify the overload/overcurrent protection device, the cable and the motor. We can also notice the PlaceHolder object which is represented as an anchor symbol.
For regular devices, assigning a new part number through the PlaceHolder will automatically update the connection designations of the component and other peroperties such as technical characteristics. In our motor starter example, the motor leads could be identified with T1, T2, T3 for the 1HP motor, but they could be identified as U, V, W for the 10 HP motor. The assignment of a new part number will take care of renaming your connection designations in your schematics automatically, which saves a lot of typing and prevents errors.
Unfortunately, when it comes to cables, Eplan seems to lack the functionality to reassign the cable’s conductor data back to each individual conductors automatically. This includes wire cross-section and color/number. This can lead to problems down the road, as can be seen on this screen shot of the cables navigator after switching from the 1HP motor to the 2 HP motor and using a different cable part number:
In the above screenshot, we can see that the data from the part (represented as purple triangles) doesn’t match the data from the cable in the schematic (represented as blue cubes). The reason is simply that after assigning a new value set with the PlaceHolder, a different part number was assigned to the cable, and the conductor properties of the newly assigned cable part were different than the ones already in my schematic. In my case, the conductor cross-section was different, but you’d also get this situation if the color/number scheme of the conductors was different.
I’ve uploaded a short video on Youtube to better demonstrate the issue.
In such a simple case, one can easily remedy this situation by selecting the cable and going to the “Project Data > Cables > Assign Conductors > Reassign All” menu, which will cause the proper data to be transferred from the cable part to the schematic. When only one cable is involved, one could decide to manually update it after assigning a new value set, but one could easily forget this step. Also, if many cables are changed from a single PlaceHolder object, it can quickly become tedious to have to manually reassign the conductor data manually.
As always, I saw an opportunity for a custom Eplan P8 Add-In. In this case, since we have to navigate the data model of our project, we will need to use the API instead of a script.
The source code can be found on my public GitHub repository. Please view the README file for details about the code itself.
Basically, this Add-In will implement an Event Handler that will respond to the “onActionEnd.String.XMPlaceHolderAssignRecordAction” event. This event will be fired after the PlaceHolder completes assignment of all its properties, thus giving us a good hook to call our “reassign all” action automatically.
I’m releasing this API Add-In’s code as Open Source, so feel free to use/copy/modify as you wish. Of course, including my name as the original author would be welcome.