Vous êtes sur la page 1sur 32

Creating and using graphical macros

14 Creating and using graphical macros ................. 14-2


14.1 Graphical macros: General ..................................................... 14-2
14.1.1 Specifying a graphical macro for EPLAN Cabinet............................. 14-3
14.1.2 Graphical macro drawings in EPLAN Cabinet................................... 14-4
14.1.3 Using graphical macros in EPLAN Cabinet....................................... 14-5
14.1.4 Creating a graphical macro drawing in EPLAN Cabinet.................... 14-6
14.2 Drawing a graphical macro in the Graphical Editor ............. 14-7
14.2.1 Creating the geometry for a graphical macro.................................... 14-8
14.2.2 Adding solids in a graphical macro ................................................. 14-22
14.2.3 Specifying macro orientation in 3D space....................................... 14-23
14.2.4 Specifying the drawing origin in a graphical macro......................... 14-27
14.2.5 Saving a graphical macro................................................................ 14-29
14.2.6 Testing a graphical macro............................................................... 14-30

EPLAN Cabinet 14-1


Creating and using graphical macros
Graphical macros: General

14 Creating and using graphical macros

14.1 Graphical macros: General

A device placed in EPLAN Cabinet must be assigned the following parameters:


Height, width and depth
or
Graphical macro

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.

A graphical macro is a drawing file specified in EPLAN Cabinet. Each graphical


macro contains a single solid. The placement point is determined by the drawing o-
rigin.

14-2 EPLAN Cabinet


Creating and using graphical macros
Graphical macros: General

Graphical macros are in EPLAN Cabinet:


Provide the graphical representations of devices in an enclosure
Ensure that devices are automatically positioned at exactly the right place, for
example in doors and side panels
Make it possible to perform more accurate collision checking

14.1.1 Specifying a graphical macro for EPLAN Cabinet


In EPLAN Cabinet, devices are placed in an enclosure. The devices are not neces-
sarily specified in EPLAN Cabinet; they are specified in a schematic (e.g. in EPLAN
electric P8).
Each EPLAN Cabinet project is generally assigned a schematic project. The data
from the schematic is passed to EPLAN Cabinet. This consists of data on devices,
including parts data.
Parts are specified in the parts management database. This is where technical data
is entered.
Whether or not a graphical macro is placed is determined in the EPLAN parts
management database.

EPLAN Cabinet 14-3


Creating and using graphical macros
Graphical macros: General

14.1.2 Graphical macro drawings in EPLAN Cabinet


A graphical macro is a 3D drawing file (format *.ZEI) in EPLAN Cabinet. A graphical
macro drawing can only ever contain one solid.
The drawing is saved in a specific directory.
The name of the drawing determines the name of the graphical macro.

Cabinet graphical macro: "Makro1"


Drawing name: "Makro1.zei"

The graphical macro is saved in a specific directory: \ECDTriga4\GrafikMakros\.

14-4 EPLAN Cabinet


Creating and using graphical macros
Graphical macros: General

14.1.3 Using graphical macros in EPLAN Cabinet


Data from the schematic is passed via the EPLAN parts list to EPLAN Cabinet,
where it is automatically processed when placing devices in an enclosure.

Placing a contactor using a graphical macro

EPLAN Cabinet 14-5


Creating and using graphical macros
Graphical macros: General

14.1.4 Creating a graphical macro drawing in EPLAN


Cabinet
There are three ways to create a graphical macro

Draw a graphical macro using 3D modelling tools


You can draw a graphical macro to your own requirements by using the 3D
modelling commands in the EPLAN Cabinet Graphical Editor.

Import 3D models provided by device manufacturers


The 3D import interface can be used to import models into EPLAN Cabinet,
where they can be edited (to correct the orientation, assign an origin etc.) and
manually saved in the correct directory.

Manufacturers supply macros ready for use in EPLAN Cabinet


These can be used straight away without additional editing.

14-6 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

14.2 Drawing a graphical macro in the Graphical Editor

This section describes how to create a graphical macro using the EPLAN Cabinet
Graphical Editor. A Graphical Editor licence is needed.

Start EPLAN Cabinet.

On the menu bar:

Tools | Graphical editor

The menus, toolbars, and Navigator change to show the Graphical Editor com-
mands and features.

A graphical macro is created in the following steps:

Create the geometry or import a model


Add solids
Specify the macro's orientation in 3D space
Specify the drawing origin
Save in the graphical macros directory
Test

EPLAN Cabinet 14-7


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

14.2.1 Creating the geometry for a graphical macro


Create a new sketch.

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.

14-8 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

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).

EPLAN Cabinet 14-9


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Note: Drawing and modelling commands


The drawing and modelling commands for creating the geometry of a graphical
macro (line, extrude, punch, etc.) are not described in this document. Instructions
on their use are contained in the Graphical Editor section of the manual and in
Help.

Switch to 3D view
Switch to a 3D modelling view, such as from above.

View | Viewpoints | 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.

14-10 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Draw the basic geometry


Now draw the basic geometry for the monitor in the example.

Elements | Rectangle

Rectangle

Draw a rectangle with the dimensions 300 x 200 mm.

Extrude the base geometry to create a solid


Now choose the Extrude command.

Edit | Extrude

Extrude

Extrude the contour to a height of 30 mm.

The first solid is complete.


Switch to ISO view.

View | Viewpoints | ISO

EPLAN Cabinet 14-11


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Set the working plane


Now set the working plane on the top face of the solid.

Tools | Working plane

Click the top surface to select it and press [Return] to finish. The coordinate system
moves to a corner of the selected surface.

14-12 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Set the viewing plane to the working plane


Under Viewpoints in the Navigator, click "Viewing plane (on working plane)".

The view switches to the surface that has been selected as the working plane.

