Changing Load Classifications (Bulk)

So I have many families (Electrical) that have connector elements with a load classification. Some of these have rouge load classifications. The only way to currently change them is to open each family change it to the correct one, delete the bad one and load back in. It’s not so bad, if you have say 5. What about 50 or 100. Dynamo, right! Sort of. The connector element in the family is super hard to get to. I got that part. I was even able to test and find the rouge Load Classification (MELISSA for testing!) But when I use Element.SetParamameterByName I get this silly read only value. Is there another package that i should be looking at? Any help on this one would super awesome because i am super stuck.

This should help clear out anything which isn’t in use in a bit shorter order than usual. you’ll have to hit cancel on the warnings which pop up (33 in the file I tested).

I wrote up some specifics around the use of the function that leverages the transactions (36 attempts got me 27 hits in my undo history) as that’s a bit ‘old school’ as list levels and lacing will prevent the need for nodes like List.Map and Function.Compose in most cases.

Remove Unused Load Classifications.dyn (32.4 KB)

As far as ‘how to remove the last 9’ which I couldn’t clean out? First purge unused content, then editing the family types (select those named in the error messages via the project browser and pop open the properties dialog), then editing the instances (right click in the project browser and use select all instances), and then perhaps editing the circuits too (I don’t know electrical well so that may be beyond my skill set), save (may need to close the document and reopen it - I’m not sure how to force a refresh on what’s in use) and finally try running the graph again or manually deleting the load classification with the UI.

You might be able to automate those additional steps if you’re persistent enough. To set the values I suspect you need to use the load classification element (or perhaps it’s ID) rather than a string.

1 Like