Design ducts to fabrication parts

i created a dynamo to convert design ducts to fabrication services. my work flow is first duct fittings will convert to fabrication part. when I convert fittings, some ducts also converting. don’t know the reason. then I will collect all the ducts which are not converted. but when I collect the ducts, it collect the ducts which are converted too. anybody know the reason? please share the reason and remody.

duct-fitting to fab-5.dyn (92.6 KB)

fabrication sample file available @

What package are you using for the UI nodes? I downloaded Springs UI but that didn’t seem to fix the dependency.

data-shapes

This appears to be a limitation of the way that the DesignToFabrication.Convert() method actually works and there may not be a solution. In Revit, if you select a single duct fitting, it will convert the duct fitting and its connected ducts to fabrication parts.

image

Is there a reason you don’t want to collect all duct fittings and ducts together and then convert everything to fabrication parts?

the reason is when I convert duct fittings, some ducts will convert. so collection of ducts will invalid. that is why first I will convert all duct fittings. so some ducts also will convert with fittings. then I will collect the rest of the ducts. I think that also not possible. or is there a way
Is there any way to remove the invalid id from the collection?

Here’s a modified version of your graph. There are two main changes I made:


This combines ducts and duct fittings into a single list. What I haven’t tested for yet is a duct system which also has duct accessories, which may not work as well.

Then, I get both the Level (for Duct Fittings) and Reference Level (for Ducts) and combine both lists since they are mutually exclusive. This also doesn’t account for the FilteredElementCollector in your “design duct to Fabrication” node, so it’s still only returning Ducts, not Duct Fittings as well.

duct-fitting to fab-5 edit.dyn (103.7 KB)

its working. thank you.
what is that question mark stands in code block. can you explain little more

It’s shorthand for a conditional statement. It’s broken into 3 parts:

a == "" ? b : # Is input A an empty string? Use input B. Otherwise:
b == "" ? a : # Is input B an empty string? Use input A. Otherwise:
b; # Use input B

thank you very much. I will never forget you.