![]() |
【转帖】need help with drawing view refenrce
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 |
所有的时间均为北京时间。 现在的时间是 04:35 PM. |