naerwen
Materials
- Oct 24, 2008
- 3
All,
I have recorded the following macro for use ...
'Global Variable Declarations
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
' Main() call
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.OpenDoc6("C:\Documents and Settings\begas\My Documents\Work-2.0\SolidWorks\SolidworksDrawings\1 INCH CAM\1 inch cam A ear plate.SLDPRT", 1, 0, "", longstatus, longwarnings)
swApp.OpenDoc6 "C:\Documents and Settings\begas\My Documents\Work-2.0\SolidWorks\SolidworksDrawings\1 INCH CAM\1 inch cam A ear plate.SLDPRT", 1, 0, "", longstatus, longwarnings
Set Part = swApp.ActivateDoc2("1 inch cam A ear plate.SLDPRT", False, longstatus)
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
Part.Extension.InsertScene "\scenes\02 studio scenes\66 light cards.p2s"
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = Nothing
End Sub
... I need to have a UserForm with a browse button on it when the users call this macro.
Can someone please tell me how to call a UserForm?
Thank you,
Naerwen
I have recorded the following macro for use ...
'Global Variable Declarations
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
' Main() call
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.OpenDoc6("C:\Documents and Settings\begas\My Documents\Work-2.0\SolidWorks\SolidworksDrawings\1 INCH CAM\1 inch cam A ear plate.SLDPRT", 1, 0, "", longstatus, longwarnings)
swApp.OpenDoc6 "C:\Documents and Settings\begas\My Documents\Work-2.0\SolidWorks\SolidworksDrawings\1 INCH CAM\1 inch cam A ear plate.SLDPRT", 1, 0, "", longstatus, longwarnings
Set Part = swApp.ActivateDoc2("1 inch cam A ear plate.SLDPRT", False, longstatus)
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
Part.Extension.InsertScene "\scenes\02 studio scenes\66 light cards.p2s"
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = Nothing
End Sub
... I need to have a UserForm with a browse button on it when the users call this macro.
Can someone please tell me how to call a UserForm?
Thank you,
Naerwen