Home › Forums › Problems and solutions in GDL › Others › Railing Tool subtypes
Tagged: globals, global variable, SYMB_VIEW_PEN, SYMB_MIRRORED
- This topic has 4 replies, 2 voices, and was last updated 7 years, 1 month ago by Péter Baksa.
-
AuthorPosts
-
-
November 11, 2017 at 17:07 #3665James MurrayParticipant
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.
James M
-
November 11, 2017 at 22:52 #3666James MurrayParticipant
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.
James M
-
November 13, 2017 at 08:28 #3668Péter BaksaKeymaster
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
Library Platform, Software Engineer
GRAPHISOFT SE -
November 13, 2017 at 22:04 #3673James MurrayParticipant
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?
James M
-
November 15, 2017 at 08:16 #3675Péter BaksaKeymaster
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
Library Platform, Software Engineer
GRAPHISOFT SE
-
-
AuthorPosts
- The forum ‘Others’ is closed to new topics and replies.