The setting Type of usage that you set at macro boxes, can be used to specify which of the functionalities typical for macros (Generate macros automatically, Update macros) can be executed and which not.
Benefit:
Through the new type of usage at the macro boxes the functionalities of the macros are adapted meaningfully to the respective project type (generating in macro project, updating in schematic project). In addition the type of usage also supports you during the set-up and the structuring of nested macros.
- Not specified: Generation and updating are possible. This corresponds to the behavior in previous EPLAN versions (before Version 2.8). This entry only exists for reasons of compatibility.
- Defining: Is only taken into consideration for generating (for example for prepared macros in the macro project from which macros are to be generated).
- Referencing: Is only taken into consideration for updating (for example for macros in the schematic project that are possibly to be updated with more recent data).
- Subordinate: Neither generating nor updating are possible (for example for macros whose macro box is used as an "inner" macro box in nested macro boxes).
Differentiation of macro boxes
On the basis of the Type of usage you furthermore have the possibility to differentiate better between the prepared macros in the macro navigator.
In the tree of the macro navigator prepared macros whose macro boxes have the same type of usage are combined into one hierarchy level. The types of usage are flagged by different icons here.
Icon |
Meaning |
---|---|
|
"Not specified" or "Subordinate" macros |
|
Defining macros |
|
Referencing macros |
You can use the new property Macro: Type of usage (ID 23011) in the macro navigator as a filter criterion for the targeted display and editing of macros and display it as a column in the list view of this navigator.
In order to visually differentiate the inserted macro boxes in the graphical editor better, two further layers for macro boxes were added to the layer management:
- EPLAN326, Symbol graphic.Macro.Macro boxes (defining)
- EPLAN327, Symbol graphic.Macro.Macro boxes (referencing).
The layer already existing for macro boxes EPLAN308 is now used by default for "Not specified" or "Subordinate" macro boxes.
Changing of the type of usage
The type of usage "Defining" is preset when macro boxes are inserted in a macro project. This type of usage is stored automatically during automatic generation of the macros. In the EPLAN platform the type of usage is then automatically changed to "Referencing" during inserting into a schematic project. This means that - if the setting in the macro project is correct - the macros are generated in such a manner that they can be used directly and, if required, can be updated.
A further automatic change in the type of usage does not take place (also not when the project type is changed).
During insertion into a macro project the inserted macros by default receive the type of usage "Defining". This way you can use the inserted macros as template for further macros and for structuring new macro projects. By means of the project setting Insert macros referencing you can, however, also determine that macros with the type of usage "Referencing" are to be inserted. This setting makes sense if you have already got well-maintained macro projects and new macros only arise through inserting new macro boxes or by copying and pasting already existing macros.
Type of usage in the case of nested macro boxes
If you have activated the setting Insert macros referencing and proceed in the recommended order during the set-up of nested macros (from the inside to the outside), an adjustment of the type of usage is not required for the respective macro boxes.
To prepare nested macros, insert an already finished macro and then draw an outer macro box around it. This way the inner macro box receives the type of usage "Referencing" and the outer macro box the type of usage "Defining".
For macro boxes with an even stronger nesting the type of usage "Subordinate" is provided. Macro boxes with this type of usage are not considered during the automatic generation or update of the outer macro boxes.
Type of usage for page and 3D macros
In the page macros and 3D macros the type of usage is specified automatically depending on the project type (in macro projects "Defining", in schematic projects "Referencing").
Conversion of projects
Projects from older EPLAN versions (Version 2.7 or previous) are converted automatically when opened into the EPLAN platform. In the process the type of usage is assigned automatically: The type of usage "Defining" is assigned to the prepared macros in macro projects. Already inserted macros in old schematic projects receive the "Referencing" type of usage.
Nested macro boxes are interpreted on the basis of the graphical structure. In schematic projects, the type of usage "Subordinate" is assigned to the "inner" macro boxes. In macro projects, the outer macro boxes receive the type of usage "Defining" and the inner macro boxes the type of usage "Referencing". The macro boxes lying further inside are set to "Subordinate".
In some situations that are not clear (if, for example, the lines of the outer and the inner macro box intersect) problems with the assignment of the type of usage can arise.
Check run message
In order to verify the correct use of the type of usage at macro boxes you can use the new check run message 014006 from the message class 014 "Macros".