Parmameter handover

Home Forums General discussions Parmameter handover

Viewing 6 reply threads
  • Author
    Posts
    • #3212
      René Ande
      Participant

      Hi there
      I want to do two things:
      a) read-out the parameters of an object and
      b) hand it over to the user-interface as well as the 3D-script

      The basis was the “Property Label Example AC20.gsm” which I copied to a new element. I added in the masterscript the following comandline:
      n = REQUEST (“Property_Name”, myProperty, _typeName, _groupName, _propertyName)
      test01 = _propertyName
      from that point I could handover the parameter _propertyName to the user-interface as well as the 2D-script. Unfortunatelly the string was always empty when handovered to the 3D-script.
      text 0.001,0 ,test01 -> did not work

      a) how can I easily search in the myProperty array after a certain value, for example “Schloss”
      b) how can I handover the string to the 3D-script

      Thanks in advance

      René

    • #3214
      Gergely Fehér
      Keymaster

      “Property_Name” request is designed for labels: it works in UI and 2d scripts.
      Searching in an array:
      myValueIdx = 0
      for ii = 1 to vardim1(myArray)
      if myArray[ii] = “mySearchValue” then
      myValueIdx = ii
      ii = vardim1(myArray) !break
      endif
      next ii

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #3215
      René Ande
      Participant

      Ok, the other way round, is it possible to read out a variable into an excel which I set in an ui_infield?

      Thanks René

    • #3216
      Gergely Fehér
      Keymaster

      Sorry, I simply don’t understand what do you want. With this request you can get the property’s name, group and type – in 2d script or UI. You should not store or export this to anywhere, as it becomes outdated at the moment you store it…

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #3217
      René Ande
      Participant

      For production we have to generate an visual picture and a partslists.
      The idea is to draw an object depending on the user input. e.g. if tick01 is set draw a block / if tick02 is set make a hole in this block.
      After this export the booleans of tick01 and tick02 so I know that in object a) there is only a block, in object b) there is a block and a hole.

      userinterface
      ui_infield{3} “tick01”, 15, 210, 180, 19,
      7, “”,
      0, 0,
      0, 0, 0, 0,
      “”, there's no block, 0,
      “”, there's a block, 1
      (same for tick02)

      in 3D-shape
      if tick01 then
      block 1,1,1
      endif

      (same for hole)

      -> and now here to read-out the variable tick01 and tick02

    • #3218
      Péter Baksa
      Keymaster

      Hi René,

      If you need to export the parameters outside ArchiCAD, use Schedules.
      You can add library part parameters to the schedule using Scheme Settings dialog / Add Fields / Library Part Parameters. In the next dialog Select Object by: Folder View (used Objects only), then select the library part you need, and add it’s parameters to the list.
      After configuring the schedule, create a view from it, and add that to a publisher set. Finally select XLS format.
      It’s a long way to set up first time, but only a click to refresh the XLS after that.

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

    • #3221
      René Ande
      Participant

      Hi there

      Took me some time to do but now it works, thanks.
      If I could place a wish for Version 22, why don’t you expand the REQUEST command to the 3D script?

      Greetings René

Viewing 6 reply threads
  • The forum ‘General discussions’ is closed to new topics and replies.