Determining which tool and setting are selected

Home Forums Problems and solutions in GDL Informations from the environment Determining which tool and setting are selected

This topic contains 5 replies, has 3 voices, and was last updated by  Geoff Briggs 1 year, 9 months ago.

  • Author
    Posts
  • #2236

    Geoff Briggs
    Participant

    Hello,
    I have a marker object of the Section-Elevation subtype. Can I determine within the script if the active tool is the Section Tool vs the Elevation tool? And can I determine the status of the Marker Head in the Middle / Marker Head at the Ends setting?

    Thanks.

    Geoff Briggs
    DeForest Architects
    Seattle, USA

  • #2237

    Gergely Fehér
    Keymaster

    Linking to tools is based on subtypes only. Elements under the “Section Marker” can be used with the section tool, and elements in the “Elevation Marker” can be used with the elevation tool. Section-Elevation marker subtype is the common ancestor of them, and as in early ARCHICAD versions it was one tool the elements of this subtype appears in both of the new tools.
    To determine which of them is used, I would make 2 copies of the object, save them as different section and elevation markers and save the original item as a macro. Both of the new elements should simply call the common macro, with adding one more parameter: the information about the callers subtype

    Gergely Fehér
    Team Leader, Library Team
    GRAPHISOFT SE

  • #2238

    Geoff Briggs
    Participant

    Thanks Gergely,
    that makes perfect sense.

    Can you please help with the second part of my question regarding the Marker Head setting. I want to adjust the behavior of the script based on whether the marker head is in the middle or the ends. I have not found a request that returns the state of that setting. Thanks.

    Geoff Briggs
    DeForest Architects
    Seattle, USA

  • #2282

    Geoff Briggs
    Participant

    I still need to find out if I can determine the marker head end/middle setting and use that in my script. Thanks.

    Geoff Briggs
    DeForest Architects
    Seattle, USA

    • #2285

      Dominika Bobály
      Keymaster

      It’s not passed down to GDL in any form, so there is no way to use it as a condition in your script.

      Dominika Bobály
      Library Developer, Library Team
      GRAPHISOFT SE

  • #2286

    Geoff Briggs
    Participant

    OK, thanks.

    Geoff Briggs
    DeForest Architects
    Seattle, USA

You must be logged in to reply to this topic.