Home › Forums › Problems and solutions in GDL › Others › Railing Tool subtypes
Tagged: globals, global variable, SYMB_VIEW_PEN, SYMB_MIRRORED
This topic contains 4 replies, has 2 voices, and was last updated by Péter Baksa 1 year, 3 months ago.
-
AuthorPosts
-
November 11, 2017 at 17:07 #3665
What is the secret to getting an object to show up as an option in the various railing tool components? I have tried setting the subtype (to Railing Post Component, e.g.) and reloading, but the object doesn’t appear in the chooser.
-
November 11, 2017 at 22:52 #3666
Never mind, user error.
But, while we’re here, can we send a message to the stair and railing group that macros within railing (and I assume stair) part objects don’t inherit the PEN directive from the calling object. If the object or macro doesn’t have its own PEN directive, parts are drawn with pen #1, which is never right for uncut pens. And to put the directive in the macro isn’t straightforward, since these macros are in use by non-railing objects too.
-
November 13, 2017 at 08:28 #3668
Hi James,
I tried to achieve what you described, but it works for me: set the pen in the object, and the called macro will be drawn with that pen.
Could you post a code example of what isn’t working?Péter Baksa
Software Engineer, Library Team
GRAPHISOFT SE -
November 13, 2017 at 22:04 #3673
More info: I am passing a pen parameter to the macro. It seems that SYMB_VIEW_PEN does not work in this context, the global variable returns 1 and that is the pen the macro uses. When I changed to PARAMETERS useThisPen = myPen, the macro correctly used myPen. It seems some object globals don’t work within railings?
-
November 15, 2017 at 08:16 #3675
Hi,
Yes, SYMB_VIEW_PEN doesn’t work for railings and stairs, since railing objects don’t have a Symbol Line Pen setting like objects do.
The usual parameters A, B, ZZYZX, AC_show2DHotspotsIn3D, ac_toplevel, ac_bottomlevel,
gs_cont_pen, gs_fill_type, gs_fill_pen, gs_back_pen,
and most of the SYMB_… globals except SYMB_MIRRORED are irrelevant.There is a trick you can use, without rewriting the macro:
Globals are really global variables, they can be changed in script, they are passed to the macro with their current values, and don’t get reset at the beginning of the macro.
In the railing object use SYMB_VIEW_PEN =before the macro call. Péter Baksa
Software Engineer, Library Team
GRAPHISOFT SE -
AuthorPosts
You must be logged in to reply to this topic.