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

code example needed
im editing a code to export a part model's flat pattern to a dwg, but i cant get it to save to a "user specified" location and also how can i get it to have the same file name as well?
im trying to find other codes already written but i cant find them and what i think would work isnt working
set part = swapp.activedoc
set selmgr = part.selectionmanager
boolstatus = part.extension.selectbyid2("flat-pattern1", "bodyfeature", 0, 0, 0, false, 0, nothing, 0)
boolstatus = part.exportflatpatternview("q:\wf (weigh and fill machines)\flat pattern - cylinder-bracket-table.dxf", 1)
end sub
just trying to figure it all out
my latest code but just seems to do nothing
sub main()
set swapp = application.sldworks
partname = swdescription
set part = swapp.activedoc
set selmgr = part.selectionmanager
boolstatus = part.extension.selectbyid2("flat-pattern1", "bodyfeature", 0, 0, 0, false, 0, nothing, 0)
boolstatus = part.exportflatpatternview("q:\ partname.dwg")
end sub
just trying to figure it all out
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)