+ Reply to Thread
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 35
  1. #11
    Forum Newbie
    Using
    MEP 2010
    Join Date
    Aug 2009
    Posts
    6

    Default

    Registered forum members do not see this ad.

    I tried that code, but it just makes AutoCAD MEP close completely when finished opening.

    As far as the drawing1.dwg closing when you opening an existing drawing, not on my machine, if that's an option that would work to, but drawing1.dwg stays open and I have to close it manually..

    Any other suggestions?

    Thanks guys

  2. #12
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,199

    Default

    Quote Originally Posted by AirSchatz View Post
    I tried that code, but it just makes AutoCAD MEP close completely when finished opening.

    As far as the drawing1.dwg closing when you opening an existing drawing, not on my machine, if that's an option that would work to, but drawing1.dwg stays open and I have to close it manually..

    Any other suggestions?

    Thanks guys
    did you try the one i posted, it will check if the sdi mode is set to 0, if not, it will not continue and try to close the drawing.

  3. #13
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Computer:
    HP ZBook 17
    CPU:
    i7-4810MQ @ 2.80 GHZ
    RAM:
    16GB
    Graphics:
    Nvidia Quadro K4100M
    Primary Storage:
    256GB SSD
    Secondary Storage:
    1TB SATA
    Monitor:
    (2) HP 23"
    Discipline
    Civil
    rkmcswain's Discipline Details
    Discipline
    Civil
    Details
    CAD Manager
    Using
    Civil 3D 2017
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    4,445

    Idea

    Quote Originally Posted by AirSchatz View Post
    As far as the drawing1.dwg closing when you opening an existing drawing, not on my machine, if that's an option that would work to, but drawing1.dwg stays open and I have to close it manually..
    Then something is modifying the drawing at startup. As soon as AutoCAD opens with drawing1.dwg - type in DBMOD at the command line. If it's not zero (0), then something is modifying the drawing.

    If DBMOD = 0 AND you start another drawing or open an existing one, then "drawing1.dwg" closes.

    If DBMOD /= 0 AND SDI = 0, AND you start another drawing or open an existing one, then "drawing1.dwg" stays open.

    If DBMOD /= 0 AND SDI = 1, AND you start another drawing or open an existing one, then you will be prompted to save "drawing1.dwg".
    R.K. McSwain
    CAD Panacea | twitter

  4. #14
    Forum Newbie
    Using
    MEP 2010
    Join Date
    Aug 2009
    Posts
    6

    Default

    Quote Originally Posted by alanjt View Post
    did you try the one i posted, it will check if the sdi mode is set to 0, if not, it will not continue and try to close the drawing.

    I did try that, but when I open ACAD, it loads up then when the drawing1.dwg would the whole program just shut down. But then again, maybe I put the code in the wrong place....I inserted at the bottom of of the acad2010doc.lsp. I couldn't find the acad.lsp. Also, this is a AutoCAD MEP 2010 programs.

    Thanks for your help

  5. #15
    Forum Newbie
    Using
    MEP 2010
    Join Date
    Aug 2009
    Posts
    6

    Default

    Quote Originally Posted by rkmcswain View Post
    Then something is modifying the drawing at startup. As soon as AutoCAD opens with drawing1.dwg - type in DBMOD at the command line. If it's not zero (0), then something is modifying the drawing.

    If DBMOD = 0 AND you start another drawing or open an existing one, then "drawing1.dwg" closes.

    If DBMOD /= 0 AND SDI = 0, AND you start another drawing or open an existing one, then "drawing1.dwg" stays open.

    If DBMOD /= 0 AND SDI = 1, AND you start another drawing or open an existing one, then you will be prompted to save "drawing1.dwg".

    the DBMOD = 20 (read only)......what does that mean?

  6. #16
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,199

    Default

    maybe something like this?
    Code:
    (and (eq (getvar "dwgname") "Drawing1.dwg")
         (zerop (getvar "sdi"))
         (if (zerop (getvar "dbmod"))
           (command "_.close")
           (command "_.close" "_y")
         ) ;_ if
    ) ;_ and

  7. #17
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Computer:
    HP ZBook 17
    CPU:
    i7-4810MQ @ 2.80 GHZ
    RAM:
    16GB
    Graphics:
    Nvidia Quadro K4100M
    Primary Storage:
    256GB SSD
    Secondary Storage:
    1TB SATA
    Monitor:
    (2) HP 23"
    Discipline
    Civil
    rkmcswain's Discipline Details
    Discipline
    Civil
    Details
    CAD Manager
    Using
    Civil 3D 2017
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    4,445

    Idea

    Quote Originally Posted by AirSchatz View Post
    the DBMOD = 20 (read only)......what does that mean?
    You can find all the system variables in HELP.
    A DBMOD value of 20 means that the view has been modified and a database variable has been modified.
    R.K. McSwain
    CAD Panacea | twitter

  8. #18
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Computer:
    HP ZBook 17
    CPU:
    i7-4810MQ @ 2.80 GHZ
    RAM:
    16GB
    Graphics:
    Nvidia Quadro K4100M
    Primary Storage:
    256GB SSD
    Secondary Storage:
    1TB SATA
    Monitor:
    (2) HP 23"
    Discipline
    Civil
    rkmcswain's Discipline Details
    Discipline
    Civil
    Details
    CAD Manager
    Using
    Civil 3D 2017
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    4,445

    Idea

    Quote Originally Posted by AirSchatz View Post
    I inserted at the bottom of of the acad2010doc.lsp. I couldn't find the acad.lsp.
    First off, "acad2010doc.lsp" is executed every time a drawing is opened. Secondly, that file "belongs" to AutoCAD, meaning that it can be overwritten by reinstalls, service packs, upgrades, etc. Anything you put in here will probably be lost someday.

    "Acad.lsp" is only executed at application startup (assuming ACADLSPASDOC is not changed from its default value of zero), and is "owned" by the user. AutoCAD will never touch this file, it's under your control. Because it's a user file, you have to create it. It doesn't exist OOTB.
    R.K. McSwain
    CAD Panacea | twitter

  9. #19
    Forum Newbie
    Using
    MEP 2010
    Join Date
    Aug 2009
    Posts
    6

    Default

    Quote Originally Posted by rkmcswain View Post
    First off, "acad2010doc.lsp" is executed every time a drawing is opened. Secondly, that file "belongs" to AutoCAD, meaning that it can be overwritten by reinstalls, service packs, upgrades, etc. Anything you put in here will probably be lost someday.

    "Acad.lsp" is only executed at application startup (assuming ACADLSPASDOC is not changed from its default value of zero), and is "owned" by the user. AutoCAD will never touch this file, it's under your control. Because it's a user file, you have to create it. It doesn't exist OOTB.

    That makes sense....The Acad.lsp you are talking about, is that the same as Acad2010.lsp? That was the only other lsp file in the support folder.

    Thanks for the help guys, this forum rawks.....

  10. #20
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Computer:
    HP ZBook 17
    CPU:
    i7-4810MQ @ 2.80 GHZ
    RAM:
    16GB
    Graphics:
    Nvidia Quadro K4100M
    Primary Storage:
    256GB SSD
    Secondary Storage:
    1TB SATA
    Monitor:
    (2) HP 23"
    Discipline
    Civil
    rkmcswain's Discipline Details
    Discipline
    Civil
    Details
    CAD Manager
    Using
    Civil 3D 2017
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    4,445

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by AirSchatz View Post
    That makes sense....The Acad.lsp you are talking about, is that the same as Acad2010.lsp?
    No! acad2010.lsp is "owned" by AutoCAD also.

    "acad.lsp" and "acaddoc.lsp" are the USER equivalents to "acad2010.lsp" and "acad2010doc.lsp" There is just no reason to edit the latter two files.

    See: http://usa.autodesk.com/getdoc/id=TS21336
    R.K. McSwain
    CAD Panacea | twitter

Similar Threads

  1. Replies: 0
    Last Post: 3rd Dec 2007, 05:51 am
  2. Book to start 3-dimensional drawing?
    By therock005 in forum AutoCAD 3D Modelling & Rendering
    Replies: 6
    Last Post: 30th Nov 2007, 01:57 pm
  3. Is autocad 2000 the program to learn autocad drawing skills
    By New2CADmike in forum AutoCAD Beginners' Area
    Replies: 5
    Last Post: 23rd Jun 2006, 09:34 am
  4. i need to start
    By lonescat in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 3rd Apr 2004, 06:10 pm

Bookmarks

Posting Permissions

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