Identifying Pipe/Structure Labels in Profile/Section View
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been in the process of making a small plugin that labels pipe/pressure networks in section/profile/plan views with their choice of label per network. I was able to get a pretty well functioning program running for pressure networks and avoiding duplicate labels for multiple parts in section views due to the PressurePipeSectionLabel.GetAvailableLabelIds method turning the pipe/fitting/appurtenance IDs to associate the label with a part and view to avoid duplication.
Unfortunately, when we look at the PipeSectionLabel.GetAvailableLabelIds method, it only will only return the SectionViewID for the pipe/structure labels. Seems like they just improved the newer API and didn't really backtrack to pipe networks for something like this. Looks like all of the label methods/properties for pipes and structures are missing this in general. I know it's a weird mix of them being pipes/structures and 'parts' so I've been looking through all of those as well but nothing to really get the pipe or structure ID for them.
Is there any way that the pipe or structure section label can be linked to a part that I'm missing here? I see in the label creation method there's a section for the partIndex of the SectionPipeNetwork which is how I assume it associates the label to the sections pipe network part but I can't find any way to access it outside of the label creation method? I know there's also Part.SectionViewPartId but I'm gonna go ahead and guess that returns the ObjectID of the SectionPipeNetwork.
Any insight would be great! If anything, it'll just be a warning that the labeler should only be run when there are no labels for the pipes and structures to avoid duplicates.