几何尺寸与公差论坛

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

【转帖】save3 - return false but no errors or warnings

[复制链接]
发表于 2009-4-12 22:17:45 | 显示全部楼层 |阅读模式
save3 - return false but no errors or warnings
hi folks,
i'm trying to save an assembly drawing using the following c# code:
saved = swmaindoc.save3((int)swsaveasoptions_e.swsaveasoptions_silent
+ (int)swsaveasoptions_e.swsaveasoptions_savereferenced, ref swerror, ref swwarning);
swerror and swwarning are both coming back as 0, but the method itself is returning false.
anyone seen this problem in their own application?
i use this method:
(whith a part open in sw)
swapp as object
swapp = application.sldworks
set part = part.activedoc
part.saveas2 mypath1 & filenlong, 0, true, false
works ok in 2008
sw 2009
pdm workgroup
3d connexion user (space pilot)
bluebeam
mdt & acad user
furniture industry 5 years
hp workstation xw6400
this code may only work for parts/assemblies, i'm not sure
sw 2009
pdm workgroup
3d connexion user (space pilot)
bluebeam
mdt & acad user
furniture industry 5 years
hp workstation xw6400
thanks for the replies. to clarify, i'm not super-concerned about the specific call to use - in 99.99% of all cases, the call i posted works (we're processing over a thousand drawings a day most of the time).
my question is specifically regarding the lack of error information coming back. it's only in the case of a small number of drawings, possibly just this one, that it fails. so i tried to pull the error information from the two ref fields, but they're both zero, even though the call returns false. i'm wondering if that's a known problem, or if my file is somehow corrupted, or if there's some other source of information i'm missing out on.
looks like the file just required a manual rebuild. thanks again adam.
i tend to use a lot of force rebuilds. we do a lot of batch file exporting and line art pdf exports. glad you figured it out.
sw 2009
pdm workgroup
3d connexion user (space pilot)
bluebeam
mdt & acad user
furniture industry 5 years
hp workstation xw6400
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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