hi!
how are u?
it´s the first message that i write in this forum so, nice tomeet everybody.
sorry about my bad english but i´m learning.
my problem is that i want to open a document of the solidworks buti can´t.
i tried with:
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim longstatus As Long, longwarnings As Long
Set swApp = CreateObject("SldWorks.Application")
Set swModel = swApp.OpenDoc6("C:\1.SLDASM", 2, 0, "", longstatus,longwarnings) '1.sldasm is the doc that i want to open
swApp.OpenDoc6 "C:\1.SLDASM" & a & b, 2, 0, "", longstatus,longwarnings
Set swModel = swApp.ActivateDoc2("1.SLDASM", False, longstatus)
and with:
Dim swApp As SldWorks.SldWorks
Dim fileerror As Long
Dim filewarning As Long
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible = True
swApp.OpenDoc6 1.SLDASM, swDocPART, swOpenDocOptions_Silent, "",fileerror, filewarning
but it doesn´t work. anybody can help me?? thank you!
p.d. the doc that i want to open can be a part or anassembly.SolidworksApi macros
how are u?
it´s the first message that i write in this forum so, nice tomeet everybody.
sorry about my bad english but i´m learning.
my problem is that i want to open a document of the solidworks buti can´t.
i tried with:
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim longstatus As Long, longwarnings As Long
Set swApp = CreateObject("SldWorks.Application")
Set swModel = swApp.OpenDoc6("C:\1.SLDASM", 2, 0, "", longstatus,longwarnings) '1.sldasm is the doc that i want to open
swApp.OpenDoc6 "C:\1.SLDASM" & a & b, 2, 0, "", longstatus,longwarnings
Set swModel = swApp.ActivateDoc2("1.SLDASM", False, longstatus)
and with:
Dim swApp As SldWorks.SldWorks
Dim fileerror As Long
Dim filewarning As Long
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible = True
swApp.OpenDoc6 1.SLDASM, swDocPART, swOpenDocOptions_Silent, "",fileerror, filewarning
but it doesn´t work. anybody can help me?? thank you!
p.d. the doc that i want to open can be a part or anassembly.SolidworksApi macros