hi!
i have opened and assembly and i want to open a sub-assembly calledassy2. i try with this but assy2 sw document doesn´t open.
thanks!
code:
open_children (swcomp As SldWorks.Component2)
Dim vChildComp As Variant
Dim swchildcomp As SldWorks.Component2
Dim longstatus As Long, longwarnings As Long
vChildComp = swcomp.GetChildren
For j = 0 To UBound(vChildComp)
Set swchildcomp = vChildComp(j)
Set Part = swApp.OpenDoc6("d:\assy2.sldasm",2, 0, "",longstatus, longwarnings)
swApp.OpenDoc6 "d:\assy2.sldasm", 2, 0, "", longstatus,longwarnings
'''(some more lines)
swApp.CloseDoc "assy2.SLDASM"
Next j
End sub
SolidworksApi macros
i have opened and assembly and i want to open a sub-assembly calledassy2. i try with this but assy2 sw document doesn´t open.
thanks!
code:
open_children (swcomp As SldWorks.Component2)
Dim vChildComp As Variant
Dim swchildcomp As SldWorks.Component2
Dim longstatus As Long, longwarnings As Long
vChildComp = swcomp.GetChildren
For j = 0 To UBound(vChildComp)
Set swchildcomp = vChildComp(j)
Set Part = swApp.OpenDoc6("d:\assy2.sldasm",2, 0, "",longstatus, longwarnings)
swApp.OpenDoc6 "d:\assy2.sldasm", 2, 0, "", longstatus,longwarnings
'''(some more lines)
swApp.CloseDoc "assy2.SLDASM"
Next j
End sub
SolidworksApi macros