Hello all,
I got SW drawing with , on eacxh sheets, 1 part or assembly. These part or assembly comes with a specific configuration.
I want to rename the sheets regarding the active configuration ot the firstview (face) per sheet in vba.
I know how to rename each sheet, i just need to retreive the actual configuration on a model in a view.
Than in advance
From the API help file.
Get Configurations Referenced in View Example (VBA)
This example shows how to get the names of the configurations referenced in each drawing view in the drawing sheet.
'-------------------------------------
'
' Preconditions: Drawing document is open.
'
' Postconditions: None
'
'--------------------------------------
Option Explicit
Sub main()
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swDraw As SldWorks.DrawingDoc
Dim swView As SldWorks.view
Dim bRet As Boolean
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swDraw = swModel
Debug.Print "File = " & swModel.GetPathName
Set swView = swDraw.GetFirstView
Do While Not swView Is Nothing
Debug.Print " View = " + swView.Name
Debug.Print " Model = " + swView.GetReferencedModelName
Debug.Print " Config = " + swView.ReferencedConfiguration
Set swView = swView.GetNextView
Loop
End Sub