madriver Posted November 26, 2024 Posted November 26, 2024 (edited) So I have been using this LISP routine for close to 20 years. It was working in 2024. This last month I am getting this error: _DNOTE ; error: quit / exit abort This is the script: <;Tip1566A: DIMNOTE.LSP Dimension Notes (c)1999, Mike Lapinski ;reformatted, verified with R2000/R14/R13 ;clarified command prompts (defun DN_SHOWNOTE (/ LNUM LNOTE) (set_tile "error" "") (setq LNUM (get_tile "lb_notes") LNOTE (nth (atoi LNUM) DM_NOTES) ) ;_ end of setq (set_tile "eb_note" LNOTE) (princ) ) ;_ end of defun ;;====================================================== ;; Function: DN_PlaceNote ;; Purpose: If valid note is input, close dialog box ;;====================================================== (defun DN_PLACENOTE () (set_tile "error" "") (setq DN_MODIFIER (strcase (get_tile "eb_note"))) (if (= DN_MODIFIER " ") (set_tile "error" "Invalid note string") (done_dialog 1) ) ;_ end of if ) ;_ end of defun ;;====================================================== ;; Function: DN_AppendNote ;; Purpose: Append note to selected dimension entity ;;====================================================== (defun DN_APPENDDIM (VAL PLACEMENT / ENT DVAL) (setq ENT (car (entsel "\nSelect dimension for note: "))) (while (/= "DIMENSION" (cdr (assoc 0 (entget ENT)))) (princ "\nSelected entity is not a DIMENSION.") (setq ENT (car (entsel "\nSelect dimension for note: "))) ) ;while (setq ENT (entget ENT) DVAL (cdr (assoc 1 ENT)) ) ;_ end of setq (if (= DVAL "") (setq DVAL "<>") ) ;_ end of if (if (= PLACEMENT 1) ;above line (setq VAL (strcat DVAL " " VAL)) (progn (if (wcmatch DVAL "*\\X*") (setq VAL (strcat DVAL "\\P" VAL)) (setq VAL (strcat DVAL "\\X" VAL)) ) ;_ end of if ) ;_ end of progn ) ;_ end of if (entmod (subst (cons 1 VAL) (assoc 1 ENT) ENT)) (princ) ) ;_ end of defun ;;====================================================== ;; Main Function - Dimension NOTE ;;====================================================== (defun C:DNOTE (/ DCL_ID DM_NOTES DN_ABOVE) (setq DCL_ID (load_dialog "dimnote.dcl")) (if (not (new_dialog "dimnote" DCL_ID)) (exit) ) ;_ end of if (setq DM_NOTES '("CLR." "CLEAR" "M.O." "MIN." "MAX." "REF." "R.O." "TYP." "TYPICAL" "V.I.F." "VERIFY IN FIELD" "LEASE LINE" "MTL. STUDS" "+ or -" "A.C.T" "HVAC" "DECK ABV." "CONC. BEAM" "VARIES" "CLG. HT." "MEAN ROOF HT.") DN_ABOVE 0 ) ;_ end of setq (set_tile "eb_note" "TYP.") (set_tile "dn_below" "1") ; Set as default (start_list "lb_notes") (mapcar 'add_list DM_NOTES) (end_list) (set_tile "lb_notes" "7") (action_tile "lb_notes" "(DN_ShowNote)") (action_tile "dn_above" "(setq dn_above 1)") (action_tile "dn_below" "(setq dn_above 0)") (action_tile "accept" "(DN_PlaceNote)") (action_tile "cancel" "(done_dialog 0)") (if (eq (start_dialog) 1) (DN_APPENDDIM DN_MODIFIER DN_ABOVE) ) ;_ end of if (unload_dialog DCL_ID) (princ) ) ;_ end of defun (princ "\n Dimnote loaded... Start command by typing DNOTE ") (princ)> Any help would greatly appreciated Edited November 28, 2024 by SLW210 Added Code Tags! Quote
BIGAL Posted November 26, 2024 Posted November 26, 2024 The Admin will ask you use the <> when posting code, so please fix. You are loading a dcl which you have not provided, you can edit post, attach the dcl. When you say not working that is not enough, do you get error message or what ? Quote
SLW210 Posted November 27, 2024 Posted November 27, 2024 I moved your thread to the AutoLISP, Visual LISP & DCL Forum. Please place your code in code tags! 1 Quote
rlx Posted November 27, 2024 Posted November 27, 2024 (edited) just googled 'tip1566' make sure that this line : (setq DCL_ID (load_dialog "dimnote.dcl")) is used in the right way : - either dimnote.dcl lives in one of your support paths else add complete path to name in above line. - if you use the one from zipfile rename it to dimnote.dcl if you use your own lisp file because it looks for this name else it uses (exit) I would prefere to use (progn (alert "unable to load dialog")(exit)) you can't have enough / too much alert (or princ) functions in your apps to find out where somethings has gone wrong (usually , where you messed up) Tip1566.zip Edited November 27, 2024 by rlx 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.