Hello.
I've got a drawing wirh a flatt pattern view. I want to get the outline of the BoundaryBox of the flatt plattern view.
For this i thought i can use the Method GetSMBoundaryBoxDisplayData but this method doesn't return any data.
I use this code with a selected flatt patternview. (boundaryBox is not set visible)
Dim swApp As sldworks.SldWorks = CType(GetObject(, "SldWorks.Application"), sldworks.SldWorks)
Dim swView As sldworks.View
Dim swSelectionManager As sldworks.SelectionMgr
Dim swDoc As sldworks.ModelDoc2
Dim swDrawing As sldworks.DrawingDoc
swDoc = swApp.ActiveDoc
'Get the selectionmanager for the document
swSelectionManager = swDoc.ISelectionManager
'Get the selected view
swView = swSelectionManager.GetSelectedObject6(1, 0)
If swView Is Nothing Then
Exit Sub
End If
Dim dimensions As sldworks.IDisplayData
swDrawing = swDoc
swDrawing.ActivateView(swView.Name)
Dim line1
swView = swDrawing.ActiveDrawingView
dimensions = swView.GetSMBoundaryBoxDisplayData()
Dim linecount As Integer = dimensions.GetLineCount
Dim x As Integer
For i = 0 To dimensions.GetLineCount
line1 = dimensions.IGetLineAtIndex3(i)
Next i
The code findes 9 lines. But the data of each line is always -1 (line1 = dimensions.IGetLineAtIndex3(i))
Whats wrong with my code?
