I am trying to create a dynamo script that I can select a linked/inserted .dwg file and have it create pipes for me.
I currently have it working, however I have a couple of issues.
The first issue is if I have a dwg that has lines that join and change direction those elements are not in the list created by element.curves and curves.endpoints. It process any other lines fine.
If I explode the dwg in revit first, then select the individual elements then it will create pipes as expected (without any pipe fittings which is fine)
The issue I am having with this is when I explode the dwg within revit, all of the lines loose the z values.
From what I can see the solutions i need is to either figure out why revit is stripping the z values out when exploding the dwg, or change the dynamo script to something that might handle it better.
I am also trying to pass the level id to the python script but i need to extract just the level element id as an id, not an integer. I cant figure out how to do that either.
The python script just gets start and end xyz values and uses pipe.create to create the pipes.
Thanks in advance.
I have it working at the moment. Still need to develop it further but have a working base at the moment.
You don’t really need to explode as long as you’ve pre-isolated the curves in the CAD file. Have you tried using “Element.Geometry” instead of “Element.Curves” ?
Also you can avoid that manual conversion if you use the built in point.ToXyz(True) python method:
Paul, i cant find a pipe. create how have you made this python Script ? any help on this issue i would really appreciate
Anyone know how to do this?
Good morning to all, is there any way to have a look at the python code used for the script? I already imported all the lines and point but i really don’t know how to create the pipes and the fittings. I tried to create a macro to create only pipes from an excel file but I don’t know how to convert my macro into a python code for dynamo, it would be very appreciate if someone could share these information or the script to look inside.
I haven’t tried but you can check out this http://www.developerfusion.com/tools/convert/csharp-to-python/
if you can convert your macro to “dll” then its easy to import to dynamo http://dynamoprimer.com/10_Packages/10-5_Zero-Touch.html
see if it helps!
Using AutoLISP to write the endpoints of lines from AutoCAD to a CSV, then reading that CSV in Dynamo is another way.
This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.