See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 19

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

  1. #1
    Member
    Join Date
    2003-03
    Posts
    12
    Login to Give a bone
    0

    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,439
    Login to Give a bone
    0

    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,439
    Login to Give a bone
    0

    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
    Login to Give a bone
    0

    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
    Login to Give a bone
    0

    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,439
    Login to Give a bone
    0

    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
    Login to Give a bone
    0

    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

  8. #8
    Member
    Join Date
    2019-11
    Posts
    3
    Login to Give a bone
    0

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

    scrs not working snap.PNG
    i used this lisp but its not working what can i do.... any instruction is their

  9. #9
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,507
    Login to Give a bone
    0

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

    Quote Originally Posted by jsankar786025 View Post
    scrs not working snap.PNG
    i used this lisp but its not working what can i do.... any instruction is their
    I don't know for sure but I think if you replace all "command" with "command-s" in the routine, it may work for you.

  10. #10
    Login to Give a bone
    0

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

    Can you provide a screen shot using [Alt+Print Screen] of the program dialog with the dialog text you are testing.
    This way we can see what may be the cause of this error message.
    The script commands basically are like entering one command after another on the command line like:
    zoom e _qsave (etc.) which may include some basic autolisp functions that don't require user input.
    Thanks

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 2013-03-27, 05:41 PM
  2. Replies: 11
    Last Post: 2011-01-27, 04:33 PM
  3. 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, 03:24 PM
  4. 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
  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
  •