几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-04-12, 10:19 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】see what partassembly a drawing points to

see what part/assembly a drawing points to.
hi,
when i open a drawing (slddrw), is it possible to figure out which file it points to (sldprt/sldasm)?
also, when i open a drawing (without having the part it refers to) the drawing displays as it was last saved. it then starts complaining that i cannot find the file, and the updates the drawing to a blank sheet.
is it possible to open without updating, to just see the last saved drawing?
nicolai søndergaard
lm glasfiber a/s
file > find references to figure out which file it points to (sldprt/sldasm)
open the drawing with solidworks viewer or e drawing to see the last saved drawing without updating
deepak gupta
sw2007 sp5.0
sw2009 sp2.1
how do i get to these things through the api?
i have tried with modeldoc2.getexternalreferencename() but i'm getting no value from it.
also, opening the drawing through e drawings will not work (i think atleast), i need to get the same functionality (or lack thereof) in sw through the api.
nicolai søndergaard
lm glasfiber a/s
nicolai,
you can open the drawing in read-only state in sw to avoid the drawing from updating. set the options when using opendoc6 (i'm not yet familiar with opendoc7). or check out the example for opendoc7. it does exactly what you want.
dansk?
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
nicolai
regarding how to get the model attached to a drawing. as a drawing can show views of several models you will have to go through the views to get the information you seek. look at view::referenceddocument. i think that is what you need.
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
edited: 01/21/2009 at 04:46 am by jorn bjarning
thank you jorn, opendoc6 did seem to do what i want, except doing it with readonly, didn't display the views, and doing it with viewonly, only displayed the views (we have a frame i wanted aswell).
i couldn't get view::referenceddocument to work. in the end i just looked for files in the directory instead.
and yes, dansk
nicolai søndergaard
lm glasfiber a/s
i have not actually looked at it, but i would guess that the document manager api would get external references. using this api does require getting a license key from apisupport@solidworks.com.
wayne matus
texas engineering systems
answer for external reference you can use document manager or sldworks::getdocumentdependencies2
originally posted by: nicolai søndergaard
thank you jorn, opendoc6 did seem to do what i want, except doing it with readonly, didn't display the views, and doing it with viewonly, only displayed the views (we have a frame i wanted aswell).
i couldn't get view::referenceddocument to work. in the end i just looked for files in the directory instead.
and yes, dansk
say, when you were able to open the referenced model via the stock api in readonly-mode, would this allow you to save the referenced part in a different format? say, a stepfile?
solidworks 2008 sp5 win xp pro
dell precision 3400 4gb ram
nvidia quadro fx3700
169.39_quadro_winxp2k_english_whql(.exe)
originally posted by: ivana kolin
for external reference you can use document manager or sldworks::getdocumentdependencies2
thanks ivana, this worked out great.
@jack:
i didn't try step but i had no problems saving a pdf or a dxf.
however, doing it with readonly didn't show any of the views on my drawing, only my drawing frame (sheet template).
doing it with viewonly saved the views, but not the drawingframe.
nicolai søndergaard
lm glasfiber a/s
quick
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】how to save to dxf in active drawing file location yang686526 SolidWorks二次开发 0 2009-04-12 09:23 PM
【转帖】how to save to dxf in active drawing file location yang686526 SolidWorks二次开发 0 2009-04-12 06:38 PM
【转帖】can i import points data from excel yang686526 SolidWorks二次开发 0 2009-04-12 05:43 PM


所有的时间均为北京时间。 现在的时间是 08:25 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多