Draw a second solid


In the middle of the surface, draw another rectangle of size 260 x 160 mm.

Extrude the contour to a height of 70mm.

The second solid is complete.


Switch to ISO view.

EPLAN Cabinet 14-13


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

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.

This completes the basic modelling of the monitor in the example.


You can now add further details (fillets, drilled holes, colours, etc.).

14-14 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

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.

Completing the front


In the example, the front of the monitor will now be added together with a simplified
representation of the controls.
Rotate the model to display the monitor's front side.

View | Rotate model

Rotate model

EPLAN Cabinet 14-15


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Set the working plane to the front surface.

Under Viewpoints in the Navigator, click "Viewing plane (on working plane)". The
view switches to the front of the monitor.

14-16 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

On this surface, draw a rectangle of size 200 x 160. The rectangle is 20 mm from
the top and the right edge.

Fillet the corners

Edit | Fillet

Fillet
Fillet the corners of the rectangle with radius 10 mm.

EPLAN Cabinet 14-17


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Draw circles

Elements | Circle

Circle

Draw three circles of diameter 20 as shown.

Note:
These elements add detail to the front of the monitor. Their purpose is only visual
and they have no functional effect.

Recess circles into solid


Select the Recess command.

Edit | Recess

Recess

14-18 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

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.

Colour the surfaces


If desired, the surfaces created by recessing can now be assigned a colour.

View | Colour to surface


Press [Return] to open the colour selection and choose a colour.

EPLAN Cabinet 14-19


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Select the inside surface of the round-cornered rectangular cutout


and click it to assign it the colour.

Press Return to switch colours. Assign colours to the round cutouts.

14-20 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Change the basic colour


If desired, you can still change the basic colour of the solid. Right-click the solid
and choose Solid Attributes - Colour on the context menu.

The solid will have the selected colour when it is placed in EPLAN Cabinet.

The geometry is now complete.

EPLAN Cabinet 14-21


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

14.2.2 Adding solids in a graphical macro


Graphical macros in EPLAN Cabinet are subject to a strict rule:
A graphical macro only ever contains one solid.
There are no exceptions.
To meet this requirement, all separate solids in our example must be added to-
gether to make one solid.
The EPLAN Cabinet Navigator lists the solids in a drawing under "Drawing ele-
ments".

Note:
All modelling steps can be edited at any time in the Navigator (colours, extrusion
height, recessing depth, etc.).

Add the different solids to make a single solid:

Edit | Add

Add

Drag and drop in the Navigator

14-22 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

14.2.3 Specifying macro orientation in 3D space


The orientation of the solid in the graphical macro drawing affects how it is placed
on mounting panels, doors or other planes.
The next step is to specify the orientation.
In the graphical macro drawing, the placement plane on the mounting panel or door
is always determined by the X and Z axes. This must be allowed for by matching
the placement orientation to the orientation of the axes.

EPLAN Cabinet 14-23


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

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.

Checking the orientation


To check the orientation of the graphical macro:
In the Navigator, double-click the viewpoint "Isometric 1".
Again in the Navigator, double-click the working plane "XY plane [plan]".

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.

14-24 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

In the picture below, this surface is shown on a 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.

EPLAN Cabinet 14-25


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Choose the "Rotate" command.

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]":

The graphical macro now has the correct orientation.

14-26 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

14.2.4 Specifying the drawing origin in a graphical macro


The origin of the graphical macro drawing determines the append point on place-
ment.
The graphical macro is attached to the mouse cursor at this point during place-
ment.
When inserting a graphical macro into a drawing, you will usually specify a point on
the mounting panel where the graphical macro is to be placed. The graphical mac-
ro will then be inserted on the mounting panel with its drawing origin at this point.
The situation can be different when placing a graphical macro in rather than on a
door. The origin must be specified accordingly in the graphical macro drawing.
The origin therefore depends on where the graphical macro will later be used.
In the monitor example, specify the origin as follows:
First, change the current working plane to the surface containing the origin. If nec-
essary, use "Tools | Working plane" to do so.

Specifying the origin

Elements | Drawing origin


Use the "point search" feature to select the origin (click the point and hold down the
mouse button for about two seconds).
In the monitor example, the origin should be on the surface shown below so that
the monitor is always placed at the right depth in the door.

EPLAN Cabinet 14-27


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Place the origin at one of the top corners or halfway along the top edge.

Press [Return] to confirm.

14-28 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

14.2.5 Saving a graphical macro


A graphical macro drawing must be saved in a specific directory before EPLAN
Cabinet can use it as a graphical macro.
To save a graphical macro:

On the menu bar:

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

Graphical macros are located in the "ECDTriga4\Grafikmakros" subdirectory in


the logical drive preselected. From this directory the graphical macros are also
called for placement.
You can create subdirectories under @:ECDTriga4\Grafikmakros. Even though this
is allowed, still make sure that no two graphical macros have the same name. Two
or more graphical macros with the same name but in different directories can cau-
se problems.
Always choose a unique name.

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.

EPLAN Cabinet 14-29


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

14.2.6 Testing a graphical macro


After creating and saving a graphical macro, it is advisable to test it in a drawing.
The easiest way to do this is by placing the graphical macro in an EPLAN Cabinet
project as an image using "Parts | Universal part".

Close the graphical macro drawing.


Close the Graphical Editor.
Open an EPLAN Cabinet project.
Exclusively activate the outside of the door.

Choose the "Universal part" command.

Parts | Universal part

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.

14-30 EPLAN Cabinet


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

Check the insertion depth, preferably in a side view.

EPLAN Cabinet 14-31


Creating and using graphical macros
Drawing a graphical macro in the Graphical Editor

14-32 EPLAN Cabinet

Vous aimerez peut-être aussi