Use Properties from Property Manager

Home Forums Problems and solutions in GDL Lists and schedules Use Properties from Property Manager

Viewing 7 reply threads
  • Author
    Posts
    • #2826
      John Peterson
      Participant

      I have previously created objects with custom parameters to use in schedules. I wish to exploit the new Excel round trip function of schedules. We often have consultants fill in things like electrical fixture schedules. To use the Excel round trip, I have to use Properties from the new Property Manager. I wish to read a property and then place it with the drawing symbol (or transfer to a parameter). For example, “Security Rating” from the “Openings” group. I thought the REQUEST (“Property_Name”, “id”, typeName, groupName, propertyName) would get me what I want, but it is poorly documented and when I finally got it working in the 2d script without errors, all I got was a 0 instead of the text that was in that property name for that object. Properties are great, but need some tools to use them.

      Many thanks, JP

    • #2832
      Gergely Fehér
      Keymaster

      Requests about properties only work with labels – as it is written in the documentation. (And zone stamps as they are working like labels). Properties should not take any effect on the 2d display (and 3d model) of any objects – except the visual override option outside GDL.
      Everything which changes the symbol or model must be the library parts parameter – properties are just additional things attached to the element to store information about the library part.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2888
      Joachim Sühlo
      Participant

      How do I set up the script to use the Property Name as Value for a VALUES command in the new REQUEST (“Properties_Of_Parent) command (for a door marker)?
      Following does not work:

      DIM _sTnCParamData[][5], _auswahl[], _parentProperties[]
      FOR i = 1 TO 5
      	_sTnCParamData[1][i] = ""
      NEXT i
      
      PROPERTY_FOLDER		= 1			! NEW: GROUP
      PROPERTY_ID			= 2			! NEW: ID
      PROPERTY_NAME		= 3			! NEW: NAME
      PROPERTY_VALUE		= 4			! NEW: VALUE
      PROPERTY_TYPE		= 5			! BRAND NEW TYPE
      
      n = REQUEST ("Properties_Of_Parent", "", _parentProperties)
      _numProperties = vardim1(_parentProperties) / 4
      _sumParamNum = 1
      
      for i = 1 to _numProperties
      	_sTnCParamData[_sumParamNum][PROPERTY_FOLDER] = _parentProperties[4 * (i - 1) + 3]
      	_sTnCParamData[_sumParamNum][PROPERTY_ID]   = _parentProperties[4 * (i - 1) + 1]
      	_sTnCParamData[_sumParamNum][PROPERTY_NAME] = _parentProperties[4 * (i - 1) + 4]
      	_sTnCParamData[_sumParamNum][PROPERTY_VALUE] = ""
      	_sTnCParamData[_sumParamNum][PROPERTY_TYPE] = _parentProperties[4 * (i - 1) + 2]
      	_auswahl[_sumParamNum]			= _sTnCParamData[_sumParamNum][PROPERTY_NAME]
      	_sumParamNum = _sumParamNum + 1	
      next i
      
      VALUES "text_auswahl" _sTnCParamData

      GDL Object Developer
      b-prisma
      MAC OSx 10.14

    • #2889
      Gergely Fehér
      Keymaster

      This request can not be used in parameter script, check it in the documentation please: “Expression returns 0 and contains dummy return values (emtpy string or 0) if used in parameter script, causing additional warning.”

      Instead of this, you can use it in the ui script, and use the returned values in a custom popup infield, as it is written here: https://gdl.graphisoft.com/tips-and-tricks/display-properties-with-labels/

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2893
      John Peterson
      Participant

      Thanks for the posts with help. I am basically trying to make a label placed with the object. The label is an identifier for the schedule. For example, a recessed light fixture with the label R1, R2 etcetera. Using a property allows the use of Excel round trip and the consultant can change the fixture identifier as required, and I would hope that could then update the label on the drawing. I was trying to read the value and then pace it with the text command in the 2d Script. I’ll read through your posts closer to use your suggestions. It doesn’t matter, but I don’t understand why Graphisoft had to place this restriction in the code. I’m sure it causes problems someplace.

      Many thanks, JP

      • #2894
        Gergely Fehér
        Keymaster

        Enabling these request in parameter scripts would cause problems: if you can reach properties in parameter script, then you can store them as parameter values. After placing an object and storing it’s parameters, you can easily change the properties – so the stored information will be outdated and can cause problems in lists and schedules, as there is no way to force parameter script run on all placed library parts in a whole project. Running all instances parameter script would be extremely slow in huge project and could affect the model appearance, which means a problem in background processing. And, if there would be a function to do that, you can’t do that in teamwork without reserving all library parts to make changes on their parameters…

        Gergely Fehér
        Team Leader, Library Team
        GRAPHISOFT SE

    • #2899
      John Peterson
      Participant

      Thank you. That makes sense to some extent. If you consider that currently you can have a schedule that has a connection to an objects parameters and has 2-way communication. Changes to the object effect the parameters, and object display. These values are then passed to the schedule and vice versa. The property is just a new player in the two way communication world. I just need to get a label of the property value onto the drawing next to the object. This label should be able to be updated in the object or the schedule and be updated on the drawing output. So all I was trying to do was to read the property value, and place it on the drawing with the text2 command. Seems like a simple request. Now I have to read the property value and then transfer it and then figure out how to place it. Still seems needlessly complicated, but I defer to the wisdom of the programmers who probably tried to make it work more directly and found the problem with that.

      Many thanks, JP

    • #2924
      Ben Cohen
      Participant

      Instead of this, you can use it in the ui script, and use the returned values in a custom popup infield, as it is written here: https://gdl.graphisoft.com/tips-and-tricks/display-properties-with-labels/

      Great tip!!thanks Gergely 🙂

    • #3266
      James Murray
      Participant

      In the case of an Option Set property that allows multiple choices, is there a way to offer the user the options that are in use by the element, so they can choose which option the label displays?

      James M

      • #3267
        Gergely Fehér
        Keymaster

        James,

        Values should not be stored in parameter, as they can be changed without touching the object – so keeping the rules I think there is no real solution for that.

        Gergely Fehér
        Team Leader, Library Team
        GRAPHISOFT SE

Viewing 7 reply threads
  • The forum ‘Lists and schedules’ is closed to new topics and replies.