Replies: 1 comment
-
Hi @ninarular Identical elements can have the same part number. Therefore more than one element can be related to the part number. import element_controller as ec
import attribute_controller as ac
import cadwork
your_part_nr_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
all_identifiable_element_ids = ec.get_all_identifiable_element_ids()
part_nr_element_ids = dict()
for part_nr in your_part_nr_list:
element_ids = filter(lambda element_id: ac.get_part_number(element_id) == part_nr, all_identifiable_element_ids)
part_nr_element_ids[part_nr] = list(element_ids) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently producing a plugin to use a CSV file to replace a set of element attributes within cadwork. The csv itself only has the Item number to match to the Cadwork file, however I've found that there isn't a way to use the GUID to find the item no, unlike the assembly number. How may I find the Item No. based on the GUID alone?
Beta Was this translation helpful? Give feedback.
All reactions