CAD Link to MEP Pipe

I know this has been a popular topic on this site however, i can not get my python code to work properly… below is my python script…

This is my error…
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 35, in
TypeError: expected Document, got AxonometricView

Python Script

If you want to scrap the python code, you could use the MEPover package which has a wealth of nodes that will be able to suit your needs.

Here’s the node index. I’ve found it to be really useful when combined with the bimorph package.

Hi Tom,

I have tried to use this in the past but cant get it to work…

3 Likes

You pass active view, basically 3d view to input[5], while it expects document. Connect document node to IN[5], delete activeView node

Try this:

1 Like

That worked but as soon as a i do a 3D line… i get this… on the CurveElement,Curve

Warning: No function called %get_Curve on a Autodesk.DesignScript.Geometry.Line that takes __array could be found

Maybe a silly question, but what’s a 3D line? :slight_smile: Aren’t lines per definition 2D?
What are you inputting into the lines port? They can only be straight curves/lines.

Good Question… I am trying to develop a method to convert AutoCAD MEP pipe Lines to Revit Pipes… its a long story but yeah, thats what i am trying to get out of this.

Well it should work, as long as you provide the node with straight lines/curves. Pipes can’t be curved either, so that should make sense.

Tom, i have gotten the MEPower Package to work some what… would there be a reason that only certian lines would convert…

I get this warning…

Warning: No function called %get_Curve on a Autodesk.DesignScript.Geometry.Line that takes __array could be found

… that takes __array could be found.

Sounds like you need to Flatten something.

Joe, my autocad file is lines… no curves. however, dynamo is thinking different lines are curves…


The “PolyCurves” work howeve, when i bring them both into a list dynamo hangs up… see below

3 Likes

Hi @astone,
You don’t need to use CurveElement.Curve node as the mepover node allows for ‘normal’ lines. Try plugging it straight into the list create node and see if that works.

TJ

1 Like

Thanks, that worked!

Hi everybody ,Where can I find “Pipe.By Line” ?
Thanks!

@astone Is this pipes create with fittings ?
sorry, this is old topic…

@thuongnhietlanh is this lines located in Revit?
if yes , Pipe.ByLines node can do it (from MEPOver packages i think)

1 Like

And then how automatic create pipe fitting and accessory using dynamo ? Thank you !

1 Like

how to automatically create pipes with lines in a cad file in the correct size

thank you so much