I’m looking to import a package called WombatDynamo, which is already installed. My task involves creating a Railing using the Railing.ByPathTypeAndLevel Node. The issue I’m facing is that the node requires a polycurve, but I have multiple lines or wires. Consequently, if I attempt to create a list with these two lines, I’ll encounter an error.
To solve this problem, I plan to write a Python script that takes advantage of the list containing multiple lines and creates a separate railing for each element in the list.
I’ve attached some pictures to provide a clearer understanding of the problem.
That should be a part of the code in the python block right?
This is asking for all sorts of dependency issues and code instability. For example, I don’t have wombat installed, the code wouldn’t work for me.
If I did have it installed, the path you’ve hard coded doesn’t exist on my machine.
If it did exist on my machine, I don’t know if it would fail meaningfully in all future builds (ie: Revit 2099 might not allow Wombat to load).
A better practice is to do either the Revit API and geometry conversion work natively in the Python yourself, or to use Python to build the data types needed and pass them to the node in question.
Look into the GroupCurves node in Archi-Lab, which will group all connected curves into sublists. Then use a PolyCurve.ByJoinedCurves node to make a polycurve of each group - the resulting list of polycurves can likely go directly into the Wombat node.