sketchucation logo sketchucation
    • Login
    ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

    Auto-incrementing ID property in a DC

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    4 Posts 3 Posters 831 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      aircooled
      last edited by

      Hi,
      I've got a dynamic component that models a modular building unit. You copy it around the model and change some of its properties to create slightly different versions of the component doing different jobs as you go. One thing I haven't been able to do is make each instance of the DC assign itself a sequential unique identifier. I am currently using a concatenation of its position to make a long number, but a 1,2,3... sequence would be preferable. Any ideas on how to do this?
      Thanks

      1 Reply Last reply Reply Quote 0
      • A Offline
        aircooled
        last edited by

        OK, so no takers on that one...
        When I export the csv file with all the components in it, I see that Sketchup has put a unique number against each one e.g. Model/Wall Panel #1 etc. This column in the CSV is called Path. Any idea if this value can be accessed as a property of the component?
        Thanks

        1 Reply Last reply Reply Quote 0
        • E Offline
          ericschimel
          last edited by

          So if I get what you are saying, you want each additional copy of a DC that you place in a model do have a consecutive number. So the first model would be 1, the second 2, and so on...

          Unfortunately, you cannot do that. DC's are only self aware, they cannot be aware of other stuff in your Sketchup models, so therefore there would be now way for them to talk to one another and do a "head count" so to speak.

          -Eric
          http://plugin.sketchthis.net
          Sketchup Kitchen Design Plugin
          Custom Models

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            An observer could check on a particular type of DC and auto-change each ones ID attribute to match some incrementing '$counter', but then it's clunkier than a DC only solution...

            TIG

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement