Numbered objects with an identifier number.

Home Forums Problems and solutions in GDL Documentation elements, text handling Numbered objects with an identifier number.

This topic contains 4 replies, has 3 voices, and was last updated by  Dmitry Rogozhin 1 year ago.

  • Author
    Posts
  • #1696

    Hello.
    I need to somehow generate a script that lists one by one the same way growing furniture.
    For example put the object “table” and the script assigns the number 01; then I put another “table” (equal) and the script assigns the numer 02 …
    the script must be layered to recognize few equals “table” is, and assign a numbering increasingly as they are placed.
    This is possible?

  • #1699

    Gergely Fehér
    Keymaster

    Hi,
    There is no solution in GDL for that: an object does not know anything about previously placed objects.
    I think you should use the ID instead, which makes this increasing for you automatically, and you can check the ID from your scripts and draw that from 2d script.

    Gergely Fehér
    Team Leader, Library Team
    GRAPHISOFT SE

  • #1704

    OK,
    It is possible from the script of an object, refer to parameters or data of another object? As I make this “calling”?

    • #1705

      Gergely Fehér
      Keymaster

      No, placed objects don’t know anything about each others parameters. You’ll need to write an addon, if you would like to connect placed items.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2686

      Dmitry Rogozhin
      Participant

      You can use COMPONENT to write data from all object with some key in out string (by type, for example) and parse this data from another object.

You must be logged in to reply to this topic.