Results 1 to 7 of 7

Thread: Open all drawings in a directory, save, close.

  1. #1
    Member
    Join Date
    2003-03
    Posts
    12

    Default Open all drawings in a directory, save, close.

    Hi,
    I have a script started that is supposed to open each file in a directory, zoom to extents, then save and close each file.

    The files are all numbered from 1-3600 with some numbers missing in between.
    What's the best way to get all the files to open with out copying the code, 3600 times and and changing each file name?

    Thanks!!!!

    Jeff

  2. #2
    Wish List Manager BrenBren's Avatar
    Join Date
    2000-11
    Location
    150700
    Posts
    3,421

    Default Re: Open all drawings in a directory, save, close.

    Quote Originally Posted by JSimons View Post
    Hi,
    I have a script started that is supposed to open each file in a directory, zoom to extents, then save and close each file.

    The files are all numbered from 1-3600 with some numbers missing in between.
    What's the best way to get all the files to open with out copying the code, 3600 times and and changing each file name?

    Thanks!!!!

    Jeff
    I've got a LSP file that will open the next file in a directory, but I've got to see if I can remember where I got it before I can post it.

  3. #3
    Wish List Manager BrenBren's Avatar
    Join Date
    2000-11
    Location
    150700
    Posts
    3,421

    Default Re: Open all drawings in a directory, save, close.

    Quote Originally Posted by BrenBren View Post
    I've got a LSP file that will open the next file in a directory, but I've got to see if I can remember where I got it before I can post it.
    There is one posted in the exchange (which apparently isn't very easy to get to anymore ). If the link doesn't get you to the file, try this and search for Open Next File

  4. #4
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043

    Default Re: Open all drawings in a directory, save, close.

    I would just write a lisp to write the script. All you would have to do is select the directory (or use the built in 'getfiled' to select a file, and then grab the directory from there). Once you have the directory you can use 'vl-directory-files' to grab all the files within the directory.

    This should get you started.

  5. #5
    Member
    Join Date
    2003-03
    Posts
    12

    Default Re: Open all drawings in a directory, save, close.

    Thanks for the link Bren.... Now if I can just get IS to grant me access to download the file... in all of their infinite wisdom. (hope they aren't reading this) ha ha

  6. #6
    Wish List Manager BrenBren's Avatar
    Join Date
    2000-11
    Location
    150700
    Posts
    3,421

    Default Re: Open all drawings in a directory, save, close.

    Quote Originally Posted by JSimons View Post
    Thanks for the link Bren.... Now if I can just get IS to grant me access to download the file... in all of their infinite wisdom. (hope they aren't reading this) ha ha
    Yea, I think it might be AUGI; I can't actually download it, it says it's missing. It was written by an AUGI member, so hopefully he'll pop in and be able to help you.

  7. #7

    Wink Re: Open all drawings in a directory, save, close.

    Hi Jeff,
    I have a Script Creator that might help you out. I've included two general functions, ZoomE and Purged, that I use a lot on folders of drawings. Give it a try and see if it works for you.
    Terry
    Attached Images Attached Images
    Attached Files Attached Files

Similar Threads

  1. Replies: 11
    Last Post: 2011-01-27, 03:33 PM
  2. How to quickly save and close multiple open projects and families!
    By craighowie in forum Revit Architecture - General
    Replies: 4
    Last Post: 2010-11-17, 02:24 PM
  3. VBA routine to save and close some open drawings
    By GreyHippo in forum VBA/COM Interop
    Replies: 1
    Last Post: 2010-03-24, 11:59 AM
  4. Replies: 6
    Last Post: 2007-08-20, 04:41 AM
  5. Replies: 3
    Last Post: 2006-07-19, 06:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •