几何尺寸与公差论坛

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

【转帖】insertdwgordxffile

[复制链接]
发表于 2009-4-12 21:28:30 | 显示全部楼层 |阅读模式
insertdwgordxffile
i am trying to write a macro to import a dxf onto a surface and extrude it as a hole. the macro works except for the key function; insertdwgordxffile. it just seems to fail silently when run in a macro. it seems to work fine when used manually. has anyone had any luck with a work around for this?
works fine for me:
option explicit
dim swapp as sldworks.sldworks
dim part as modeldoc2
sub main()
set swapp = application.sldworks
set part = swapp.activedoc
part.extension.selectbyid2 "", "face", -0.02276314816265, -0.001069096318986, 0.009999999999934, false, 0, nothing, 0
part.featuremanager.insertdwgordxffile "t:\contract\50100-ss\00bc-007.dxf"
part.clearselection2 true
end sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-23 10:15 , Processed in 0.036583 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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