|
selected plane name and path
is it possible to get the selected plane's path, regardless of assembly/sub-assembly location, like how you get the component.name2 path off a part? if so how would you do this? i'm trying to select a plane from either the top level assembly or from a sub-assembly and assign it to an object that i select or get later to activate. trying to do something like this. i think i'm going down the wrong path myself ... lol
dim swcomp as sldworks.component2
dim itemplane as variant
dim itemplanenamesplit as variant
' plane already selected
set itemplane = swselmgr.getselectedobject6(1, -1)
set swcomp = itemplane
' get itemplane name and location
itemplanenamesplit = split(swcomp.name2, "/")
cadcam systems analyst
-solidworks office premium 2009 sp3.0
-solidworks simulation premium 2009 sp3.0
-solidworks flow simulation 2009 sp3.0
-2 cpu (fx-62), 2.0 gb of ram
-window xp pro sp2
-nvidia geforce 7950 gx2 (512mb) 6.14.11.6921
answer duh. i was definitely going down the wrong path. here's the correct path.
dim swcomp as sldworks.component2
dim swentity as sldworks.entity
dim itemplane as variant
dim itemplanenamesplit as variant
set itemplane = swselmgr.getselectedobject6(1, -1)
set swentity = itemplane
set swcomp = swentity.getcomponent
itemplanenamesplit = split(swcomp.name2, "/") ' get itemplane name and location
cadcam systems analyst
-solidworks office premium 2009 sp3.0
-solidworks simulation premium 2009 sp3.0
-solidworks flow simulation 2009 sp3.0
-2 cpu (fx-62), 2.0 gb of ram
-window xp pro sp2
-nvidia geforce 7950 gx2 (512mb) 6.14.11.6921
quick |
|