Export 2Dpolylines to 3Dpolylines and select them

We have a project where we need to export existing 2D polylines to 3D polylines, I have fixed that part.
After that I would like to copy the property set that existed on 2D polylines to 3D polylines. Not sure if it’s possible, but where I hit the first wall is that I need to reach the 3D polylines and it seems impossible. Could it be that is because of this when the objects is created in the script then I can’t select them within the same script?

2D_3DPolyline.dwg (561.1 KB)

Haven’t experienced this on the Civil 3D side, but it could be a transaction issue… does it work if you run the graph to generate the 3D polylines, then run a second graph to apply the property set does it work?

(PS: List.RemoveIfNot might help simplify selecting just polylines).

1 Like

Yes, that might fix it. I have had it in my mind but as always I want the user to just press one button, but maybe it would be better to use the player and a flow…
1 Export to 3D poly
2. Copy Property set
3. …
Will investigate “List.RemoveIfNot” :slight_smile: Thanks

@jacob.small seems to be that I need to use a new graph to AddPropertySets
“List.RemoveIfNot”not worked as it supposed to do but List.FilterByBoolMask seems to deliver.
After that I could copy the properties and the property sets from 2D in to 3D polylines

@zachri.jensen any idea if we have nodes for controlling the AutoCAD transaction? Something akin to the Transaction.End and Transaction.Start nodes in Revit?

1 Like

The short answer is no, but I think that might overcomplicate things. The issue here is that sending commands to the command line is asynchronous, so you have no way of guaranteeing that the new 3D Polylines are created before you try to select them. Is there a way you could use Dynamo to create the 3D Polylines instead of using ConvertPlines? Should just be a matter of deciding how you want to tesselate arc segments. Then you could control the order of operations, and there would be no need for selection.

2 Likes

I think it is not possible to select objects from Civil 3D while the whole graph runs within one transaction. Maybe Python works differently, there you can commit a transaction but not in the ZT nodes.

But you can add data to created polylines, therefore you must use the output of the nodes and not a selection in Civil 3D.

For example:

This selects all polylines, and it creates 3D polylines from it with a few nodes from the Arkance Systems Node Library. If you want to change the 3D component, some modifications must be applied to the vertices of course.

Further the Property Sets are read from the 2D polylines and added to the output of the 3D polylines.

The values are empty in the 3D polylines with this example.

image

You need to extend it with reading the values from the 2D polylines and add it to the objects from the last node. But that is not very complicated, now you have the structure finished.

2 Likes

@zachri.jensen and @Anton_Huizinga thank you for your time.
True, it’s worth to try if I can combine two graphs in one.
After that next project will be to rotate all objects that have the same property value along a surface based on surface elevation and station/offset along alignment

Yepp, thanks to you I could streamline it down to one graph instead of two and I create 3Dpolylines and copy/add property and property sets from 2D to 3D polylines :slight_smile:
A little bit smaller graph than before

2 Likes

@patrick.ericson, question: Have you managed to get the 3Dpolys selected? Does the Camber Object.Select node not work in this case?

Yes it does work. The issue where to have the sequence correct.
I left this graph because we got an update of a Addin so now our designers can deliver the 3Dpolyline with added property sets.
For the moment I use Object.Select to select my object and then run the command Rotate3D from commandline.

1 Like