查看单个帖子
旧 2009-04-13, 12:49 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】mirror component in assembly

mirror component in assembly
trying to mirror the component though a plane like a picture below. then i want to mirror like the next picture
and the i record macro using insert>>mirror component command. the code that i recorded are:
dim swapp as object
dim part as object
dim selmgr as object
dim boolstatus as boolean
dim longstatus as long, longwarnings as long
dim feature as object
sub main()
set swapp = application.sldworks
set part = swapp.activedoc
set selmgr = part.selectionmanager
part.mirrorsubassembly
boolstatus = part.extension.selectbyid2("right plane", "plane", 0, 0, 0, true, 0, nothing, 0)
boolstatus = part.extension.selectbyid2("hinge-1@assem2", "component", -0.1267148684469, 0.05833566363731, -0.01904039532695, true, 0, nothing, 0)
boolstatus = part.editrebuild3
part.clearselection2 true
end sub
when i run this macro again it's don't working. can anyone tell me where i modify this code for it's working?
thanks,
shukree
edited: 04/11/2008 at 02:47 am by shukree deasa
click for full image
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)