The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about GDL - Doors/Windows/Objects/Stairs etc. (Example: I created an object that prints an error message in 3D all the time, please help!)

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, gkmethy, Gergely Feher

By Luiscardoso
#308919
Hey guys,

I draw a lot in the 2d symbol putting things in different layers and using code like

IF layer1=1 THEN
FRAGMENT2 1,0
ENDIF

for every layer so I can turn things on and off.

The problem is the values of A and B don’t adjust automatically. I activated the “FIT size to 2D symbol” and the “create a bounding box”(compatibility options).

in layer 1 there is a box of 100 X 200
in layer 2 there is a box of 300 X 800

Archicad makes a perfect bounding box depending on the layer but the values of A and B are entire layers limits so they end up being always A=300 B=800.

Any code that i can make the A and B values= bounding box?

Thanks in advance
Luis
Attachments
Screenshot (86).png
User avatar
By Barry Kelly
#308929
As well as changing the fragment for each different layer, you will also need ti rest the A & B values.

Maybe something like …

in the 2D script...
Code: Select all
IF layer1=1 THEN
FRAGMENT2 1,0
ENDIF

IF layer1=21 THEN
FRAGMENT2 2,0
ENDIF
In the parameter script …
Code: Select all
IF layer1=1 THEN
A= 0.100
B=0.-200
PARAMETERS A=A, B=B
ENDIF

IF layer1=21 THEN
A= 0.300
B=0.-800
PARAMETERS A=A, B=B
ENDIF


Barry.
By Luiscardoso
#309071
Hi Barry,

Thanks a lot for replying.

Ok, I though there was a way the program would do it automatically. ok then i will do it as you say.

Thanks

Luis