Author Topic: a lisp to keep my palettes in order  (Read 8052 times)

0 Members and 1 Guest are viewing this topic.

SKUI_BREAKER

  • Guest
a lisp to keep my palettes in order
« on: August 05, 2008, 09:40:20 AM »
i am thinking of making a lisp routine to keep my toll palettes in order because for some reason or nother they keep changes their position which is annoying
not even my workspace setting can keep them from where i want them i have to save 4-5 of the same workspaces and go thorugh about 3 -4 of them until they will come back to order. i have all of them anchored to the right side of the screen.
my favorite order is

properties
sheetset
tool palletes
xref
design center
calculator

ELOQUINTET

  • Guest
Re: a lisp to keep my palettes in order
« Reply #1 on: August 05, 2008, 10:03:31 AM »
just a tip, you should say what version of autocad you are using. i recommend putting this in your signature like i did so people can better assist you. i experienced this problem too but am working on an older version at the moment so can't help much. i just wondered what version you use and wanted to save you having to answer this question over and over.

Chris

  • Swamp Rat
  • Posts: 548
Re: a lisp to keep my palettes in order
« Reply #2 on: August 05, 2008, 10:09:51 AM »
I have something that I use, I am using 09 and the Layer palette can cause some serious performance issues, but I like to have it as the middle of my palettes anchored on the right of my screen so I wrote a little routine that will close my bottom palette, open the layer palette, and then open the third palette.
Code: [Select]
(defun c:la ()
  (if (= (getvar "layerdlgmode") 1)
    (progn
      (command "externalreferencesclose")
      (initdia)
      (command "layer")
      (command "externalreferences")
      )
    (progn
      (initdia)
      (command "layer")
      )
    )
) ;_ end of DEFUN
you could modify this for your use.  just issue closes to all palettes, then issue the palettes to open in the order you want them to appear.
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10

SKUI_BREAKER

  • Guest
Re: a lisp to keep my palettes in order
« Reply #3 on: August 05, 2008, 11:38:51 AM »
MY FIRST TRY WAS A COMPLETE FAILURE

BUT YOU LISP WORKED FINE
EXCEPT I CAN'T SEEM TO FIGURE OUT HOW TO ISSUE THE QUICK CALC COMMAND
FROM A LISP AND GET IT NOT OPEN UP RIGHT IN THE MIDDLE OF THE SCREEN.
I HAVE IT ANCHORED TO THE RIGHT BUT AND CTRL-8 "_QUICCALC" WORKS CORRECTLY FROM COMMAND LINE BUT NOT INSIDE A LISP.

Code: [Select]
(defun c:TP ()
       (command "_externalreferencesclose")
(command "_propertiesclose")
(command "'_qcclose")
(command "'_ToolPalettesClose")
(command "'_adcclose")
(command "'_SheetSetHide")
      (initdia)
       (command "_properties")
(command "_SheetSet")
(command "'_ToolPalettes")
(command "_externalreferences")
(command "'_adcenteR")
(command "_quickcalc"))
    (progn(initdia)) ;_ end of DEFUN

ronjonp

  • Needs a day job
  • Posts: 7527
Re: a lisp to keep my palettes in order
« Reply #4 on: August 05, 2008, 11:41:59 AM »
Dude,

You really should turn the CAPS LOCK off... :evil:

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

SKUI_BREAKER

  • Guest
Re: a lisp to keep my palettes in order
« Reply #5 on: August 05, 2008, 11:43:32 AM »
i am so use to it most of the time i dont remeber to.  :?

Chris

  • Swamp Rat
  • Posts: 548
Re: a lisp to keep my palettes in order
« Reply #6 on: August 05, 2008, 02:51:48 PM »
Code: [Select]
(defun c:TP ()
       (command "_externalreferencesclose")
(command "_propertiesclose")
(command "'_qcclose")
(command "'_ToolPalettesClose")
(command "'_adcclose")
(command "'_SheetSetHide")
       (command "_properties")
(command "_SheetSet")
(command "'_ToolPalettes")
(command "_externalreferences")
(command "'_adcenteR")
(initcommandversion 2)
(command "'_quickcalc")
) ;_ end of DEFUN
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: a lisp to keep my palettes in order
« Reply #7 on: August 05, 2008, 10:46:08 PM »
i am so use to it most of the time i dont remeber to.  :?
i hate that. we used to have this IT guy that would freak out if you sent your emails in caps. i would send an IT request about the data server being down, or whatever, and i would get back an immediate response telling me to stop yelling at him. our plan sets have to be in all caps, i forget to turn the caps lock off sometimes, but since it's all inner-office, it shouldn't matter. oh well.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

SKUI_BREAKER

  • Guest
Re: a lisp to keep my palettes in order
« Reply #8 on: August 06, 2008, 10:48:47 AM »
THAts exactly what i am saying who decided that typing in allcaps is yelling, it must be in that book "BLOGGING FOR DUMMY'S" i mean truly was there an email that was passed atound when the internet first started saying that all caps is yelling, i mean if i yell at dragon speak naturally it doesn't type everything i said in all caps.  i think what is considered yelling is when you put an excalmation point in a sentence. ex.    stop!!! being so picky about capslock.   now i will probably get booted for this post, because everyone these days are so thin skinned. 

ronjonp

  • Needs a day job
  • Posts: 7527
Re: a lisp to keep my palettes in order
« Reply #9 on: August 06, 2008, 11:14:00 AM »
There were some thin skinned people here but they left  :-D. I know that you are not intentionally yelling ... all caps just bugs me  :-P

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

deegeecees

  • Guest
Re: a lisp to keep my palettes in order
« Reply #10 on: August 06, 2008, 02:58:30 PM »
Here folks, add this to your acad.dvb thisdrawing module:

Code: [Select]
Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
 If CommandName = "TEXT" Or CommandName = "DTEXT" Or _
 CommandName = "DDEDIT" Or CommandName = "MTEDIT" Or _
 CommandName = "ATTEDIT" Or CommandName = "EATTEDIT" Or _
 CommandName = "DIMLINEAR" Or CommandName = "QLEADER" Or _
 CommandName = "MTEXT" Then
 'add any other command names you want caps on for
 'be sure to add them to the endcommand section below as well
   GetKeyboardState kbArray
   kbArray.kbByte(VK_CAPITAL) = 1
   SetKeyboardState kbArray
 End If
End Sub

Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
 If CommandName = "TEXT" Or CommandName = "DTEXT" Or _
 CommandName = "DDEDIT" Or CommandName = "MTEDIT" Or _
 CommandName = "ATTEDIT" Or CommandName = "EATTEDIT" Or _
 CommandName = "DIMLINEAR" Or CommandName = "QLEADER" Or _
 CommandName = "MTEXT" Then
   GetKeyboardState kbArray
   kbArray.kbByte(VK_CAPITAL) = 0
   SetKeyboardState kbArray
 End If
End Sub

...and you'll never be afflicted with the yelling disease again.

SKUI_BREAKER

  • Guest
Re: a lisp to keep my palettes in order
« Reply #11 on: August 06, 2008, 03:10:50 PM »
can it be turned off at will

i think i have a lisp that works with a reactor
problem is I can't turn the reactor off anymore like i use too.

it might also need another lisp which is called autolay 3.0
and i know that it needs a vlr-manager.fas and
another sub lisp to get things moving arch_vlr_command.lsp and capslock.lsp

i could have sworn i use to be able to turn off the reactor i know it says type autolay to toggle but it doesnt work.

oh and if you press shift while typing in autocad it will let you type in lowercase.

Code: [Select]
;|=====================================================================
Capslock.lsp complete with notes and all
For Autocad 2000x
Written by: Eric Schneider, Reno, NV
3/27/2002
cadking@aol.com
=======================================================================
This program automatically toggles the 'capslock' whenever a *text command
is encountered. Or it's supposed to anyway!
=======================================================================
This program requires VLR-Manager.fas and doslib2k.arx to be in the AutoCAD
support path for "capslock" to work (both supplied in the CapsLock.zip).
=======================================================================
Anyone is welcome to use modify this program or hack it to bits as long
as Eric Schneider, or any other names aforementioned, are not held
responsible for anything whatsoever and shall not be the subject of
vulgarities. Just leave the credits in it. Deal? Cool! Enjoy the freedom
of not having to toggle the 'capslock' key as much!
=======================================================================|;
;;;load VLISP extensions
(vl-load-com);initialize VLISP extensions

