Raster *.cal extension file to *.dwg

Discussion in 'AutoCAD' started by swaneyg, Jun 30, 2004.

  1. swaneyg

    swaneyg Guest

    I need to take a folder full of scanned ????.cal files and have a routine that initializes AutoCAD, inserts next ????.cal file then saves both a ????.dwg and ????.cal file back to the same folder. It needs to loop through all files unattended. I use AutoCAD 2002 with RasterDesign3 being loaded when AutoCAD starts.
    Any suggestion??
     
    swaneyg, Jun 30, 2004
    #1
  2. swaneyg

    sdanis Guest

    I do this all of the time.
    first I use a quick batch file to create a text file of all of the .cal names in a directory
    dir *.* /b >c:\textfiles\filenames.txt
    Then I use a simple script written like lisp file to insert the cal files one by one
    (setq filenam (open "c:/textfiles/filenames.txt" "r"))
    (while
    (setq ImageFileName (read-line filenam))
    (setq fullfile (strcat "c:/plot/" ImageFilename))
    (command "image" "attach" fullfile "" "" "")
    (command "zoom" "e")
    (command "saveas" filename)

    after you have saved the file, erase and detatch the image

    (command "erase" "all" "")
    (command "image" "detach" "*")
    );;while
    (close filenam)
    Hope this helps
     
    sdanis, Jun 30, 2004
    #2
  3. swaneyg

    swaneyg Guest

    Thanks,
    I'm on vacation for two weeks so I'll give it a try when I return
    Glenn
     
    swaneyg, Jul 1, 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.