[] Can Autocad script be automated by VBA?

Discussion in 'AutoCAD' started by bpx, Feb 1, 2004.

  1. bpx

    bpx Guest

    I am looking for a way to batch convert a dir of .dwg files from US
    Imperial to Metric.
    I guess the way to go is to automate the SCALE command?
    Can this be done by VBA?

    My first idea was to make a script like:

    Code:
    --------------------

    ;;Start of routine

    Scale

    all


    0,0

    25.4

    ;;End of routine

    --------------------


    put the script into the dir of .dwg files that i need to convert from
    US Imperial to Metric, and also include a .bat file to execute the
    script... but i cant get this to work?

    I am hoping that VBA can automate this process?

    TIA
     
    bpx, Feb 1, 2004
    #1
  2. Why use vba? Just create a script file and run it against the file
    listing. Download and use ScriptPro which is included in the 2004
    Migration tools [http://tinyurl.com/kme2] It doesn't matter which
    version of AutoCAD you use as long as it is 2000+.

    Oh, and make sure to set MEASURINIT and MEASUREMENT to 1 so AutoCAD
    knows they're metric now.

    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Feb 1, 2004
    #2
  3. bpx

    Ben Guest

    Do you have script-pro? It's one of the migration assistance tools that
    come on the AutoCAD (all versions since 2000) CD. I think it might
    even be available from AutoDesk's website now.

    It's not the best way, but why try to reinvent the wheel.
     
    Ben, Feb 2, 2004
    #3
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.