I found some sort of solution. It's not perfect mainly because I could not find a way to change the section line label. Therefore I created a rule that writes the information to the iLogic log. Just run the rule and select the "parent" drawing view.

Dim doc As DrawingDocument = ThisDoc.Document
Dim view As DrawingView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a Drawingview (with section lines ;-)")
Dim sectionViewsThatBelongToSelectedView As List(Of DrawingView) = doc.Sheets.Cast(Of Sheet).
SelectMany(Function(s) s.DrawingViews.Cast(Of DrawingView)).
Where(Function(d) TypeOf d Is SectionDrawingView).
Where(Function(d) d.ParentView Is view).
OrderBy(Function(d) d.Name).
ToList()
For Each sectionView As DrawingView In sectionViewsThatBelongToSelectedView
Dim sectionViewSheet = sectionView.Parent
Dim sheetName = sectionViewSheet.Name
Dim seperatorIndex As Integer = sheetName.LastIndexOf(":")
Dim sheetNumber = sheetName.Substring(seperatorIndex + 1, sheetName.Length - seperatorIndex - 1)
Logger.Info(String.Format("Section view '{0}' is on sheet '{1}'",
sectionView.Name, sheetNumber
))
'' Ugly hack because I can't access the section line label...
'' Uncomment the next lines if you want to try the hack!
'' Change the following text to change your label text
'Dim name As String = sectionView.Name
'Dim seperatorIndex2 As Integer = name.LastIndexOf(SectionLineLabelText)
'If (seperatorIndex2 > 0) Then
' name = name.Substring(0, seperatorIndex2)
'End If
'sectionView.Name = String.Format("{0}{1}{2}", name, SectionLineLabelText, sheetNumber)
'sectionView.Label.FormattedText = name
Next
I also found an ugly hack that allows you to show the sheet numbers on the selection lines on the parent view.

I have to warn you about what this will do. (It's so ugly that I commented out this part of the rule!) It will add the sheet number to the "section name". This will result in the image above. But usually, your section view label will look something like "<VIEW> - <VIEW>". That results in the following view label:

To counter that effect the rule will also change the "section view label" and just remove the smart stuff. That means that when you change the section name it will not update the section view label anymore (until you run the rule again). I hope the problem is clear if not I would advise you to run the uncommented lines only on none production /test documents and see what (not) happens.
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Blog: hjalte.nl - github.com