Is there a way to get the ProfileBandLabelGroup labels from a profile view. I see I can get the ProfileViewBandItems, but don't see a way to convert it into the labels. I'm looking to override the text components. The code below does that, it's just getting the object without having to have the user select it.
ProfileBandLabelGroup labels = ssResult.ObjectId.GetObject(OpenMode.ForWrite) as ProfileBandLabelGroup;
LabelStyleTextComponent textComponent = labels.GetAt(0).GetTextComponentIds().GetObject
Solved! Go to Solution.
I would be interested to know if you can get access to the profile band labels for pipes to override the labels in the following situation. We have use bands labels for all pipe work mostly except when we encounter what we call a drop manhole where one pipe entries the manhole at say 1m below lid level and the pipe going out leaves at say 2m.
Currently the bands labels for sturctures and pipes do not really know much about each other i.e
The sturcture label knows the depth to the invert of the structure typicallly the out going pipe invert as well but nothing about the other pipe inverts.
and a pipes knows its invert at each end but not the structure lid level just ground level at each end which on sloping ground can change from one side of the structure to the other.
Hence you can not label in the bands the correct depth to invert from the structure lid level to the pipe invert.
Maybe it is possible in code to override the labels with the appropriate values.
It is possible. I'm having a bit of a problem finding out where I am in the world in the labels.
The first problem I'm having is getting the correct band. I can get the band by going through each of the BandItems, from the BandSetItems collection and then using that to get the location of where the label group for the band should be at. The collection appears to be ordered by when the band was added. If someone goes back in and rearainges them then the Band item and the label have different places in the collection.
The next problem is getting what in the world the label is labeling. I haven't been able to figure that out yet. I'm doing a profile data, so I'm assuming that every PVI shows up in the band. I think you'd have to get the collection of structures in the profile view and then make sure you are changing the correct label. I'm a bit confused on how my code works, so I'll probably not post the code currently. Hopefully someone is able to answer my other post to help provide some clarity on it.