I’m trying to write a C# code for Civil 3D 2023 that allows me to edit the reference alignment of multiple pipes and structures within a pipe network at once. However, I’m struggling to reference the actual pipe network to manipulate the reference ID for the pipes and structures within it.
I tried using the following line of code:
PipeNetwork network = tr.GetObject(networkId, OpenMode.ForRead) as PipeNetwork;
Unfortunately, I keep getting an error stating that the type or namespace PipeNetwork
can’t be found. The error suggests that I might be missing a using directive or assembly reference. However, I’ve double-checked to ensure that all necessary using directives and assembly references are included, and they seem to work fine with other functions.
What am I missing here? How can I properly reference and manipulate the pipe network’s data to update the reference alignment for multiple pipes and structures?
1