CAD Link to MEP Pipe


#1

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


#2

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.


#3

Hi Tom,

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


#4

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


#5

Try this:


#6

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


#7

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.


#8

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.


#9

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.


#10

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


#11

… that takes __array could be found.

Sounds like you need to Flatten something.


#12

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


#13

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


#14

Thanks, that worked!


#15

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


#16

@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)


#17

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