2024-02-06 02:54 AM
Hello,
I have a basic question about GDL objects that is also specific to a project I am working on:
How do you define the cut line Type of an object? The cut line Pen is a built-in parameter, but unlike walls, slabs, morphs, etc. there is no built-in control for the line Type. In my case I have a planar 3D object that I want to display as a dashed line in section. You can do this easily with a morph, but I can't figure out how to do it with an object. Any help is appreciated, thanks.
Solved! Go to Solution.
2024-02-06 06:44 PM
Actually I figured this out. On a lark I saved a morph plane as an object so I could study the code. And there it was—SECT_ATTRS{2}—which I looked up, and sure enough it does job with a single directive. So the 3D script for my simple reference plane object is only 4 lines of code! What took me days to figure out only took me few minutes to script. Well that's GDL for you, or at least for me who only dabbles occasionally.
In case this helps anyone else, here's the 3D script:
IF TDhide = 1 AND GLOB_VIEW_TYPE = 3 THEN END
BUILDING_MATERIAL Bmat
SECT_ATTRS{2} SYMB_SECT_PEN, SYMB_LINETYPE
RECT A, B
The first line enables a parameter to hide the object in the 3D window. The pen and line type of the object in section is set by the built-in parameters from Floor Pan and Section, but could be custom parameters just as easily.
2024-02-06 03:10 AM - edited 2024-02-06 03:11 AM
If you want to control individual lines in an object, then the line type control needs to be scripted into the object.
Otherwise you can override the line type in the 'Floor Plan and Section' settings for the object, but it will affect the entire object.
Barry.
2024-02-06 03:40 AM - edited 2024-02-06 03:47 AM
Hi Barry. Sorry, I should have been more explicit. I am looking to control the cut line type in Section, not Plan.
2024-02-06 04:10 AM
Sorry I should have read better.
There is no cut line type for objects in sections.
Cut lines are generated from the 3D model and you can only have solid lines in 3D.
If you ever see a dashed line in an object in 3D, it is a trick.
A series of short solid lines with spaces in between which has to be scripted in the object.
The only way I think you can control it is with a graphic override.
Barry.
2024-02-06 06:44 PM
Actually I figured this out. On a lark I saved a morph plane as an object so I could study the code. And there it was—SECT_ATTRS{2}—which I looked up, and sure enough it does job with a single directive. So the 3D script for my simple reference plane object is only 4 lines of code! What took me days to figure out only took me few minutes to script. Well that's GDL for you, or at least for me who only dabbles occasionally.
In case this helps anyone else, here's the 3D script:
IF TDhide = 1 AND GLOB_VIEW_TYPE = 3 THEN END
BUILDING_MATERIAL Bmat
SECT_ATTRS{2} SYMB_SECT_PEN, SYMB_LINETYPE
RECT A, B
The first line enables a parameter to hide the object in the 3D window. The pen and line type of the object in section is set by the built-in parameters from Floor Pan and Section, but could be custom parameters just as easily.
2024-02-07 02:45 AM
Thanks for that.
I have used the old version of this command for section fills in my objects.
But have not used this new (since version 21) SECT_ATTRS{2} command as I still live in the past when it comes to scripting.
I really do need to read through all of the new commands and start making use of them.
Barry.