Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Mirror objects boolean in GDL

jeronimoHill
Newcomer
Hi all,

I'm relatively new in GDL and creating scripts.
I was looking for how to create a mirror parameter in existing AC library parts through GDL scripting, so the object can be mirrored with a simple click, rather than mirror the geometry manually (for instance, a sink but with the door turning the other way).
I came across commands and variables like MULX, SYMB_MIRRORED, but I can't really put together how to create a checkbox parameter to mirror the object.

Is there a simple GDL script for this?

Thanks!
1 REPLY 1

Barry Kelly
Moderator
jeronimoHill wrote:
I was looking for how to create a mirror parameter in existing AC library parts through GDL scripting, so the object can be mirrored with a simple click, rather than mirror the geometry manually (for instance, a sink but with the door turning the other way).

All objects already have a 'mirror' option - one click and the entire object is mirrored.
This sets the SYMB_MIRRORED value.
No need to do anything in GDL.

If you want to mirror the sink but not the door in a single object, then yes, you need to use MUL commands flip the part of the object in the direction you want (both 2D and 3D scripts).
Create a boolean parameter 'flip_sink'.

2D script...
IF flip_sink = 1 then
MUL2 -1,1
sink script here
DEL 1
ENDIF
3D script...
IF flip_sink = 1 then
MULx -1
sink script here
DEL 1
ENDIF

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!