Auto-incrementing ID property in a DC
-
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 -
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 -
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.
-
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...
Advertisement