GDL
About building parametric objects with GDL.

Custom Outlet Object - Turn 2d plan symbol on and off

gdford
Advisor

I have made a custom outlet object and I have modified the objects 2D settings to show a custom 2D symbol. Can anyone tell me how hard it would be to be able to add enough GDL code to be able to turn the plan symbol on and off via with a check box in the objects settings?

gdford_2-1654291914021.png

 

 

gdford_1-1654291896561.png

 

 

Gary Ford
Self Employed - Modeling, Estimating, Construction
Archicad 12-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000
2 REPLIES 2

The answer depends on how you created the 2D representation, but either way it is simple to achieve.

 

If you created your 2D symbol by adding 2D elements into the objects "2D Symbol" window then you will have to wait for someone else to respond as I don't use this method. From memory each element has a "Layer" from 1 to 16 and then you can nominate which layers are on and off when you use the FRAGMENT2 command.

 

If you scripted the symbol in the "2D Script" (this would also work if using FRAGMENT2) then you simply create the boolean parameter (eg. "bSymbol2D") to turn the symbol on and off and then in 2D script you use this parameter in an "IF" statement.

 

eg.

if bSymbol2D then

        "......... 2D symbol script..........."

endif

Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
DGSketcher
Legend

@gdford Just watch if you have no 2D representation as you may loose track of small 3D objects and need Find & Select to locate it. 

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)