See the top rated post in this thread. Click here

Page 13 of 13 FirstFirst ... 3910111213
Results 121 to 130 of 130

Thread: Automatically Open Drawings From Previous Session

  1. #121
    I could stop if I wanted to
    Join Date
    2015-09
    Posts
    420
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    Hi Robert,

    Can you tell me if there is a way to utilize the "snapshot" code you developed and have a variation that would open the drawing files in "Read Only" mode....??

    Thank you in advance for any assistance you can provide....!

    Regards,
    Vince

  2. #122
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    It would be possible to record which drawings were read-only at the point of the snapshot, and open them again as read-only the next time AutoCAD started. Is that what you are looking for?
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  3. #123
    I could stop if I wanted to
    Join Date
    2015-09
    Posts
    420
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    Hi Robert,

    Thank you for you response....!

    Actually I was looking for the ability to simply open all of the previous drawings as "Read Only" but your option also sounds interesting.

    Thanks again,

    Vince

  4. #124
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    Is there anything special that needs to be done for importing the routine
    from 2008 to 2009?

    I can write the snapshot, however, it is not being read upon reopenning autocad.

    All of the support file paths are ok, acaddoc.lsp is being read, and acad.lsp is in the
    same folder.

    Still has this code:
    Code:
    ;;; Begin Snapshot.dvb support in Acad.lsp
    (vl-Load-Com)
    (cond ((setq fqn (findfile "Snapshot.dvb"))
           (vla-LoadDVB (vlax-Get-Acad-Object) fqn)
           (setq fqn nil)
           (defun-q	i:ReadSnapshot
    		()
    		(setvar "AcadLspAsDoc" 0)
    		(cond ((= (getvar "DwgTitled") 0)
    		       (command "._VBAStmt" "ThisDrawing.ReadSnapshot"))))
           (setq S::StartUp (append S::StartUp i:Readsnapshot))
           (princ))
          (T (princ "\nSnapshot application not found.") (terpri) (princ)))
    ;;; End Snapshot support in Acad.lsp

  5. #125
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    The posted code works fine in AutoCAD 2009. It must be somthing in your setup. Make sure you don't have Acad.lsp in an unexpected location.

    Command: (findfile "acad.lsp")
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  6. #126
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    "C:\\Documents and Settings\\rhall\\Application Data\\Autodesk\\AutoCAD
    Mechanical 2009\\R17.2\\enu\\support\\acad.lsp"

    That checks out, the code is there.

    It creates a file called snapshot.txt right?
    I searched the entire drive and didn't find a file.
    Last edited by Robert.Hall; 2008-09-12 at 05:44 PM.

  7. #127
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    It will place the file where you specified in the .dvb file. The default is C:\Temp\Snapshot.txt in the posted .dvb file.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  8. #128
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    Thanks, I figured it out.

    I had to add support paths to both C:/temp and snapshot.dvb.

    Didn't think I needed the snapshot directory since the macro
    has been loading. Command line stated that it could not find the
    program.

  9. #129
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    Quote Originally Posted by Robert.Hall View Post
    Thanks, I figured it out.

    I had to add support paths to both C:/temp and snapshot.dvb.

    Didn't think I needed the snapshot directory since the macro
    has been loading. Command line stated that it could not find the
    program.
    The folder where the .dvb is located does need to be on the support path. All add-on programs should be located on the support path somewhere (perhaps this is not directly expressed anywhere, but should be a given anyway).

    However, C:\Temp does not need to be on the support paths.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  10. #130
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: Automatically Open Drawings From Previous Session

    Just wanted to stop and say, "Thank you Robert" again. I've been off on another planet for a while and it's nice to see that this continued to develop.


Page 13 of 13 FirstFirst ... 3910111213

Similar Threads

  1. Replies: 1
    Last Post: 2007-09-19, 03:40 PM
  2. Previous Command Available Across Drawings
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2007-05-02, 01:44 PM
  3. Replies: 5
    Last Post: 2006-10-09, 09:25 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
  •