几何尺寸与公差论坛

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

【转帖】code example needed

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

本版积分规则

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

GMT+8, 2024-12-23 01:37 , Processed in 0.034744 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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