Increment an integer parameter with object placement

Home Forums Problems and solutions in GDL Parameter connections Increment an integer parameter with object placement

This topic contains 2 replies, has 2 voices, and was last updated by  James Murray 2 weeks ago.

  • Author
    Posts
  • #18508

    James Murray
    Participant

    I would like to have an object with an integer parameter that is saved at 1, so that when the object is placed, the instance has the value 1, and then the next instance has the value 2, etc. Is this possible?

    James M

  • #18509

    Péter Baksa
    Participant

    Not really, the library isn’t designed to allow communication between objects.
    There maybe a hackish solution using the text I/O addon, but that wouldn’t handle delete, undo/redo and copy/paste workflows.

    After placement ArchiCAD will auto-increment the ID of the next element in the infobox if it ends with a digit.

    You can use GLOB_INTGUID if you don’t need to count the objects, just a distinct ID.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • #18510

    James Murray
    Participant

    Thanks, Peter, that might actually do it in this case.

    James M

You must be logged in to reply to this topic.