June 20, 2018 at 15:13 #4119
I have coded a custom 2D library part for our office that we have been using since ArchiCAD version 8. It’s a Drawing title that we place in “model space” that sizes itself appropriately based on scale to the module on our layouts. In the past the user had to type in the number of modules wide & high (i.e. 1.5, 2), but later I revised it to use moveable hotspots to allow this adjustment to be graphical. Unfortunately, due to the way I was modifying the drawn element via
MUL2 GLOB_SCALE, GLOB_SCALEthe moveable hotspot stretching would result in inflated results based on the drawing scale, but at least the pop up input field made the process quicker.
A month ago I decided to fix this and looked at the GDL of Metal Web Joist 19 from the Archicad 19 library as I wanted to mimic the way it handled the height of the element via moveable hotspot in elevation. The solution was elegant and involved populating an array with all the possible values of my module via a loop
possible_A_values[i] = dimUnitSizes[shtsize]*dimModSizes[i]*GLOB_SCALE, and then applying those values via
VALUES "A" possible_A_valueswhich is only possible in the parameter script. So I got this working in 19 (we still have a few jobs in 19, so I created in 19 for compatibility) and it worked fine, just threw a warning about using GLOB_SCALE in the parameters script. Then I went and tested in ArchiCAD 21 and it was completely broken as ArchiCAD 21 no longer allows GLOB_SCALE in the parameters script. I understand why, as a 3D object could be seen in may views at many different simultaneous scales. But this is a 2D element that only appears in the individual views that it is place in.
TLDR; how can I get the results of GLOB_SCALE in the 2D script back to the Parameters script?
P.S. I’d also like the results of GLOB_VIEW_TYPE to be available in the parameter script as that would dictate or filter which parameters are presented to user as well as some default values.
June 26, 2018 at 06:50 #4131
GLOB_SCALE and GLOB_VIEW_TYPE can not be used in parameter script. Parameters of any object must not depend on the view, as they can appear on many different views with different scales, and enabling dependencies on those 2 globals would cause inconsistent behaviour and parameter settings on placed instances.
Team Leader, Library Team
You must be logged in to reply to this topic.