Convert Selected Civil Objects to Pipe Network Structures

Could anyone point me in the right direction here? I’d like allow our Civil 3D users to select specific pipe network structures in the drawing, and then update them based on specific inputs. However, the selection node for multiple objects outputs Civil Objects, and I need to convert these selected objects to structures to work with a variety of nodes. I’m just not sure how. I’ve googled and researched, and can’t find the right method. Thanks in advance.

1 Like

There’s probably a more elegant way to do this, but this worked for me:

Document.AddNewTypes

2 Likes

@Paolo_Emilio_Serra1 - that should have been obvious to me. Thank you very much.

However, it now presents the opposite problem. Ultimately, I want to update the name of the pipes based on start and end structure, but the only way I see to rename a pipe is to go through the CivilObject.SetName node, which means I need to some how sort or filter a list of Civil Objects for the selected pipes. Is there perhaps a node that I’m missing somewhere?

1 Like

Pipes are derived from CivilObjects, so all good. You should look and understand how inheritance in object oriented programming works.

1 Like

I’ve shared a solution on similar topic on Civil 3D forum: Solved: Re: Rename Pipes to show Structure Numbers?? - Autodesk Community
Hope this helps :grinning:

1 Like