AnsweredAssumed Answered

Part configuration specific custom properties in drawings

Question asked by Jiří Konečný on Aug 13, 2015
Latest reply on Aug 13, 2015 by Jiří Konečný

How do I access the configuration specific properties of the part view, from a drawing file using VB.

 

I have acces to active configuration of part, bat i need acess to corect configuration of first drawing view.

 

Sub main()

Dim swApp                 As SldWorks.SldWorks

Dim swModel             As SldWorks.ModelDoc2

Dim swView                As SldWorks.View

Dim swRefModel        As SldWorks.ModelDoc2

Dim PartNo                As String

 

Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Set swView = swModel.GetFirstView

Set swView = swView.GetNextView

Set swRefModel = swView.ReferencedDocument

 

PartNo = swRefModel.CustomInfo2(swRefModel.ConfigurationManager.ActiveConfiguration.Name, "PartNo")

End Sub

 

sorry for my bad english.

 

thanks for the help.

 

Jirka (Czech Rep.)

Outcomes