Community
Is there a way to get sheet number of the base view for the Selected Child view (Mainly for Section. Detail Views). Because the Section views, Detail views (initially they would have created on the same sheet where the parent is, then they moved to different sheets). So we place the parent view sheet number.
DrawingView object has two useful properties:
Private Sub Test() 'Get the active drawing document with an Drawing View . Dim oDrawDoc As DrawingDocument Set oDrawDoc = ThisApplication.ActiveDocument '3rd sheet with a given drawing view (e.g., section view) 'This section view was moved from the 1st sheet Dim oSheet As Sheet Set oSheet = oDrawDoc.Sheets.Item(3) 'reference to the section view Dim oView As DrawingView Set oView = oSheet.DrawingViews.Item(1) Debug.Print oView.Name 'name of the parent base view Dim oParentView As DrawingView Set oParentView = oView.ParentView Debug.Print oParentView.Name 'reference to the parent sheet Dim oParentSheet As Sheet Set oParentSheet = oParentView.Parent Debug.Print oParentSheet.Name End Sub