I use a macro to output a batch of drawings (retval = ModelDoc2.SaveAs4 ( Name, Version, Options, &Errors, &Warnings )) to AutoCAD (.dwg) format which works fine except for the majority of the AutoCAD drawings being out of scale.
If I do a manual SaveAs they will come out just right, i.e. in scale...
I have noticed that scaling is not working in every case for some reason that I haven't figured out. When saving "manually" as dwg/dxf it fails to create 1:1 drawing in some of the cases.
Same kind of behavior with printing; sometimes portrait drawing prints out as landscape if I don't use Print Preview to check (and fix it if it's wrong) it first. Both issues are very annoying because you never can't be sure how it goes before you try and this makes usage of macros quite unpossible. I have told about these issues to my VAR..
If you try a regular SaveAs look under options there is an option for the output scale to be to the model and not the drawing. This should be set before your save as in the API. Unfortunately I don't know which call would be used to set it. I thought it would be one of the UserPrefs but I couldn't find it. (it is always possible that it is simply broken) Maybe email api support. They may point it out to you.
"KimSky" schrieb im Newsbeitrag news:bESac.766$% snipped-for-privacy@reader1.news.jippii.net...
If you want to save with the "1:1-scale" setting and the drawings or multiple sheets have a different base scale then: Yes ;-)
Unfortunately there is a bug in SolidWorks (at least since 2001Plus, where I first discovered this). I got an API related SPR (#132909) for this. The problem is, that with the "1:1" option set in the export dialog SolidWorks will ALWAYS use the last setting for the basic scale UNTIL you open the export dialog again. Then the basic scale is reset to the current value.
This is also true if you try to export the sheets or multiple drawings manually WITHOUT reopening the export dialog for each sheet again. May be it will help if you also send this as an error report, so SolidWorks will finally fix this.
I'm sorry, but the best solution right now is to make sure, that all sheets have the same scale set; I know, that this is not a good solution for the daily work, but I have no better suggestion right now.
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.