几何尺寸与公差论坛

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

【转帖】need help with drawing view refenrce

[复制链接]
发表于 2009-4-12 21:52:33 | 显示全部楼层 |阅读模式
need help with drawing view refenrce
anyone can help pls!
i'm trying to use dm to get the name of the drawingview refence using
iswdmview.referenceddocument...
i've check the help but i'm kind of confused.
what is the good way should i need to have a view selected 1st or should i select it with dm or ???
thanks to the genius that will help!
simon paré
cswp,
mechanical designer
swx 2009 sp 2.1
sub main()
const swfilename as string = "your file"
dim swdoc as swdocumentmgr.swdmdocument10
dim swdmsearchop as swdocumentmgr.swdmsearchoption
dim ndoctype as long
dim nretval as long
dim dmdrview as swdocumentmgr.swdmview
dim dmdrviews as variant
dim i as integer
set classfac = createobject("swdocumentmgr.swdmclassfactory")
set swdocmgr = classfac.getapplication("your code")
if not instr(lcase(swfilename), "slddrw") > 0 then
exit sub
end if
ndoctype = swdmdocumentdrawing
set swdoc = swdocmgr.getdocument(swfilename, ndoctype, false, nretval): debug.assert swdmdocumentopenerrornone = nretval
set swdmsearchop = swdocmgr.getsearchoptionobject
dmdrviews = swdoc.getviews
for i = 0 to ubound(dmdrviews)
set dmdrview = dmdrviews(i)
debug.print dmdrview.referenceddocument
next i
end sub
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-23 14:05 , Processed in 0.034445 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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