Disassemble assembly

Hello all,
I try to make a script that let me to disassemble assembly based on it’s naming category. The script work well with the exception of the fact that it does not display proper name according to naming category as you can see below. It’s something that i miss?

Hi @nedelea.rares try something here could probably work…

Thank for your response sovitek.
Your script works to me up to the point it needs to disassemble the selected assemblies, the Assembly.Disassemble nod output null. It is nice that i can see assemblies by their name but i looking more to be able to disassemble all wall assemblies at once and let the rest intact, that’s way i use naming category parameter to filter after. Could a.name replace with something that do what i say previously?

1 Like

OK try show an image with your graph with all nodes expanded

Here it is

thanks remember connect getatindex to your elements…

That solved the disassemble part. Now what i want is to have something like in image below

not sure is that the categori of your assembly members ? but i guess it will be an issue becourse then you can have duplicate same names ?? and what in that case an assembly have many categories member…

PS now it seems you use listview and not treeview…probably it could work with listview

what you see in the image in my previously post is the Naming Category found on assembly properties. This will allow me to select all assemblies of a type (walls, structural column, structural framing etc.) to disassemble all at once. what you see in my previously post is done using Listview Data node with showid set on false witch make the script fail because there are more than one element with same name.

yeps thats what i mean

So you say that will not be possible?

you could probably give them a number or go with show id in the ui…something here maybe

Thank very much sovitek
Your solution work well, only drawback is that i have to select manually all assembly from one category

do you mean something here ?

Yes, something like this. But this way the script will only disassemble only one assemble. Maby every category to be a separate list that contain elements separate? Something like in my first post but with a name that will alow me to distinguish them.

you wanna do it with treeview again?

That’s what I’m looking for. Mine keep displaying what All Elements of Category nod output only grouped by Naming Category parameter.

here is a way with listview…

show your graph for the other issue…try group them as here…

and treeview as you see we need some unique more than wall…so here just give it the assembly id and use thate for search

It’s seams that GetItemAtIndex node doesn’t work for some reason. It’s throwing an index out of range error.

Try connect to your groupbykey…