Results 1 to 4 of 4

Thread: Batch routine to open dwg files that are zipped!!

  1. #1
    Member
    Join Date
    2013-12
    Posts
    8
    Login to Give a bone
    0

    Question Batch routine to open dwg files that are zipped!!

    Alright I have a simple batch/scr/lisp routine that opens cad files runs a purge routine on them, saves and quits. My issue is that my company loves to unnecessarily zip every single dwg file. Is there a possible way to have my routine open the zipped dwg files and run the same process I already have in place?

    Thanks for any help!!

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,174
    Login to Give a bone
    0

    Default Re: Batch routine to open dwg files that are zipped!!

    Quote Originally Posted by Jgoduti25 View Post
    My issue is that my company loves to unnecessarily zip every single dwg file.
    Really? I don't think I even want to know the rationale for that workflow.

    Quote Originally Posted by Jgoduti25 View Post
    Is there a possible way to have my routine open the zipped dwg files and run the same process I already have in place?

    Thanks for any help!!
    How do you currently open the drawings? How do you zip them after you modify them?

    You could possibly invoke this through the shell.application object. There is some vbscript code out there that shows how to extract files from a zip file.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  3. #3
    Member
    Join Date
    2013-12
    Posts
    8
    Login to Give a bone
    0

    Default Re: Batch routine to open dwg files that are zipped!!

    Quote Originally Posted by Opie View Post
    How do you currently open the drawings? How do you zip them after you modify them?
    I use a batch routine to open autocad and then a .dwg file. I need it to open the zip file then the dwg then run my lisp.

    we use winzip.

    Hmm I also do not need to extract the file. Im starting to think this not only doesnt make sense to a normal person haha but cant be done.
    here is the processs basically im looking for.

    Open Autocad
    Open "filename" using winzip
    Open "*.dwg"
    run lisp
    save
    quit

    I have most of this working successfully. I just need the zip part.
    Last edited by Jgoduti25; 2014-01-10 at 06:24 PM. Reason: Added more detail

  4. #4
    Active Member
    Join Date
    2013-07
    Posts
    66
    Login to Give a bone
    0

    Default Re: Batch routine to open dwg files that are zipped!!

    I believe you can do this via a .bat file.
    Here's an example (save this in notepad as a .bat) and double click, after having changed the paths within to the correct paths on your machine.
    Code:
    FOR %%f in ("C:/YourFolder/Folder/SubDir/*.dwg") do start /wait C:\"Program Files"\Autodesk\"AutoCAD Mechanical 2012"\acad.exe "%%f" /b "C:/YourDir/SubDir/AUTOCADSCRIPT.scr"
    In conjunction with information from the following link:
    http://kb.winzip.com/kb/entry/125/

    Have fun!

Similar Threads

  1. Replies: 14
    Last Post: 2019-01-02, 07:41 PM
  2. 2015: Zipped tutorial files nightmare - SOS!!!
    By southpaw49 in forum Inventor - General
    Replies: 1
    Last Post: 2014-06-02, 08:05 PM
  3. Replies: 10
    Last Post: 2010-10-13, 03:54 PM
  4. Batch routine to clean up Blocks within DWG files
    By george.arq in forum AutoLISP
    Replies: 3
    Last Post: 2007-01-25, 12:33 PM
  5. Routine to Batch Edit Blocks
    By CADdancer in forum VBA/COM Interop
    Replies: 2
    Last Post: 2006-09-19, 09:35 PM

Tags for this Thread

Posting Permissions

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