14 Creating and Using Graphical Macros
14 Creating and Using Graphical Macros
If a device is only assigned a width, height and depth (and not a graphical macro),
a rectangular default part with the specified dimensions is automatically placed in
the drawing.
This section describes how to create a graphical macro using the EPLAN Cabinet
Graphical Editor. A Graphical Editor licence is needed.
The menus, toolbars, and Navigator change to show the Graphical Editor com-
mands and features.
File | New
In the standard sheet dialog that now opens, you can simply click [OK] to confirm
without making any changes.
Note:
The format of the drawing does not matter when creating a graphical macro.
A 2D sketch is created.
Switch to a 3D view (front or ISO view) to turn it into a 3D drawing.
Note:
An EPLAN Cabinet graphical macro is always a 3D drawing.
Example:
The following example shows how a graphical macro is created.
Note:
The geometry can be created so the graphical macro has the right orientation for
fitting in the enclosure from the outset. This is done by drawing in the right view. Al-
ternatively, the orientation can be corrected after completing the geometry (as in
this example).
Switch to 3D view
Switch to a 3D modelling view, such as from above.
This can also be done by double-clicking on the "From above" viewpoint in the
Navigator.
Coordinate system
A coordinate system is always visible in the drawing. It has three axes:
Red = X axis
Green = Y axis
Blue = Z axis
The X and Y axes determine the working plane. This is the plane that is usually u-
sed when drawing. The Z axis extends into 3D space. In the view from above, you
are looking along the Z axis.
Elements | Rectangle
Rectangle
Edit | Extrude
Extrude
Click the top surface to select it and press [Return] to finish. The coordinate system
moves to a corner of the selected surface.
The view switches to the surface that has been selected as the working plane.
Note:
The extrusion direction depends on the orientation of the Z axis. If the Z axis is cur-
rently reversed, the solid will be extruded in the opposite direction. In such cases,
specify a negative value for the extrusion distance or change the orientation of the
Z axis.
All of these parameters can be changed afterwards.
A note on detailing:
Less is most definitely more. The more detail you add to a macro drawing, the lar-
ger the drawing becomes and the more capacity is needed for the system to handle
it.
With this in mind, only add as much detail as is absolutely necessary. This has
considerable performance benefits when working with the completed macro.
Specifically, this means:
No unnecessary fillets/chamfers that are not needed for project work in
EPLAN Cabinet.
No excessive faithfulness to detail.
Use colours sparingly. Assign the right basic colour to the solid from the start.
Rotate model
Under Viewpoints in the Navigator, click "Viewing plane (on working plane)". The
view switches to the front of the monitor.
On this surface, draw a rectangle of size 200 x 160. The rectangle is 20 mm from
the top and the right edge.
Edit | Fillet
Fillet
Fillet the corners of the rectangle with radius 10 mm.
Draw circles
Elements | Circle
Circle
Note:
These elements add detail to the front of the monitor. Their purpose is only visual
and they have no functional effect.
Edit | Recess
Recess
Recess all the contours just drawn -1 mm into the front of the first solid.
Note:
The recessing direction depends on the orientation of the Z axis. If the Z axis is cur-
rently reversed, the elements will be recessed in the opposite direction. In such ca-
ses, specify a negative value for the recess depth or change the orientation of the Z
axis.
This completes the basic modelling of the monitor in the example.
Use "Rotate view" to change the view so that the front of the monitor is dis-
played isometrically.
The solid will have the selected colour when it is placed in EPLAN Cabinet.
Note:
All modelling steps can be edited at any time in the Navigator (colours, extrusion
height, recessing depth, etc.).
Edit | Add
Add
The XZ plane in the graphical macro is put on the plane of the mounting panel or
door on placement. This behaviour is fixed in EPLAN Cabinet and cannot be
changed.
When creating a graphical macro, you need to make certain that the right surface
on the graphical macro (the surface to be placed on the mounting panel or door) is
on the XZ plane.
The XZ plane cuts through the solid (as indicated by the blue and red arrows). This
is the surface where the graphical macro will be placed on the mounting panel or
door.
Problem:
The new graphical macro will be at an angle of 90 to the mounting panel or door.
Solution:
The solid must be rotated in the graphical macro drawing.
In the monitor example, a -90 rotation about the X axis is needed.
Edit | Rotate
Rotate
Select the depicted axis of rotation by holding down the [Ctrl] key and clicking the
edge.
Type -90 for the rotation angle and click the solid.
The drawing then looks like this (viewpoint: "Isometric 1 (ISO)", working plane "XY
plane [plan]":
Place the origin at one of the top corners or halfway along the top edge.
File | Save as
Logical drive
Graphical macros are stored in the directory that is specified in Parameter man-
ager - EPLAN - Data in the "Data" selection field. Default drive is the start directory
@:.
If the data drive on separate working stations is conneted to the same physical di-
rectory in your LAN, each station will access to the same graphical macros.
Subdirectory
File name
Under "File name", type a name for the macro. This name can be used in the parts
database to associate a part with a graphical macro.
In the Universal Part dialogue, type the name of the graphical macro you want to
test in the Graphical Macro box.
Click [OK]. The graphical macro is displayed at the cursor. Place the graphical
macro.