Results 1 to 3 of 3

Thread: Creating a dialogue box to alert acaddoc.lsp loaded or had an error loading

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

    Question Creating a dialogue box to alert acaddoc.lsp loaded or had an error loading

    Currently I have an alert box that pops up if the acaddoc.lsp file completely loads into a drawing. Looking for help to add another alert, or other element, if it doesn't fully load which would alert the user that there is an issue with the drawing causing the acaddoc.lsp file to not fully load. Currently I have this string at the end of the acaddoc.lsp file so it pops up if the full list properly loads into cad.

    (ALERT "DECPC Civil 3D 2017 Startup Suite Has Loaded Successfully\n\nAll Commands & LISP Routines will work as designed")

    at points, if a network drive is not loaded on the users profile the acaddoc.lsp will stop at a certain line and not fully load our customizations. This is where I would love to have the end user see another alert dialogue box saying an error occurred and your acaddoc.lsp file was not fully loaded.

    Any help would be greatly appreciated.

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

    Default Re: Creating a dialogue box to alert acaddoc.lsp loaded or had an error loading

    Alert dialog boxes are extremely intrusive to working with AutoCAD. I would convert the successful alerts to echos to the command line. If it was successful, there should not be a need for any additional action from the user. Clicking or hitting Enter to close the dialog is an extra step.

    Regarding the missing network drives, are you testing to see if the drive / file is able to be found before attempting to load it? Are you using the onFailure option of the load command?

    Determining what to do when things aren't available is part of handling your CAD system startup steps.
    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
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Creating a dialogue box to alert acaddoc.lsp loaded or had an error loading

    Quote Originally Posted by spsluka View Post
    Looking for help to add another alert, or other element, if it doesn't fully load which would alert the user that there is an issue with the drawing causing the acaddoc.lsp file to not fully load.
    The only reason it would not fully load, is if there is an unhandled error in the file.

    I just put something like this as the last line in AcadDoc.lsp: (princ "\n AcadDoc.lsp loaded ") - but of course that only tells you that it DID load. It does not do anything if the file fails at some point.

    I think you want to (alert) the user if AcadDoc.lsp fails at some point during the load. I think you'll have to trap all the errors in AcadDoc.lsp and if one is found, display the error message of your choice.
    R.K. McSwain | CAD Panacea |

Similar Threads

  1. 2015: Acaddoc.lsp: Command Definitions Not Loading?
    By pinckney3 in forum AutoCAD Customization
    Replies: 1
    Last Post: 2015-10-31, 05:15 PM
  2. ACADDOC.LSP error trapping
    By jasonp in forum AutoLISP
    Replies: 3
    Last Post: 2014-03-18, 05:43 PM
  3. Creating acaddoc.lsp automatically
    By harilalmn in forum AutoCAD General
    Replies: 1
    Last Post: 2010-11-26, 08:43 AM
  4. overwrite dialogue box missing when loading updated family
    By Ning Zhou in forum Revit Architecture - General
    Replies: 0
    Last Post: 2010-09-28, 06:57 PM
  5. Loading New W Shapes after Family is Already Loaded?
    By bwiab in forum Revit Architecture - General
    Replies: 3
    Last Post: 2010-03-11, 10:09 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
  •