API-question: SaveAs to AutoCAD-format (.DWG ) will produce drawings out of scale...

Discussion in 'SolidWorks' started by KimSky, Apr 1, 2004.

  1. KimSky

    KimSky Guest

    Hi,

    anyone else seen this?

    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...

    Anyone?

    TIA, KimSky
     
    KimSky, Apr 1, 2004
    #1
  2. 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..
     
    Markku Lehtola, Apr 1, 2004
    #2
  3. 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.

    Corey
     
    Corey Scheich, Apr 1, 2004
    #3
  4. DXF
    Type of Setting

    Enumeration System-Level Document-Level Comments

    swDxfOutputScaleFactor Yes No Specifies
    value to scale DXF output; double value.

    dxf and dwg use the same settings. well it seems that way.
     
    Sean Phillips, Apr 2, 2004
    #4
  5. 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.

    Bye,
    Stefan

    --

    unofficial german SolidWorks helpsite
    http://solidworks.cad.de
    tools and programs for SolidWorks
    http://swtools.cad.de
     
    Stefan Berlitz, Apr 3, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.