GLOB_​​SCALE in Parameters Script

Home Forums Problems and solutions in GDL Parameter connections GLOB_​SCALE in Parameters Script

Viewing 1 reply thread
  • Author
    Posts
    • #4119
      Phillip Bonnevie
      Participant

      Hey Everybody,

      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_SCALE the 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][1]*dimModSizes[i]*GLOB_SCALE, and then applying those values via VALUES "A" possible_A_values which 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.

      Thanks,
      Phil

    • #4131
      Gergely Fehér
      Keymaster

      Hi Phil,

      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.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

Viewing 1 reply thread
  • The forum ‘Parameter connections’ is closed to new topics and replies.