There is an advantage to living in a small city/country with a disproportionately large contingent of ADSK employees: I have great access to the development team!
In my last blog post, I pointed out how the list of values for the selected families were not in alphabetical order:
This was because the instances were sorted in order according the GUID:
Without taking the GUID into account, it was impossible to map data from excel back to the appropriate family instance. If i sorted the data in Excel, I would end up with results like this one:
Not quite hitting the mark in terms of "Data Integrity". What i needed was a way to export the data, taking the GUID into account, and then be able to map values to the right object on the return trip.
I got in touch with my friends Sharad and Ritesh at ADSK in Singapore and told them about my problem. These guys love both a challenge and customer feedback; its a match made in heaven because i am a man with problems.
Explaining my dilemma to them, they knew exactly how to solve it and we developed these 2 scripts.
THE OUTPUT:
I included the UniqueID into the index stack:
Making my excel spreadsheet look like this:
THE INPUT:
Now when i bring the data back from Excel, there is the index for my elements included. The order of the GUIDs will inherently match the order of the lists for the other data indices.
What the boys at ADSK told me about was a command ElementSelector.ByUniqueID. They made me create a code block like you see above and then plug that into SetParameterByName node. Now DYNAMO will pick my instances by name and in the correct sorted order.
And I am whole again!
The ElementSelector.ByUniqueID is a "hidden command" apparently. It was in the user menu previously, but the team took it out because they couldn't think of a scenario where it would be useful! BIMTroublemaker to the rescue!
This whole process makes me happy like ordering from the secret menu at In & Out!
In my last blog post, I pointed out how the list of values for the selected families were not in alphabetical order:
This was because the instances were sorted in order according the GUID:
Without taking the GUID into account, it was impossible to map data from excel back to the appropriate family instance. If i sorted the data in Excel, I would end up with results like this one:
Not quite hitting the mark in terms of "Data Integrity". What i needed was a way to export the data, taking the GUID into account, and then be able to map values to the right object on the return trip.
I got in touch with my friends Sharad and Ritesh at ADSK in Singapore and told them about my problem. These guys love both a challenge and customer feedback; its a match made in heaven because i am a man with problems.
Explaining my dilemma to them, they knew exactly how to solve it and we developed these 2 scripts.
THE OUTPUT:
I included the UniqueID into the index stack:
Making my excel spreadsheet look like this:
THE INPUT:
Now when i bring the data back from Excel, there is the index for my elements included. The order of the GUIDs will inherently match the order of the lists for the other data indices.
What the boys at ADSK told me about was a command ElementSelector.ByUniqueID. They made me create a code block like you see above and then plug that into SetParameterByName node. Now DYNAMO will pick my instances by name and in the correct sorted order.
And I am whole again!
The ElementSelector.ByUniqueID is a "hidden command" apparently. It was in the user menu previously, but the team took it out because they couldn't think of a scenario where it would be useful! BIMTroublemaker to the rescue!
This whole process makes me happy like ordering from the secret menu at In & Out!