几何尺寸与公差论坛

 找回密码
 注册
查看: 782|回复: 0

【转帖】selected plane name and path

[复制链接]
发表于 2009-4-12 19:33:46 | 显示全部楼层 |阅读模式
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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 04:58 , Processed in 0.035569 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表