Hello everyone,
I'm trying to add article numbers to a system family. I'm doing this with te same pricipal of a lookup table.
The script I wrote works fine but it only works for one element.
Is there a way I can run this script for multiple elements in a certain category?
If I use "Select multiple model elements" the script mixes up all the data.
Gelöst! Gehe zur Lösung
Gelöst von L.Maas. Gehe zur Lösung
Yes, check the nodes
After that it is a manner of matching your families with the data. This depends on how everything is structured in your project and lookup table
Instead of selecting elements you also can do something like
Louis
Please mention Revit version, especially when uploading Revit files.
Thanks for your reply.
That's what tried first. If I use this Node it mixes up all the data of all the elements.
It has to run every element separately.
Consider uploading your script, your csv and small sample of your project so that we can see how everything is structured.
Basically it is that you create two sets of data (elements in revit, elements in your csv). Then you collect those data in two lists. Then you will need to find a way to match those two lists (which Revit element belongs to which entry in the csv). This can only be figured out if we have clear understanding how both are organized and if there is a key to matching both
Louis
Please mention Revit version, especially when uploading Revit files.
I've made a sample file for you.
Thanks for helping me out.
Study this script (added). This should bring you a long way
I basically did:
-Made a "dictionary" (searchkey, value) by merging the three search keys (mat, diam, length) into a single element.
-Doing the same with the revit data.
-Doing a lookup of the search key in the dictionary, getting the matching artikelnummer
-Writing the artikelnummer back to Revit
You must finetune it for your case.
Also pay attention to "exceptions" (e.g upper/lower characters in CSV or Excel)
Louis
Please mention Revit version, especially when uploading Revit files.
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.