Spinning blue wheel by curser when starting Autocad and other startup issues

Spinning blue wheel by curser when starting Autocad and other startup issues

jjcrocco
Enthusiast Enthusiast
2,914 Views
10 Replies
Message 1 of 11

Spinning blue wheel by curser when starting Autocad and other startup issues

jjcrocco
Enthusiast
Enthusiast

I have created an acaddoc.lsp file, and after it loads (when opening autocad for the first time) the last line in the file prints out, like its supposed to, but ends up on the command line and doesn't finish the command, so it seems, and a blue spinning wheel is at the curser, until you move the mouse or type a command.  Not sure if this is an issue or not.

 

I know it has to do with my acaddoc.lsp file because if I rename it so it doesn't load, it doesn't happen.

 

Also, opening another file or new file it seems to load fine, no blue spinning circle, but prints out last line and leaves it still in the command line area.  Doesn't seem to stop another command from being entered.  just not sure if it is stopping something from loading. 

 

Another possibly related issue is what prints out after my Acaddoc.lsp is loaded, and even what does if its not loaded.

 

If I open up autocad without the acaddoc.lsp, I get notices of all the customization files loading successfully, then

 

AutoCAD menu utilities loaded.*Cancel*

Command: *Cancel*
FileTab
COMMANDLINE

Command:

Command:

 

If I open up autocad with my acaddoc.lsp, I get the following after the customizations load

 

AutoCAD menu utilities loaded. *Cancel*

Command: *Cancel*
FileTab
COMMANDLINE

Command:

Command:

Current settings: Hide layers, Viewports=Off

Regenerating layout.

ACADDOC.lsp loaded

 

The "ACADDOC.lsp loaded" above is what I have printed out so I know it loaded successfully, but is on the command line like its not finished.

0 Likes
2,915 Views
10 Replies
Replies (10)
Message 2 of 11

dmfrazier
Advisor
Advisor

If you post the contents (or at least the last few lines) of your custom acaddoc.lsp, it will be more likely that someone here will be able to track down the issue.  It might be simply a matter of a missing character.

0 Likes
Message 3 of 11

jjcrocco
Enthusiast
Enthusiast

Here is the code in its entirety, hope its ok to paste the whole file here.  Maybe I can learn something . . .

 

