I need to convert pressure pipes to AutoCad 2D objects (in XY plane).
I use Civil3DToolkit LineExtensions.ByGeomety to obtain Lines from straight pipes.
I use Civil3DToolkit Arc.ByGeometry to obtain Arcs from curved pipes.
I want to do that with a code block but, I am doing something wrong. No arcs are created !!!
I don’t exactly know what is wrong with your code block. However, you could perhaps try to solve the error quite easily by writing your arc creating out in normal nodes and then do node to code, then check what the differences are.
Also, you don’t really need an imperative statement here, you just need a simple Code Block if-statement, something like this:
1- Usig Nodes. This was my first try. Problem: Arcs of length zero and center point at 0,0,0 are created (one for each Null in the arcs list). Maybe an AutoCad.Arc.ByGeometry node issue???
Then I tried to make a DesignScript node whit some conditional statement and for loop to filter the objects that will then pass through the Arc.ByGeometry node
2 -Using Code Block in Imperative Mode but no arcs was created!!!
3- Using Code Block node in Associative Mode (as you suggest). But the same problem of point 1 occurs (length zero arcs are created)!!!