batch process

Discussion in 'AutoCAD' started by Stef, Aug 14, 2003.

  1. Stef

    Stef Guest

    Hi
    I'm looking for a batch file that cant convert autocad2000 file into
    autocadr14 file.
    I would be able to launch the process and convert a lot of file in one time.
    If possible, someting free or demo
    And if possible, plotting drawing in other step.
    does somenone cant help me!
    thank you

    Stef
     
    Stef, Aug 14, 2003
    #1
  2. Stef

    Mike Guest

    Try this
    http://www.newfreeware.com/utils/1211/
     
    Mike, Aug 15, 2003
    #2
  3. Stef

    joar Guest

    Download Amethyst CADconvert from: www.cadwizz.com

    Regards,
    joar
     
    joar, Aug 15, 2003
    #3
  4. Stef

    bestafor Guest

    HiHo;
    Get CADieu at http://www.geocities.com/RainForest/1073/index.html
    This will make a list of all drawing files that you will want to process.
    Then run a script on all the files.
    If you need help with scripts, beyond the AutoCad help section.
    Then read the
    following.............................................................
    .............................................................................
    .......................
    Script files are a great way to process a large number of drawings in one or
    more folders when you must make the same changes to all the drawings.
    For example, you may need to rename layers or insert a title block.
    Whatever the need, script files are right for the task. But manually
    creating
    a script file to update 25 or 100 drawings takes a great deal of time.
    This month we look at how you can use Visual LISP to write a simple routine
    that automates the creation and processing of a script file for a folder
    full
    of drawings. You can download the AUTOSCR.LSP file used as an example for
    this
    lesson at www.cadalyst.com/ code.

    Getting started
    First, you must locate the folder that contains the drawings to include in
    the script file. AUTOSCR.LSP prompts you to select a drawing file from the
    correct folder:

    (setq FULL_NAME (getfiled "Select A Drawing File" "" "dwg" 8)))

    This displays the file selection dialog box, where you can select a drawing
    file from any folder. At this point, you are interested only in the folder
    name, so extract the folder name using:

    (setq FNAME_DIR (vl-filename-directory FULL_NAME))

    This returns the folder name after stripping out the filename and extension.

    Get the file names
    Next, get a list of all the drawing filenames using the following code:


    (setq FNAME_LIST (vl-directory-files FNAME_DIR "*.dwg"))

    This returns a list of file and path names, or nil if no files match the
    specified pattern. The next step is:


    (vl-directory-files [FOLDER PATTERN LIST])

    FOLDER is a string that names the folder from which to collect files. If nil
    or absent, (vl-directory-files) uses the current folder.

    PATTERN is a string that contains a DOS pattern for the filename.
    If the string is nil or absent, (vl-directory-files) assumes "*.*"

    LIST is an integer that indicates whether the returned list should include
    folder names. Specify one of the following values:

    0: List files and folders (the default).
    -1: List folders only.
    1: List files only.

    Write the script file
    Now, create the script file for each drawing file in the filename list
    above.
    Code for creating the script file appears in the box at left.
    The (DO:SOMETHING) expression in the code is where you write a small
    subroutine to make whatever changes you need for each drawing file.

    Code for Creating Script File
    (if FNAME_LIST (progn
    (setq SCR_NAME (strcat FNAME_DIR "\\" LOG_NAME ".scr"))
    (setq FILE (open SCR_NAME "w"))
    (setq IN 0)
    (repeat (length FNAME_LIST)
    (setq FNAME (nth IN FNAME_LIST))

    (setq FNAME (vl-filename-base FNAME))

    (write-line "open" FILE)

    (write-line (strcat FNAME_DIR "\\" FNAME) FILE)

    (write-line "(DO:SOMETHING)" FILE)

    (write-line "qsave" FILE)

    (write-line "close" FILE)

    (setq IN (1+ IN))

    );;repeat

    (close FILE)







    .............................................................................
    ............................
     
    bestafor, Oct 10, 2003
    #4
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.