Russell67
Automotive
- Nov 1, 2005
- 114
In the futile attempt to understand the programming i have an excel sheet that has the drawing and path of the item i want to print (variable "filename"). I have the following code that allows me to open solidworks but i cannot get the needed file to open and i have yet to work on the print.
'Opens SolidWorks
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible = True
Set Part = swApp.ActiveDoc
' Load model and expand window
Set Part = swApp.OpenDoc6("filename.slddrw")
Set Part = swApp.ActivateDoc("filename.slddrw")
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
Why will my "filename" not open?
and what code do i need to rebuild then print.
I am runnig 2007 sp4. Help is greatly appreciated. Thanks
'Opens SolidWorks
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible = True
Set Part = swApp.ActiveDoc
' Load model and expand window
Set Part = swApp.OpenDoc6("filename.slddrw")
Set Part = swApp.ActivateDoc("filename.slddrw")
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
Why will my "filename" not open?
and what code do i need to rebuild then print.
I am runnig 2007 sp4. Help is greatly appreciated. Thanks