; ***** Acaddoc.lsp - CARTLAND KRAUS ENGINEERING - created 2001-10-10 /UPDATED 2016-10-8 JJC (FORMERLY CK.LSP) *****
;
;    For AUTOCAD 2016
;
;The following lisp programs are automatically loaded with this file:
;
;plot
;save
;all
;pmsel
;ctu
;ctd
;phead (paper space)
;phead2 (model space)
;psborder
;c2elayer
;c2elayer2
;c2elt
;psetups
;startup
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco 10-18-01
;Redefined plot to automatically select plotstamp based on setup routine selected.
;Also reloads all xrefs, and reloads all images prior to plotting AND
;prevents psetups from loading within psetup drawing.
;
;
(setvar "cmdecho" 0)
;
;
(DEFUN C:PLOT ()
(if (/= (getvar "dwgprefix") "J:/AUTOCAD sHARED/TEMPLATE/")(PSETUPS));prevent psetups to load into the default psetups drawing overwriting it --2016-10-08 REVISED--original
;(if (/= (getvar "dwgprefix") "\\ck\share2\AUTOCAD sHARED\TEMPLATE\")(PSETUPS));this path does not work - changed path in options to use J:/
 ;(delimg);;;;;deleted 03-22-07 should be no longer needed
 (plott)
 (setq xreflist (listloadedxrefs))    
  (if xreflist             ;will be nil if none are loaded 
  (foreach xrefname xreflist     
  (command "-xref" "reload" xrefname)))    
  (setq imagelist (ListLoadedImages))    
  (if imagelist            ;nil if none are loaded  
    (foreach imagename imagelist    
      (command "-image" "reload" imagename)))
   (command "-image" "R" "*");ADDED 8-1-03
  ;(COMMAND ".IMAGE" "")
 ;(COMMAND "REGEN");;;;;;;;;;removed to speed up plotting on 3-23-07
 ;(command "-plot" "" "" "" "HP Designjet 800 42 by HP.pc3" "n" "y" "n");added 10-24-06 to prevent error on plotting
 (command "-plot" "" "" "PREVIOUS PLOT" "" "n" "y" "n");added 5-2-08 to allow previous plotting
(initdia) (command ".Plot")
)
;;;
(DEFUN PLOTT ()
 (SETQ X (GETVAR "USERR5"))
 (IF (= X 1) (COMMAND "-PLOTSTAMP" "ON" ""))
 (IF (= X 0) (COMMAND "-PLOTSTAMP" "OFF" ""))
(PRINC)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;removed 3-23-07 (but kept for reference)
;(DEFUN DELIMG ()
;   (if (assoc 3(dictsearch (namedobjdict) "acad_image_dict"))
;       (PROGN
;         (command "-image" "d" "mcc-bw")
;         (PROMPT "MCC-BW DELETED")
;       )
;   )
; (PRINC)
😉
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun listloadedxrefs (/ bname blist result)   ;helped by Adam Wueller
  (foreach bname (table "block")    ;
    (setq blist (entget (tblobjname "block" bname)))  ;
    (if (and (= 4 (logand (cdr (assoc 70 blist)) 4))  ;
             (= 32 (logand (cdr (assoc 70 blist)) 32)))  ;
      (setq result (cons bname result))))   ;
  result)       ;
;;;        ;
(defun TABLE (S / D R)      ;
  (while (setq D (tblnext S (null D)))    ;
    (setq R (cons (cdr (assoc 2 D)) R))    ;
    )        ;
  )        ;
;;;        ;
(defun ListLoadedImages (/ imagedict images result)  ;
  (setq imagedict (dictsearch (namedobjdict) "ACAD_IMAGE_DICT") ;
        images    (mapcar 'cons (sublist imagedict 3)  ;
                                (sublist imagedict 350))) ;
  (foreach image images      ;
    (if (= 1 (cdr (assoc 280 (entget (cdr image)))))  ;
      (setq result (cons (car image) result))))   ;
  result)       ;
;;;        ;
(defun sublist (alist key)     ;
  (apply 'append      ;
         (mapcar '(lambda (item)    ;
                    (if (eq (car item) key)   ;
                      (list (cdr item))))   ;
                 alist)))     ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco   02-11-02
;Saves the current date and the current drawing number in the CC titleblock.
;
(DEFUN C:SAVE ()
 (datemark)
(command-s ".save" "" "Y");10-4-06 added "Y" to prevent asking confirmation
;(command-s ".save" "" ); 12-3-2016 needed confirmation again in 2016 switch with above
 (QUOTE SAVED);added 8-1-03 to show saved on command line
)
(DEFUN datemark ()
(setq wtf(rtos(getvar "CDATE")2 8))
(setq year(substr wtf 3 2)
      month(substr wtf 5 2)
      day(substr wtf 7 2))
(setq date(strcat month "/" day "/" year ))
(setq done nil n 1)
(setq wtf(ssget "x" '((2 . "datemark"))))
(if wtf(progn(setq wtf(ssname wtf 0))
              (setq wtf1(entget(entnext wtf)))
              (setq wtf1(subst(cons 1 date)(assoc 1 wtf1)wtf1))
              (entmod wtf1)
              (entupd wtf)
        )
)
(setq wtf nil year nil month nil day nil date nil)
;(princ);Edited out on 8-1
(setq dname (getvar "dwgname"))
(setq lgth (strlen dname))
(setq lgth-4 (- lgth 4))
(setq dwglc (substr dname 1 lgth-4))
(setq dwg (strcase dwglc))
(setq wtf(ssget "x" '((2 . "datemark2"))))
 (if wtf(progn(setq wtf(ssname wtf 0))
              (setq wtf1(entget(entnext wtf)))
              (setq wtf1(subst(cons 1 dwg)(assoc 1 wtf1)wtf1))
              (entmod wtf1)
              (entupd wtf)
        )
 )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(DEFUN C:ALL ()
 (setq pt1 (getvar "extmax"))
 (setq pt2 (getvar "extmin"))
 (command "select" "w" pt1 pt2 "")
 (princ "YOU'VE SELECTED EVERYTHING IN THE EXTENTS OF THE DWG. ")
 (princ "\nISSUE YOUR COMMAND & ANSWER `P' <ENTER> TO USE THIS SELECTION")
 (PRINC)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(DEFUN pmsel (/ s n index B1 s2 entname)
(DEFUN *ERROR* (err)
(print err)
(setq *ERROR* nil)
(terpri)
)
 (INITGET "Lines LAyer Circles Arcs PLines Blocks Text Solid POints")
 (setq type1 (getkword "\n ENTITY TYPE-Lines Circles Arcs PLines POints Blocks Text Solid <or LAyer>: "))
 (if (not (or (eq type1 "LAyer") (null type1)))
 (progn
  (setq type (cond
             ((eq type1 "Lines") "LINE") ((eq type1 "Circles") "CIRCLE")
             ((eq type1 "Arcs") "ARC") ((eq type1 "PLines") "POLYLINE")
             ((eq type1 "Blocks") "INSERT") ((eq type1 "Text") "TEXT")
             ((eq type1 "Solid") "SOLID") ((eq type1 "POints") "POINT")
             )
  )
  (setq assnum 0
  )
   (getjunk)
 )
 (progn
  (setq type (strcase(getstring "\nEnter name of desired layer <layer set>: "))
  )
   (if (eq type "")(setq type (getvar "CLAYER"))
   )
  (setq assnum 8)
   (getjunk)
 )
 )
 (if s2 s2 (progn (prompt "\n0 Found")))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco
;Copy text up command automatically scaled.
(DEFUN C:ctu (/ P sc)
 (while (= nil (setq p (entsel "\nSelect object: ")))
           (princ "\nNothing selected, try again.")
        )
        (setq sc (getvar "userr1"))
 (cond ((= sc 2.0) (command "copy" p "" "0,0" "0,26.624"))
  ((= sc 1.3325) (command "copy" p "" "0,0" "0,17.73824"))
  ((= sc 1.0) (command "copy" p "" "0,0" "0,13.312"))
  ((= sc 0.66625) (command "copy" p "" "0,0" "0,8.86912"))
  ((= sc 0.5) (command "copy" p "" "0,0" "0,6.656"))
  ((= sc 0.333125) (command "copy" p "" "0,0" "0,4.43456"))
  ((= sc 0.25) (command "copy" p "" "0,0" "0,3.328"))
 )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco
;Copy text down command automatically scaled.
(DEFUN C:CTD (/ P sc)
 (while (= nil (setq p (entsel "\nSelect object: ")))
           (princ "\nNothing selected, try again.")
        )
     (setq sc (getvar "userr1"))
 (cond ((= sc 2.0) (command "copy" P "" "0,0" "0,-26.624"))
  ((= sc 1.3325) (command "copy" p "" "0,0" "0,-17.73824"))
  ((= sc 1.0) (command "copy" P "" "0,0" "0,-13.312"))
  ((= sc 0.66625) (command "copy" p "" "0,0" "0,-8.86912"))
  ((= sc 0.5) (command "copy" p "" "0,0" "0,-6.656"))
  ((= sc 0.333125) (command "copy" p "" "0,0" "0,-4.43456"))
  ((= sc 0.25) (command "copy" p "" "0,0" "0,-3.328"))
 )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco
;inserts plan headings with proper scale. (paper space)
(DEFUN C:PHEAD (/ pt1 sc)
 (setq sc (getvar "userr1"))
 (setq pt1 (getpoint "insertion point: "))
 (cond ((= sc 2.0) (command "insert" "PLNTITL116" pt1 "1" "1" "0"));FOR 1/16"=1'
  ((= sc 1.25) (command "insert" "PLNTITL10" pt1 "1" "1" "0"));FOR 1"=10'
  ((= sc 2.5) (command "insert" "PLNTITL20" pt1 "1" "1" "0"));FOR 1"=20'
  ((= sc 3.75) (command "insert" "PLNTITL30" pt1 "1" "1" "0"));FOR 1"=30'
  ((= sc 5.0) (command "insert" "PLNTITL40" pt1 "1" "1" "0"));FOR 1"=40'
  ((= sc 6.25) (command "insert" "PLNTITL50" pt1 "1" "1" "0"));FOR 1"=50'
  ((= sc 7.5) (command "insert" "PLNTITL60" pt1 "1" "1" "0"));FOR 1"=60'
  ((= sc 1.3325) (command "insert" "PLNTITL332" pt1 "1" "1" "0"));3/32"=1'
  ((= sc 1.0) (command "insert" "PLNTITL" pt1 "1" "1" "0"));FOR 1/8"=1'
  ((= sc 0.66625) (command "insert" "PLNTITL316" pt1 "1" "1" "0"));3/16"=1'
  ((= sc 0.5) (command "insert" "PLNTITL14" pt1 "1" "1" "0"));FOR 1/4"=1'
  ((= sc 0.333125) (command "insert" "PLNTITL38" pt1 "1" "1" "0"));FOR 3/8"=1'
  ((= sc 0.25) (command "insert" "PLNTITL12" pt1 "1" "1" "0"));FOR 1/2"=1'
 )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco
;inserts plan headings with proper scale. (model space)
(DEFUN C:PHEAD2 (/ pt1 sc)
 (setq sc (getvar "userr1"))
 (setq pt1 (getpoint "insertion point: "))
 (cond ((= sc 2.0) (command "insert" "PLNTITL116-ms" pt1 "1" "1" "0"));FOR 1/16"=1'
  ((= sc 1.25) (command "insert" "PLNTITL10-ms" pt1 "1" "1" "0"));FOR 1"=10'
  ((= sc 2.5) (command "insert" "PLNTITL20-ms" pt1 "1" "1" "0"));FOR 1"=20'
  ((= sc 3.75) (command "insert" "PLNTITL30-ms" pt1 "1" "1" "0"));FOR 1"=30'
  ((= sc 5.0) (command "insert" "PLNTITL40-ms" pt1 "1" "1" "0"));FOR 1"=40'
  ((= sc 6.25) (command "insert" "PLNTITL50-ms" pt1 "1" "1" "0"));FOR 1"=50'
  ((= sc 7.5) (command "insert" "PLNTITL60-ms" pt1 "1" "1" "0"));FOR 1"=60'
  ((= sc 1.3325) (command "insert" "PLNTITL332-ms" pt1 "1" "1" "0"));3/32"=1'
  ((= sc 1.0) (command "insert" "PLNTITL-ms" pt1 "1" "1" "0"));FOR 1/8"=1'
  ((= sc 0.66625) (command "insert" "PLNTITL316-ms" pt1 "1" "1" "0"));3/16"=1'
  ((= sc 0.5) (command "insert" "PLNTITL14-ms" pt1 "1" "1" "0"));FOR 1/4"=1'
  ((= sc 0.333125) (command "insert" "PLNTITL38-ms" pt1 "1" "1" "0"));FOR 3/8"=1'
  ((= sc 0.25) (command "insert" "PLNTITL12-ms" pt1 "1" "1" "0"));FOR 1/2"=1'
 )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco 3-30-07
;Changes layer of the PAPERSPACE BORDER to DEFPOINTS.
(DEFUN C:psborder (/ SS)
 (progn
  (command "mview" pause pause)
  (SETQ SS (ENTLAST))
  (COMMAND "CHANGE" SS "" "PROP" "LAYER" "DEFPOINTS" "")
 )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco
;Changes layer of the last entity to that of the current existing layer.
(DEFUN C:C2ELAYER (/ SS E N)
     (SETQ SS (ENTLAST))
     (SETQ E (GETVAR "CLAYER"))
     (COMMAND "CHANGE" SS "" "PROP" "LAYER" E "")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco
;Same as C2LAYER except multiple entities.
(DEFUN C:C2ELAYER2 (/ SS E N)
     (SETQ SS (SSGET "P"))
     (SETQ E (GETVAR "CLAYER"))
     (COMMAND "CHANGE" SS "" "PROP" "LAYER" E "")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco
;Changes linetype X in blocks to current scale linetype.
(DEFUN C:C2ELT (/ sc X)
 (SETQ X (SSGET "X" (LIST (CONS 6 "X"))))
 (setq sc (getvar "userr1"))    
 (cond ((= sc 2.0) (COMMAND "CHANGE" X "" "PROP" "LT" "D116" "")); 1/16 scale
  ((= sc 1.3325) (COMMAND "CHANGE" X "" "PROP" "LT" "D332" "")); 3/32 scale
  ((= sc 1.0) (COMMAND "CHANGE" X "" "PROP" "LT" "D18" "")); 1/8 scale
  ((= sc 0.66625) (COMMAND "CHANGE" X "" "PROP" "LT" "D316" "")); 3/16 scale
  ((= sc 0.5) (COMMAND "CHANGE" X "" "PROP" "LT" "D14" "")); 1/4 scale
  ((= sc 0.333125) (COMMAND "CHANGE" X "" "PROP" "LT" "D38" "")); 3/8 scale
  ((= sc 0.25) (COMMAND "CHANGE" X "" "PROP" "LT" "D12" "")); 1/2 scale
  ((= sc 1.25) (COMMAND "CHANGE" X "" "PROP" "LT" "D10" "")); 1=10 scale
  ((= sc 2.5) (COMMAND "CHANGE" X "" "PROP" "LT" "D20" "")); 1=20 scale
  ((= sc 3.75) (COMMAND "CHANGE" X "" "PROP" "LT" "D30" "")); 1=30 scale
  ((= sc 5.0) (COMMAND "CHANGE" X "" "PROP" "LT" "D40" "")); 1=40 scale
  ((= sc 6.25) (COMMAND "CHANGE" X "" "PROP" "LT" "D50" "")); 1=50 scale
  ((= sc 7.5) (COMMAND "CHANGE" X "" "PROP" "LT" "D60" "")); 1=60 scale
 )    
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Custom commands by John Crocco 10-17-01 -- UPDATED 2016-10-08
;revised to use new printer configurations
;inserts plot styles into current drawing
(DEFUN PSETUPS (/ exprt)
;
;Remove all page setups prior to loading PageSetups
(vl-load-com)
(vlax-for i (vla-get-PlotConfigurations (vla-get-ActiveDocument (vlax-get-Acad-Object)))
(vl-catch-all-apply 'vla-Delete (list i))
)(princ)
;Removed embeded path for page set up.
   (setq exprt (getvar "expert"))
   (setvar "expert" 5);WAS 2
;   (if (wcmatch (getvar "platform") "*Version 5.1*") (command "._-PSETUPIN" "J:/Autocad Shared/template/plotconfig800.dwt" "*"));FOR WIN XP hp800 - save for future reference
   (command "._-PSETUPIN" "J:/Autocad Shared/template/plotconfig.dwt" "*");old path
   ;(command "._-PSETUPIN" "\\ck\share2\AUTOCAD sHARED\TEMPLATE\plotconfig.dwt" "*");12-28-16 updated path doesnt work, use old path
   (setvar "expert" exprt)
);end psetups
;
;(if (/= (getvar "dwgprefix") "J:/Autocad Shared/template/")(PSETUPS));prevent psetups to load into the default psetups drawing ;thus overwriting it
;;;MOVED the above TO PLOT TO LOAD WHEN PLOT COMMAND AND NOT WHEN LOADING DRAWING 10-30-06
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Remove all page setups prior to loading PageSetups
;(vl-load-com)
;(vlax-for i (vla-get-PlotConfigurations (vla-get-ActiveDocument ;(vlax-get-Acad-Object)))
;(vl-catch-all-apply 'vla-Delete (list i))
;)(princ)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(DEFUN S::STARTUP ()
 (setvar "cmdecho" 0)
 (COMMAND-s "undefine" "end")
 (COMMAND-s "undefine" "save")
 (COMMAND-s "undefine" "plot")
 (COMMAND-s "imageframe" "0") ;turns frame around image off, 0-2 options (see help) updated 10-08-16
 (command-s "snap" "off")  ;turns snapunit off for drawings with it on 2-5-04
;;
;; added commands for 2016
 (command-s "displayviewcubein2d" "off") ;turns off 3d cube in 2d 11-5-16
 (command-s "layiso" "s" "off" "off" "") ;turns layiso off so isolated objects are only on when using command 12-9-16
;; end of 2016
;;
;; added commands for 2017
;;
;; end of 2017
;;
 (setvar "textfill" 1)  ;turns text fill on added 3-19-04
 (setvar "ucsicon" 0)  ;turns off the ucs icon
 (setvar "filletrad" 0)  ;sets the fillet dimension to 0
 (setvar "PLINEGEN" 0)  ;allows corners of plines w/hidden lines to look correct
 (setvar "mirrtext" 0)  ;allows text to be mirrored so you can read it
 (setvar "regenmode" 1)  ;0 sets autoregening to off for speed, 1 stops the notification
 (setvar "menuecho" 0)  ;turns off all menu echos
 (setvar "filedia" 1)  ;allows dialog boxes to be used
 (setvar "PDMODE" 0)  ;makes points be a point, not an X or a +
 (setvar "blipmode" 0)  ;eliminates the blips on screen when picking
 (setvar "proxynotice" 0) ;eliminates the PROXY warning messages from popping up
 (setvar "mbuttonpan" 0) ;allows wheelmouse to work
 (setvar "isavepercent" 0) ;allows date and time to be saved correctly
 (setvar "trimmode" 1)  ;sets the fillet trim mode to trim
 (setvar "DIMASSOC" 0)  ;turns dimension association off
 (setvar "edgemode" 1)  ;to extend to an imaginary line
 (setvar "demandload" 3) ;demandload on when invoking command - not when starting drawing-07/10/07changed to 3
 (setvar "xloadctl" 2)  ;turns on demand loading; a copy of the reference file is opened
 (setvar "tspacetype" 2) ;sets mtext line type spacing to exactly
 (setvar "userr2" 0)  ;resets rev level to zero to invoke rev number question
 (setvar "celtype" "bylayer") ;sets current linetype to bylayer 04-28-03
 (setvar "maxsort" 1000) ;sets the layer sorting up to 1000 layers 03-08-04
 (setvar "gridmode" 0)  ;turns snap grid off
 (setvar "Lwdisplay" 0)  ;turns off Lineweights "LWT"
 (setvar "trayicons" 0)  ;turns off TRAYICONS
 (setvar "traynotify" 0) ;turns off TRAYNOTIFY
 (setvar "pickadd" 1)  ;allows multipicks for move, erase, etc - added 3-27-07
 (setvar "psltscale" 0)  ;allows linetypes to plot correctly in paperspace when drawn in modelspace, added 4-2-07
;;
;; added setvar for 2016
 (setvar "osnapz" 1)  ;sets specified point to current elevation preventing "lines are not coplainer" issues 11-5-16
 (setvar "navbardisplay" 0) ;turns off navigation bar 11-5-16
 (setvar "startup" 0)  ;adjusts start up 11-30-16 (was 2 but changed to 0 to allow template to open (12-29-16)
 (setvar "laylockfadectl" 0) ;Controls fade of Locked layers - between 0 & 90 11-30-16
 (setvar "xdwgfadectl" 0) ;Controls fade of xref's - between 0 & 90 11-30-16
 (setvar "selectioncycling" 0) ;turns off quick selection box 11-30-16
 (setvar "layerevalctl" 0) ;Turns off the evaluation and notification of new layers 11-30-16
 (setvar "layernotify" 0) ;Specifies when an alert displays when unreconciled new layers are found. 0 =off (no alarm) 11-30-16
 (setvar "qpmode" -1)  ;controls quick properties (values -2 to 2 with -1 default) 12-27-16
 (setvar "pickfirst" 1)  ;required to be set to1 (on) for qpmode and other functions to work. 12-27-16
 (setvar "selectionpreview" 2) ;controls the display of selection preview, 12-27-16
;; end of 2016
;;
;; added setvar for 2017
;(setvar "pdfshx" 1)  ;turns on or off the ability to print text in PDF (not used in 2016, not sure of setting yet)
;; end of 2017
;;
 (load "gettextlayer")  ;loads the get text layers routine
 (load "conv")   ;loads the conv program from 2002 to R14
 (load "ddchprop")  ;loads the ddchprop lisp
 (load "zz")   ;loads the lisp routine to insert blocks to scale
 (load "ssx")   ;loads the ssx.lsp routine
 (load "mtt")   ;loads the mtext lisp routine
 (load "dtt")   ;loads the dtext lisp routine
 (load "bw")   ;loads the black-to-white background lisp routine
 (load "c2textlyr")  ;loads the c2textlyr routine (used with GetTextLayer + others)
 (load "filletr0")  ;loads the fillet radius 0 lisp routine 07-18-06
 (load "cb")   ;loads the command to change all layers to color bylayer 07-22-07
(setvar "cmdecho" 0)
;;;;;;;;;;;;;
 (if (/= "Model" (getvar "ctab"))  ;looks for any model space and freezes them
   (command-s ".mview" "l" "on" "All" "") ;automatically when drawing is opened
   )      ;12-29-16 added -S to command
;;;;;;;;;;;;
(if (/= "Model" (getvar "ctab")) ;Changes shademode within viewports to "as displayed" to allow solids,
(command-s "mview" "S" "A" "All" "") ;arrows, and text to plot filled - added 4-5-07
)     ;12-29-16 added -S to command
;
;;;;;;;;;;;;Below removed as no longer needed, but kept for future reference
; (if (= "craig gutzmer" (getvar "loginname"))  ;prevents mbutton pan from loading
;   (setvar "mbuttonpan" 1)   ;on craigs computer
; );
;;;;;;;;;;;; BELOW WARNS IF ELEVATION IN CURRENT DRAWING IS NOT SET TO 0.0
(if (/= (getvar "elevation") 0)(alert " CAUTION!! Elevation is not 0.000"))
;;;;;;;;;;;;
;; (LOAD "ac_bonus2002") 2016-10-8 took off to allow use of new bonus routines.

 (princ "Cartland Kraus AcadDoc-JJC.lsp loaded")
 ;(setvar "cmdecho" 1)
 ;(princ)
);end of S::STARTUP
 (setvar "cmdecho" 1)

0 Likes
Message 4 of 11

dmfrazier
Advisor
Advisor

In your OP you wrote at the end:

 

"The "ACADDOC.lsp loaded" above is what I have printed out so I know it loaded successfully, but is on the command line like its not finished."

 

By way of a first "trouble-shot" I cannot find where you have added a line in the code to print this to the text screen, so I have to conclude that this line is generated by AutoCAD in response to the existence (and running) of the acaddoc.lsp file, and it may be that it does so regardless of whether or not the code actually runs through completely.

 

There is a lot to go through in this LSP, but I will see if I can find anything else as time allows. (I expect it to be a slow day, being Friday before New Year's, so I'm optimistic.) 

0 Likes
Message 5 of 11

jjcrocco
Enthusiast
Enthusiast

Thank you for your interest.  You are correct that it doesn't say that, because I used that phrase rather than say

 

princ "Cartland Kraus AcadDoc-JJC.lsp loaded" because I was trying to be descrete, so I was being generic in nature.  This is what is at the end of the file and prints out if it doesn't bomb out on the load.

 

It definitely prints this out.  If I take this line out, it prints nothing about it loading.

 

Sorry for any confusion.  Would be interested in hearing what you have to say, and thank you.

0 Likes
Message 6 of 11

dmfrazier
Advisor
Advisor

No problem.  Thanks for the explanation.

 

I'm probably operating at a little bit of a deficit here (sorry) because I'm running 2013, but maybe the following will lead to something useful.

 

In order to get your LSP to run through completely I had to remark out the entire "s::startup" function.  (I was getting an exception error I've never seen before. I'll try to figure that one out eventually, maybe.) In addition to that edit I copied your "Cartland Kraus AcadDoc-JJC.lsp loaded" prompt to the end of the file, after the line to turn cmdecho back on, so that I would be able to see it as an indicator of completion of the entire LSP and not just the startup function. (There was also one extra empty space in front of the cmdecho line, which I removed, but it seems to make no difference anyway.)  It runs through to the prompt, which occurs immediately after the "AutoCAD menu utilities loaded" line during launch or OPEN or NEW.

 

In your OP, where you copied the commandline prompts, there is the line: "AutoCAD menu utilities loaded. *Cancel*" followed by another cancel.  These suggest that there might be a problem within one or more of the CUI files (LSP defined in the CUI or loaded by it).  You might try a Google or forum search here using that line as the search criteria for suggested remedies. I wouldn't necessarily expect this sort of thing to cause the behavior you describe, but it might depend on the nature of the CUI issue, so it might be worth some effort.

 

One other suggestion I have, which probably won't solve the issue, is to make a slight change to your custom LSP load lines in your startup function.  Instead of, for example:

 

  (load "gettextlayer")

 

try:

 

  (princ (load "gettextlayer" "\n**Unable to load gettextlayer.lsp."))

 

By putting the load statement inside the princ function, if the load fails you get a prompt telling you so.

  

0 Likes
Message 7 of 11

jjcrocco
Enthusiast
Enthusiast

Very interesting info, especially on the Princ load suggestion.  I would have thought if it didn't load any one of those, it would bomb out, thus the reason for the Princ at the end.  Is it possible that one doesnt load and it would still finish with the princ?

 

I might try and edit the loads as you suggest, maybe there is something there not working.

 

 

The info for the *cancel* is very interesting.  Not sure how to troubleshoot that.  Maybe can try loading up a different, maybe even more simplistic CUI file.  If it doesn't show up then, it could help prove it has to do with the CUI that was loaded.

 

Will let you know if I find out anything.  THANK YOU!

 

 

0 Likes
Message 8 of 11

dmfrazier
Advisor
Advisor

Just to follow up on the cause of the exception error I mentioned I was getting earlier, it happens at this line in the s::startup function:

 

(command-s "layiso" "s" "off" "off" "") ;turns layiso off so isolated objects are only on when using command 12-9-16

 

If I disable this line, I get no errors. (I modified all of your custom LSP load lines with princ as I had described earlier so I get "unable to load" notifications for all but one; apparently there is a routine named "ssx" that is part of the Express Tools.) 

 

I can run the code on the commandline without any issue, but when it's part of the startup, it bombs there and leaves everything after it within the defun undone.  Since you were still getting your custom prompt, which comes after this in your startup function, it looks like this line runs okay in your case.

 

By the way, I would suggest you move the prompt (princ) to the end of the acaddoc.lsp rather than having it embedded in the s::startup function.  Or have a different prompt for each.  (If you do this, you will see that the prompts appear backwards of what you might expect.)  It also helps to add a "new line" code (\n) at the beginning of each prompt.

 

I suspect the source of your issue is not in this LSP, but somewhere in a CUI, MNL, or a related resource file.

 

Happy New Year.

 

0 Likes
Message 9 of 11

jjcrocco
Enthusiast
Enthusiast

Very Interesting.  Removing that one you found removes the "Current settings: Hide layers, Viewports=Off" line being printed, but doesn't fix the other stuff or the blue spinning circle.

 

SSX gets loaded further down the file.  I moved it up to the start of the S::Startup, but didn't make a difference.

 

I have played with the location of the princ for the acaddoc,lsp.  adding it at end of the S::Starup actually causes it to print out earlier rather than the last line.

 

I don't understand the syntax for the (\n) code and how to use it. I added it just like you shown, and it shows as unknown command.

 

So, was trying to figure out how it could be part of the CUI as those commands don't get ran when starting the drawing.  All of my commands (I think) in the CUI are in the custom toolbars or pulldowns, most are either preloaded with this S::Startup file, or I load them with an if statement once you pick the toolbar.

 

anyway . . . Happy new year and thanks.

 

0 Likes
Message 10 of 11

dmfrazier
Advisor
Advisor

"Removing that one you found removes the "Current settings: Hide layers, Viewports=Off" line being printed..."

 

That's because that is the normal AutoCAD response to executing that command.

 

"...but doesn't fix the other stuff or the blue spinning circle."

 

I didn't expect it would.

 

"SSX gets loaded further down the file.  I moved it up to the start of the S::Startup, but didn't make a difference."

 

I didn't mean to suggest that the SSX routine was implicated.  I only mentioned it in case your routine was merely a duplicate of the Express Tool, or in case you experience any confusing results when running the "command" (such as not getting what you expect because AutoCAD "finds" the Express Tool command first).

 

"I have played with the location of the princ for the acaddoc,lsp.  adding it at end of the S::Starup actually causes it to print out earlier rather than the last line."

 

I placed a princ within the startup defun and another, different one at the end of the acaddoc.lsp.  The one placed at the end appears on the commandline first, and the one embedded in startup appears second.  (This is as it should be, because the overall LSP code is loaded and ends with the prompt, and then the startup function runs, ending with its prompt.)

 

"I don't understand the syntax for the (\n) code and how to use it. I added it just like you shown, and it shows as unknown command."

 

This is the syntax:

  for startup - (princ "\nCartland Kraus startup function complete.")

  for acaddoc - (princ "\nCartland Kraus AcadDoc-JJC.lsp loaded")

 

The "\n" inside the double quotes says "write what follows on a new line".

 

"So, was trying to figure out how it could be part of the CUI as those commands don't get ran when starting the drawing.  All of my commands (I think) in the CUI are in the custom toolbars or pulldowns, most are either preloaded with this S::Startup file, or I load them with an if statement once you pick the toolbar."

 

Might be something in an MNL or something "migrated" from a previous release.  I'm afraid it's not going to be easy to figure this one out

0 Likes
Message 11 of 11

jjcrocco
Enthusiast
Enthusiast

Its all good info. Thank you.

 

I will need to see about the SSX command.  I understand what you are saying and it makes perfect sense, but not sure if the ssx command is alreay being loaded with the express tools.  If it is, I will remove it from being loaded here.  Didn't think about that one.

 

I did migrate, so it could be an issue with that.  My next station setting up I am thinking of not migrating and see how it goes.  My setup is soo customized, that the migration process doesn't seem to work for me anyway.

 

Thanks for all the help and have a great new years.

 

0 Likes