pyroclasm
Computer
- May 17, 2005
- 24
Can some one please help me, I am new to SW API. I want to be able to Get the File Name of an Active Document in SW to appear in a TextBox. I've tried multiple different variations of the code below, I've been at it for days, but can't figure out why it won't work. What am I overlooking?
Robert
--------------------------------
Private Sub UserForm_initialize()
Dim swApp As SldWorks.SldWorks
Dim swModelDoc As SldWorks.ModelDoc2
Dim swDocTitle As String
Dim swActiveComponent As String
Set swModelDoc = GetTitle(swDocTitle)
swActiveComponent = swModelDoc
txtAC.Text = swActiveComponent
End Sub
---------------
Robert
--------------------------------
Private Sub UserForm_initialize()
Dim swApp As SldWorks.SldWorks
Dim swModelDoc As SldWorks.ModelDoc2
Dim swDocTitle As String
Dim swActiveComponent As String
Set swModelDoc = GetTitle(swDocTitle)
swActiveComponent = swModelDoc
txtAC.Text = swActiveComponent
End Sub
---------------