Author Topic: make a tool palette current  (Read 2108 times)

0 Members and 1 Guest are viewing this topic.

Fishing4Lsp

  • Guest
make a tool palette current
« on: June 23, 2009, 02:52:28 PM »
Hello,

I have so many tool palettes. I've already grouped most of them.
But still I have so many tabs. 

Is there a way that auto/visual lisp can make a certain tool palette current,
or be on top?

Thanks.

GDF

  • Water Moccasin
  • Posts: 2081
Re: make a tool palette current
« Reply #1 on: June 23, 2009, 03:36:19 PM »
Code: [Select]
(defun ARCH:QUESTION-5  (TT LN1 LN2 LN3 LN4 LN5 / X1 X2 txmsg buttons)
  (setq X1 "     Please Make a Selection\n")
  (setq X2
         "-----------------------------------------------------------------------------------------------------------------------\n")
  (setq txmsg (strcat X1 X2 LN1 LN2 LN3 LN4 LN5))
  (setq buttons (list "Option [ 1 ]" "Option [ 2 ]"))
  (dos_msgboxex txmsg (strcat ARCH#LOGO " : " TT) buttons 4))

(defun TOOLIT  (/ tmp)
  (defun A_P-TP  (/ pathstr)
    (setq pathstr "V:\\ARCH\\ToolPalette")
    (command "*_toolpalettepath" pathstr)) 
  (defun BLK-TP  (/ pathstr)
    (setq pathstr "V:\\ARCH\\Custom_Architettura\\Bloc\\ToolPalette_Blks")
    (command "*_toolpalettepath" pathstr))
  (defun CUS-TP  (/ pathstr)
    (setq pathstr "C:\\ARCH_Custom\\ToolPalette")
    (command "*_toolpalettepath" pathstr))
  (defun DTL-TP  (/ pathstr)
    (setq pathstr "V:\\ARCH\\Custom_Architettura\\Bloc\\ToolPalette_Dtls")
    (command "*_toolpalettepath" pathstr)) 
  (defun HAT-TP  (/ pathstr)
    (setq pathstr "V:\\ARCH\\Patterns\\ToolPalette")
    (command "*_toolpalettepath" pathstr))
  (defun TOOL-IT  (/ result)
    (initget "A B C D H")
    (setq tmp (getkword
                "\n* Select Tool Palette Path:  <A>rch Program   <B>locks   <C>ustom   <D>etails   <H>atches *"))
    (initget 7)
    ;;disallow null,zero & negative
    (cond ((= tmp "A") (A_P-TP))
          ((= tmp "B") (BLK-TP))         
          ((= tmp "C") (CUS-TP))
          ((= tmp "D") (DTL-TP))
          ((= tmp "H") (HAT-TP))         
    )
    (command "_ToolPalettes") ;;_ToolPalettesClose
  )
  (setq result (ARCH:QUESTION-5
                 "Tool Palettes"
                 "     Set the ''Tool Palette File Location'' for AutoCAD\n"
                 "     Select an option below..\n\n"
                 "     [ 1 ]  Set a Tool Palette\n"
                 "     [ 2 ]  Cancel routine...\n" ""))
  (cond ((= result 1)
         (princ "\n*** ///////// Program  CANCELLED ///////// ***"))
        ((= result 0) (TOOL-IT)))
  (princ))
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Crank

  • Water Moccasin
  • Posts: 1503
Re: make a tool palette current
« Reply #2 on: June 23, 2009, 03:45:29 PM »
command: TPNAVIGATE
Vault Professional 2023     +     AEC Collection

Fishing4Lsp

  • Guest
Re: make a tool palette current
« Reply #3 on: June 23, 2009, 03:51:28 PM »
Thanks guys...tpnavigate works best for me.

Fishing4Lsp

  • Guest
Re: make a tool palette current
« Reply #4 on: June 23, 2009, 03:54:46 PM »
Lets me it a little harder. Is there a way to get a list of the tool palettes loaded
in the current autocad session?