;;;load the reactor manager
(if (findfile "VLR-Manager")(member nil (atoms-family 1 '("vlr-manager" "vlr-family" "vlr-object" "vlr-object-p" "vlr-syntax")))
  (load "VLR-Manager")
)

;toggles autolay on and off
(defun c:capslock (/ funcs file)
  (setq funcs '(c:capslock cl:capslock))
  (if
    (and
      (not (vl-registry-read "HKEY_CURRENT_USER\\SOFTWARE\\AutoLay" "CapsLock"));is AutoLay turned on or off in the registry?
      (member nil (atoms-family 1 (mapcar 'vl-princ-to-string funcs)));are any AutoLay subfunctions not loaded
      (or
        (member (setq file "doslib2k.arx")(arx))
        (if (setq file (findfile file))
          (arxload file)
        )
      )
      (setq file (findfile "CapsLock.lsp"))
    )
    (progn
      (vl-registry-write "HKEY_CURRENT_USER\\SOFTWARE\\AutoLay" "CapsLock" "T");set registry for AutoLay enabled
      (load file);load "CapsLock.lsp"
    )
    (progn
      (vl-registry-delete "HKEY_CURRENT_USER\\SOFTWARE\\AutoLay" "CapsLock");set registry for AutoLay disabled
      (mapcar
       '(lambda (x)(set x nil));set all CapsLock subroutines to nil
        (vl-remove 'c:capslock funcs);except for the ones needed to re-enable AutoLay
      )
      (vlr-manager '(VLR-DWG-reactor nil '((:VLR-beginClose . cl:disable))) 1);remove reactor
      (vlr-manager '(VLR-Command-reactor nil '((:VLR-commandWillStart . capslock)(:VLR-commandEnded . capslock)(:VLR-commandCancelled . capslock))) 1);remove reactor
      (princ "\nUnloaded CapsLock.lsp")
    )
  )
  (princ)
)

;;;=======================================================================
(if (vl-registry-read "HKEY_CURRENT_USER\\SOFTWARE\\AutoLay" "CapsLock");if CapsLokc is enabled in the registry, continue loading
  (progn

(defun cl:capslock (reactor info / cmd crn);main body, togles 'capslock' key
  (setq cmd (strcase (car info))
        crn (vlr-current-reaction-name)
  )
  (if
    (or
      (wcmatch cmd "*LEADER,*QLEADER,*MTEXT,*TEXT,*DDEDIT,*ATTEDIT")
      (and
        (wcmatch cmd "DIM,DIMLINEAR,DIMALIGNED,DIMORDINATE,DIMRADIUS,DIMDIAMETER,DIMANGULAR,DIMBASELINE,DIMCONTINUE,QDIM,LEADER,QLEADER,MTEXT,TEXT,DDEDIT")
        (= (vlax-variant-value (vla-getvariable *adocobj* "dimaso")) 0)
      )
    )
    (cond
      ( (member crn '(:VLR-commandEnded :VLR-commandCancelled))
        (dos_capslock)
      )
      ( (= crn ':VLR-commandWillStart )
        (dos_capslock T)
      )
    )
  )
)

;;;======================================================================
;;;disables commandEnded reactor to avoid errors when using "new" and "open"
;;;in SDI mode. The error is merely annoying and only appears at the command
;;;line as "error: no function definition: capslock" when opening or creating
;;;a new drawing. The cause of the error is commandEnded reactor present form
;;;last dwg but LISP has not yet loaded the called function in a new or opened
;;;dwg. Furthermore, the reactor cannot be removed because it has already been
;;;activated and is waiting for the command to end. Therefore, the reactor must
;;;be rendered non-functional by changing its call to the LISP command "LIST".
(defun cl:disable (reactor info / tdat)
  (if
    (= (vlax-variant-value (vla-getvariable (vlr-data reactor) "sdi")) 1);in SDI mode?
    (vlr-reaction-set
      (car (vlr-object '(VLR-Command-reactor nil '((:VLR-commandWillStart . cl:capslock)(:VLR-commandEnded . cl:capslock)(:VLR-commandCancelled . cl:capslock)))))
      :VLR-commandEnded
      'list
    )
  );end if
);end defun

;;;======================================================================
;;;Here's where we construct the reactors to do all this cool stuff
(vlr-manager '(VLR-DWG-reactor (vla-get-activedocument (vlax-get-acad-object)) '((:VLR-beginClose . cl:disable))) 3)
(vlr-manager '(VLR-Command-reactor nil '((:VLR-commandWillStart . cl:capslock)(:VLR-commandEnded . cl:capslock)(:VLR-commandCancelled . cl:capslock))) 3)

;;;======================================================================
;;;get rid of old reactor if present. The reactor will be present, because in
;;;SDI mode, it's associated namespace is not destroyed, but has the new drawing
;;;loaded into it. At the time this file is loaded, this reactor is either not
;;;present or has been rendered useless (in SDI mode) at the closing of the last
;;;dwg and is excess loaded code bulk and should be removed. The VLR-MANAGER
;;;provides an easy means of doing this.
(vlr-manager '(VLR-Command-reactor nil '((:VLR-commandWillStart . cl:capslock)(:VLR-commandEnded . list)(:VLR-commandCancelled . cl:capslock))) 1)

;;;======================================================================
(princ "\nLoaded CapsLock.lsp\n")

  );end progn
  (princ "\nLoaded CapsLock.lsp. Type \"capslock\" to enable.")
);end if
(princ)
Code: [Select]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;;     This original Copyrighted routine has been modified...
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;controlled by arch_subroutines.lsp file

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;|
Also, be aware that returning to the previous layer with OldLayer
where OldLayer is a symbol for the layer that we are going to return to,
is often cause for an error; AutoCAD rejects that very often.

A safe way to return to the previous layer is this:
(if (/= (getvar "clayer") OldLayer)
    (vla-setvariable (vla-get-activedocument (vlax-get-acad-object))
"clayer" OldLayer)
)

Alfredo Medina
alfmedina@hotmail.com
|;

(defun ARCH_OldLayer ()
  (if (/= (getvar "clayer") OldLayer)
    (vla-setvariable (vla-get-activedocument (vlax-get-acad-object)) "clayer" OldLayer)
  )
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; VLR_COMMAND.lsp courtesy Peter Jamtgaard 2003

;;; Vlr Command is a function that will switch the active layer in a drawing.
;;; The reactor checks the command that is starting and if it recognizes it
;;; it will switch to a specified layer. If the layer doesn't exist it will
;;; create it with the color, linetype, and plottable setting provided.
;;; To load and run this program add the lines (load "vlr_command")(c:vlr_command)
;;; to your acaddoc.lsp or another autoloading lisp routine.

(defun VLR_COMMAND-IT () 
  (vl-load-com)
  (vlr-command-reactor nil '((:vlr-commandWillStart . startCommand))) 
  (vlr-command-reactor nil '((:vlr-commandEnded . endCommand)))
  (vlr-command-reactor nil '((:vlr-commandCancelled . cancelCommand)))
  (vlr-editor-reactor nil '((:vlr-commandwillstart . ARCH:COM1))) 
)
(princ "\n*** ------ Layer Reactor Activated. ------ ***")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ARCH:COM1 (CALL CALLBACK / COMLAYLST)
;;; List of corrusponding      commands layers  color linetype     plottable
  (setq COMLAYLST
         (list (list "DIMANGULAR" "dim" 4 "continuous"  :vlax-true)
               (list "DIMBASELINE" "dim" 4 "continuous" :vlax-true)
               (list "DIMCENTER" "dim" 4 "continuous" :vlax-true)
               (list "DIMCONTINUE" "dim" 4 "continuous"  :vlax-true)
               (list "DIMDIAMETER" "dim" 4 "continuous" :vlax-true)
               (list "DIMLINEAR" "dim" 4 "continuous"  :vlax-true)
               (list "DIMORDINATE" "dim" 4 "continuous" :vlax-true)
               (list "DIMRADIUS" "dim" 4 "continuous" :vlax-true)
               (list "QDIM" "dim" 4 "continuous" :vlax-true)
(list "DIMALIGNED" "dim" 4 "continuous" :vlax-true)

               (list "LEADER" "dim" 4 "continuous" :vlax-true)
               (list "QLEADER" "dim" 4 "continuous" :vlax-true)

               (list "DTEXT" "text" 4 "continuous" :vlax-true)
               (list "MTEXT" "text" 4 "continuous" :vlax-true)
               ;;(list "TEXT" "text" 4 "continuous" :vlax-true)

               (list "POINT" "X-PNTS" 7 "continuous" :vlax-true)

               (list "XREF" "XREF" 7 "continuous" :vlax-true)
         )
  )
  (foreach
         N COMLAYLST
    (if (= (strcase (car CALLBACK)) (strcase (car N)))
      (progn
        (make_layers
          (cadr N)
          (caddr N)
          (cadddr N)
          (car (cddddr N))
        )
        (setq n1 n)
        (vla-put-activelayer
          (vla-get-activedocument
            (vlax-get-acad-object)
          )
          (vlax-ename->vla-object
            (tblobjname "LAYER" (cadr N))
          )
        )
      )
    )
  ) 
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Make layers using activeX
(defun MAKE_LAYERS (LAY_NAM COLOR LTYPE PLOTL / LAYOBJ LAYSOBJ LTYPESOBJ)
  (setq CDWGOBJ (vla-get-activedocument
                  (vlax-get-acad-object)
                )
        LAYSOBJ (vla-get-layers CDWGOBJ)
  )
  (if (not (tblobjname "layer" LAY_NAM))
    (vl-catch-all-error-p
      (vl-catch-all-apply 'vla-add (list LAYSOBJ LAY_NAM))
    )
  )
  (setq LAYOBJ (vla-item LAYSOBJ LAY_NAM))
  (if (not (tblobjname "ltype" LTYPE))
    (progn
      (setq LTYPESOBJ (vla-get-linetypes CDWGOBJ))
      (vla-load LTYPESOBJ LTYPE (findfile "acad.lin"))
      (vlax-release-object LTYPESOBJ)
    )
  )
  (vla-put-layeron LAYOBJ :vlax-true)
  (if (/= (strcase (vla-get-name LAYOBJ)) (strcase (getvar "clayer")))
    (vla-put-freeze LAYOBJ :vlax-false)
  )
  (vla-put-lock LAYOBJ :vlax-false)
  (vla-put-color LAYOBJ COLOR)
  (vla-put-linetype LAYOBJ LTYPE)
  (vla-put-plottable LAYOBJ PLOTL) 
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;Kenny Ramage @ afralisp.com
(defun startCommand (calling-reactor
                     startcommandInfo
                     /
                     thecommandstart
                    )       
  (setq OldLayer (getvar "CLAYER")) 
  (setq OldLayern OldLayer)

  ;;(vlr-editor-reactor nil '((:vlr-commandwillstart . ARCH:COM1)))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun endCommand (calling-reactor
                   endcommandInfo
                   /
                   thecommandend
                  )
  (setq thecommandend (nth 0 endcommandInfo))
  (cond
    ((= thecommandend "DIMANGULAR") (ARCH_OldLayer))
    ((= thecommandend "DIMBASELINE") (ARCH_OldLayer))
    ((= thecommandend "DIMCENTER") (ARCH_OldLayer))
    ((= thecommandend "DIMCONTINUE") (ARCH_OldLayer))
    ((= thecommandend "DIMDIAMETER") (ARCH_OldLayer))
    ((= thecommandend "DIMLINEAR") (ARCH_OldLayer))
    ((= thecommandend "DIMORDINATE") (ARCH_OldLayer))
    ((= thecommandend "DIMRADIUS") (ARCH_OldLayer))
    ((= thecommandend "QDIM") (ARCH_OldLayer))
    ((= thecommandend "DIMALIGNED") (ARCH_OldLayer))
    ((= thecommandend "LEADER") (ARCH_OldLayer))
    ((= thecommandend "QLEADER") (ARCH_OldLayer))

    ((= thecommandend "DTEXT") (ARCH_OldLayer))
    ((= thecommandend "MTEXT") (ARCH_OldLayer))
    ;;((= thecommandend "TEXT") (ARCH_OldLayer))

    ((= thecommandend "POINT") (ARCH_OldLayer))

    ((= thecommandend "XREF") (ARCH_OldLayer))
  )
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun cancelCommand (calling-reactor
                      cancelcommandInfo
                      /
                      thecommandcancel
                     )
  (setq thecommandcancel (nth 0 cancelcommandInfo))
  (cond
    ((= thecommandcancel "DIMANGULAR") (ARCH_OldLayer))
    ((= thecommandcancel "DIMBASELINE") (ARCH_OldLayer))
    ((= thecommandcancel "DIMCENTER") (ARCH_OldLayer))
    ((= thecommandcancel "DIMCONTINUE") (ARCH_OldLayer))
    ((= thecommandcancel "DIMDIAMETER") (ARCH_OldLayer))
    ((= thecommandcancel "DIMLINEAR") (ARCH_OldLayer))
    ((= thecommandcancel "DIMORDINATE") (ARCH_OldLayer))
    ((= thecommandcancel "DIMRADIUS") (ARCH_OldLayer))
    ((= thecommandcancel "QDIM") (ARCH_OldLayer))
    ((= thecommandend "DIMALIGNED") (ARCH_OldLayer))
    ((= thecommandcancel "LEADER") (ARCH_OldLayer))
    ((= thecommandcancel "QLEADER") (ARCH_OldLayer))

    ((= thecommandcancel "DTEXT") (ARCH_OldLayer))
    ((= thecommandcancel "MTEXT") (ARCH_OldLayer))
    ;;((= thecommandcancel "TEXT") (ARCH_OldLayer))

    ((= thecommandcancel "POINT") (ARCH_OldLayer))

    ((= thecommandcancel "XREF") (ARCH_OldLayer))
  )   
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(VLR_COMMAND-IT)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(princ)
« Last Edit: August 06, 2008, 03:26:27 PM by SKUI_BREAKER »

Chris

  • Swamp Rat
  • Posts: 548
Re: a lisp to keep my palettes in order
« Reply #12 on: August 06, 2008, 03:12:41 PM »
Here folks, add this to your acad.dvb thisdrawing module:

Code: [Select]
Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
 If CommandName = "TEXT" Or CommandName = "DTEXT" Or _
 CommandName = "DDEDIT" Or CommandName = "MTEDIT" Or _
 CommandName = "ATTEDIT" Or CommandName = "EATTEDIT" Or _
 CommandName = "DIMLINEAR" Or CommandName = "QLEADER" Or _
 CommandName = "MTEXT" Then
 'add any other command names you want caps on for
 'be sure to add them to the endcommand section below as well
   GetKeyboardState kbArray
   kbArray.kbByte(VK_CAPITAL) = 1
   SetKeyboardState kbArray
 End If
End Sub

Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
 If CommandName = "TEXT" Or CommandName = "DTEXT" Or _
 CommandName = "DDEDIT" Or CommandName = "MTEDIT" Or _
 CommandName = "ATTEDIT" Or CommandName = "EATTEDIT" Or _
 CommandName = "DIMLINEAR" Or CommandName = "QLEADER" Or _
 CommandName = "MTEXT" Then
   GetKeyboardState kbArray
   kbArray.kbByte(VK_CAPITAL) = 0
   SetKeyboardState kbArray
 End If
End Sub

...and you'll never be afflicted with the yelling disease again.
I'm not a vba guy, could you somewhat explain how to load it, or add it?
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10

deegeecees

  • Guest
Re: a lisp to keep my palettes in order
« Reply #13 on: August 06, 2008, 03:18:49 PM »
First, make sure your acad.dvb is in your support path. Find it, and put it there.

In AutoCad, Alt+F11, then double click on the ThisDrawing module at upper left, and paste the provided code to the end of the file.

Clear as mud?

Chris

  • Swamp Rat
  • Posts: 548
Re: a lisp to keep my palettes in order
« Reply #14 on: August 06, 2008, 03:25:34 PM »
First, make sure your acad.dvb is in your support path. Find it, and put it there.

In AutoCad, Alt+F11, then double click on the ThisDrawing module at upper left, and paste the provided code to the end of the file.

Clear as mud?
is acad.dvb a user created file? never mind I answered my own question, the only acad.dvb files on my computer are in the sample folder should I copy this file to my support path, or should I just create a blank file?
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10