Toolbar control thru the Registry keys

Discussion in 'AutoCAD' started by Gary Fowler, Mar 21, 2005.

  1. Gary Fowler

    Gary Fowler Guest

    I want to be able to control a toolbar's position by way of reading and
    writing

    to the registry keys.



    For example: setting a toolbar position by reading the following registry
    key:

    show float 613 280 2



    Has anyone done this?



    I want to use vl-registry-write and vl-registry-read..I can do this part.
    How

    Do I set the toolbar position by reading the key?
     
    Gary Fowler, Mar 21, 2005
    #1
  2. Gary Fowler

    Matt W Guest

    This example is for Land Desktop 2005...

    You have to drill down to
    HKCU\Software\Autodesk\AutoCAD\R16.1\ACAD-308:409\Profiles\[Profile
    Name]\Toolbars\ACAD.TB_OBJECT_PROPERTIES then set it's string to something
    like this "show float 12 86 2". (The location: 12 & 86 and how many rows:
    2)

    HTH
     
    Matt W, Mar 21, 2005
    #2
  3. Gary Fowler

    ECCAD Guest

    First, Read the Key..then use command "-toolbar".. to
    Show, then, Move it. Something like:

    .....read the key..
    (command "-toolbar" "s" "Render" "")
    (command "-toolbar" "Render" "F" "100,100" "")
    .....write the key.

    This should 'ignore' the present location, and set it to
    a particular spot (this case 100,100)..and store it in
    the Key.

    Bob
     
    ECCAD, Mar 21, 2005
    #3
  4. Gary Fowler

    Gary Fowler Guest

    Thanks Matt and Bob...
    I have tried that and it doesnot work 100% of the time.

    The only wall I have gotten it to work 100% is to close down autocad with
    the
    toolbar in the position I want. I f I don't do this the toolbar is placed in
    the next
    row from the last top row (using my example).

    I can also get it to work 100% of the time if I first hide all toolbars and
    then float
    all toolbars and then set them thru the command line.

    Like in the code below:
    But I am looking for a better way.....................


    Code:
    
    (defun C:TBU  (/ TBLOCN PICK ECHO DCL_ID BUTTON TBLIST PICK TBFILE TB
    TBTOOL)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;toggle between small and large buttons
    ;;;Jason Piercey
    (defun toggleLargeButtons  (/ object)
    (setq object (vla-get-toolbars
    (vla-item (vla-get-menugroups (vlax-get-acad-object))
    "acad")))
    (if (= :vlax-true (vla-get-largebuttons object))
    (vla-put-largebuttons object :vlax-false)
    (vla-put-largebuttons object :vlax-true)))
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Misc
    Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (setq *vlxx-acadobject* nil) ; Initialize global variable
    (defun vlxx-AcadObject  ()
    (cond (*vlxx-acadobject*) ; Return the cached object
    (T (setq *vlxx-acadobject* (vlax-Get-Acad-Object)))))
    (defun vlxx-MenuGroups () (vla-get-menugroups (vlxx-AcadObject)))
    ;;;Returns a list of all defined menugroups
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (defun vlxx-MenuGroups-ListAll  (/ out)
    (vlax-for
    each  (vlxx-MenuGroups)
    (setq out (cons (vla-get-name each) out)))
    (reverse out))
    ;;;(vlxx-MenuGroups-ListAll)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (defun ax:ListToolbars  (groupName / mGroups mGroup lst)
    (vl-load-com)
    (if (not
    (vl-catch-all-error-p
    (setq mGroup (vl-catch-all-apply
    'vla-item
    (list (vla-get-menugroups (vlax-get-acad-object))
    groupName)))))
    (vlax-for
    tBar  (vla-get-toolbars mGroup)
    (setq lst (cons (vla-get-name tBar) lst)))))
    ;;;Returns a list containing the name of every toolbar in the specified menu
    group
    ;;;example--->(ax:ListToolbars "acad")
    ;;;example--->(ax:ListToolbars "arch")
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Toolbar Control
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (defun TBHIT  ()
    (setvar "cmdecho" 0)
    
    (setenv "CmdVisLines" "1")
    (command "toolbar" "ALL" "hide")
    (princ "\n* All Toolbars Hidden *")
    (princ))
    ;;;
    (defun TBH-ARCH  ()
    (setvar "cmdecho" 0)
    (command "toolbar" "arch.arch_program" "hide")
    (command "toolbar" "arch.arch_program-filex" "hide")
    (command "toolbar" "arch.arch_program-laysx" "hide")
    (command "toolbar" "arch.arch_program-drawx" "hide")
    (command "toolbar" "arch.arch_program-blocx" "hide")
    (command "toolbar" "arch.arch_program-dimsx" "hide")
    (command "toolbar" "arch.arch_program-symsx" "hide")
    (command "toolbar" "arch.arch_program-annox" "hide")
    (command "toolbar" "arch.arch_program-utilx" "hide")
    (command "toolbar" "arch.arch_layeri" "hide")
    (command "toolbar" "arch.arch_layerii" "hide")
    (command "toolbar" "arch.arch_layeriii" "hide")
    (command "toolbar" "arch.arch_layeriv" "hide")
    (command "toolbar" "arch.arch_sset" "hide")
    (command "toolbar" "arch.arch_calc-dist" "hide")
    (command "toolbar" "arch.arch_lisptools" "hide")
    (command "toolbar" "arch.arch_dimensioni" "hide")
    (command "toolbar" "arch.arch_dimensionii" "hide")
    (command "toolbar" "arch.arch_display" "hide")
    (command "toolbar" "arch.arch_draw" "hide")
    (command "toolbar" "arch.arch_format" "hide")
    (command "toolbar" "arch.arch_hatch" "hide")
    (command "toolbar" "arch.arch_misci" "hide")
    (command "toolbar" "arch.arch_miscii" "hide")
    (command "toolbar" "arch.arch_modifyi" "hide")
    (command "toolbar" "arch.arch_modifyii" "hide")
    (command "toolbar" "arch.arch_modifyiii" "hide")
    (command "toolbar" "arch.arch_offset" "hide")
    (command "toolbar" "arch.arch_spurge" "hide")
    (command "toolbar" "arch.arch_texti" "hide")
    (command "toolbar" "arch.arch_textii" "hide")
    (command "toolbar" "arch.arch_ql" "hide")
    (command "toolbar" "arch.arch_view" "hide")
    (command "toolbar" "arch.arch_xref" "hide")
    (command "toolbar" "arch.arch_act" "hide")
    ;;(command "toolbar" "express.TB_EXPRESS_TOOLS_STANDARD_TOOLBAR" "hide")
    (progn (if (/= (menugroup "STRU") nil)
    (command "toolbar" "STRU.STRU_Program" "hide"))
    (if (/= (menugroup "MECH") nil)
    (command "toolbar" "MECH.MECH_Program" "hide"))
    (if (/= (menugroup "ELEC") nil)
    (command "toolbar" "ELEC.ELEC_Program" "hide"))
    (if (/= (menugroup "CIVL") nil)
    (command "toolbar" "CIVL.CIVL_Program" "hide"))))
    ;;;
    (defun TBA-V_15  ()
    (setvar "cmdecho" 0)
    
    (setenv "CmdVisLines" "3")
    (command "toolbar" "ALL" "hide")
    (command "toolbar" "arch.arch_program-filex" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-laysx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-drawx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-blocx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-dimsx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-symsx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-annox" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-utilx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program" "float" "200,52" "1")
    (command "toolbar" "arch.arch_calc-dist" "float" "200,104" "1")
    (command "toolbar" "arch.arch_dimensioni" "float" "200,156" "1")
    (command "toolbar" "arch.arch_dimensionii" "float" "396,156" "1")
    (command "toolbar" "arch.arch_display" "float" "200,208" "1")
    (command "toolbar" "arch.arch_draw" "float" "200,260" "1")
    (command "toolbar" "arch.arch_hatch" "float" "327,260" "1")
    (command "toolbar" "arch.arch_format" "float" "200,312" "1")
    (command "toolbar" "arch.arch_layeri" "float" "200,364" "1")
    (command "toolbar" "arch.arch_layerii" "float" "643,364" "1")
    (command "toolbar" "arch.arch_layeriii" "float" "726,364" "1")
    (command "toolbar" "arch.arch_layeriv" "float" "785,364" "1")
    (command "toolbar" "arch.arch_lisptools" "float" "200,416" "1")
    (command "toolbar" "arch.arch_misci" "float" "259,416" "1")
    (command "toolbar" "arch.arch_miscii" "float" "407,416" "1")
    (command "toolbar" "arch.arch_modifyi" "float" "200,468" "1")
    (command "toolbar" "arch.arch_modifyii" "float" "556,468" "1")
    (command "toolbar" "arch.arch_modifyiii" "float" "798,468" "1")
    (command "toolbar" "arch.arch_offset" "float" "855,468" "1")
    (command "toolbar" "arch.arch_sset" "float" "200,520" "1")
    (command "toolbar" "arch.arch_spurge" "float" "313,520" "1")
    (command "toolbar" "arch.arch_texti" "float" "200,572" "1")
    (command "toolbar" "arch.arch_textii" "float" "523,572" "1")
    (command "toolbar" "arch.arch_ql" "float" "630,572" "1")
    (command "toolbar" "arch.arch_view" "float" "200,624" "1")
    (command "toolbar" "arch.arch_xref" "float" "200,676" "1")
    (progn (if (/= (menugroup "STRU") nil)
    (command "toolbar" "STRU.STRU_Program" "float" "800,52" "1")))
    (progn (if (/= (menugroup "MECH") nil)
    (command "toolbar" "MECH.MECH_Program" "float" "800,104" "1")))
    (progn (if (/= (menugroup "ELEC") nil)
    (command "toolbar" "ELEC.ELEC_Program" "float" "800,156" "1")))
    (progn (if (/= (menugroup "CIVL") nil)
    (command "toolbar" "CIVL.CIVL_Program" "float" "800,208" "1")))
    (princ "\n* All ARCH Toolbars Displayed *"))
    (defun TBA-V_16  ()
    (setvar "cmdecho" 0)
    
    (setenv "CmdVisLines" "3")
    (command "toolbar" "ALL" "hide")
    (command "toolbar" "arch.arch_program-filex" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-laysx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-drawx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-blocx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-dimsx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-symsx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-annox" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program-utilx" "float" "200,52" "1")
    (command "toolbar" "arch.arch_program" "float" "200,52" "1")
    (command "toolbar" "arch.arch_calc-dist" "float" "200,104" "1")
    (command "toolbar" "arch.arch_dimensioni" "float" "200,156" "1")
    (command "toolbar" "arch.arch_dimensionii" "float" "396,156" "1")
    (command "toolbar" "arch.arch_display" "float" "200,208" "1")
    (command "toolbar" "arch.arch_draw" "float" "200,260" "1")
    (command "toolbar" "arch.arch_hatch" "float" "327,260" "1")
    (command "toolbar" "arch.arch_format" "float" "200,312" "1")
    (command "toolbar" "arch.arch_layeri" "float" "200,364" "1")
    (command "toolbar" "arch.arch_layerii" "float" "626,364" "1")
    (command "toolbar" "arch.arch_layeriii" "float" "707,364" "1")
    (command "toolbar" "arch.arch_layeriv" "float" "765,364" "1")
    (command "toolbar" "arch.arch_lisptools" "float" "200,416" "1")
    (command "toolbar" "arch.arch_misci" "float" "257,416" "1")
    (command "toolbar" "arch.arch_miscii" "float" "407,416" "1")
    (command "toolbar" "arch.arch_modifyi" "float" "200,468" "1")
    (command "toolbar" "arch.arch_modifyii" "float" "556,468" "1")
    (command "toolbar" "arch.arch_modifyiii" "float" "798,468" "1")
    (command "toolbar" "arch.arch_offset" "float" "855,468" "1")
    (command "toolbar" "arch.arch_sset" "float" "200,520" "1")
    (command "toolbar" "arch.arch_texti" "float" "200,572" "1")
    (command "toolbar" "arch.arch_textii" "float" "510,572" "1")
    (command "toolbar" "arch.arch_ql" "float" "613,572" "1")
    (command "toolbar" "arch.arch_view" "float" "200,624" "1")
    (command "toolbar" "arch.arch_act" "float" "280,624" "1")
    (command "toolbar" "arch.arch_xref" "float" "200,676" "1")
    (progn (if (/= (menugroup "STRU") nil)
    (command "toolbar" "STRU.STRU_Program" "float" "800,52" "1")))
    (progn (if (/= (menugroup "MECH") nil)
    (command "toolbar" "MECH.MECH_Program" "float" "800,104" "1")))
    (progn (if (/= (menugroup "ELEC") nil)
    (command "toolbar" "ELEC.ELEC_Program" "float" "800,156" "1")))
    (progn (if (/= (menugroup "CIVL") nil)
    (command "toolbar" "CIVL.CIVL_Program" "float" "800,208" "1")))
    (princ "\n* All ARCH Toolbars Displayed *"))
    (defun TBAIT  ()
    (cond ((= (atoi (substr (getvar "acadver") 1 2)) 15) (TBA-V_15))
    ((= (atoi (substr (getvar "acadver") 1 2)) 16) (TBA-V_16)))
    (princ))
    (defun TBS7-V_15  ()
    (setvar "cmdecho" 0)
    
    (setenv "CmdVisLines" "3")
    (command "toolbar" "ALL" "hide")
    (command "toolbar" "acad.TB_STANDARD" "float" "100,100" "1")
    (command "toolbar" "acad.TB_OBJECT_PROPERTIES" "float" "100,100" "1")
    (command "toolbar" "acad.TB_REFEDIT" "float" "100,100" "1")
    
    (command "toolbar" "arch.arch_program" "float" "100,100" "1")
    (command "toolbar" "arch.arch_sset" "float" "100,100" "1")
    (command "toolbar" "arch.arch_draw" "float" "100,100" "1")
    (command "toolbar" "arch.arch_layeri" "float" "100,100" "1")
    (command "toolbar" "arch.arch_layeriii" "float" "100,100" "1")
    (command "toolbar" "arch.arch_layeriv" "float" "100,100" "1")
    (command "toolbar" "arch.arch_modifyiii" "float" "100,100" "1")
    (command "toolbar" "arch.arch_textii" "float" "100,100" "1")
    (command "toolbar" "arch.arch_ql" "float" "100,100" "1")
    ;;;
    (command "toolbar" "acad.TB_STANDARD" "top" "0,0")
    (command "toolbar" "acad.TB_OBJECT_PROPERTIES" "top" "0,1")
    (command "toolbar" "arch.arch_layeri" "left" "0,0")
    (command "toolbar" "arch.arch_draw" "left" "0,800")
    (command "toolbar" "arch.arch_textii" "left" "0,900")
    (command "toolbar" "arch.arch_ql" "left" "0,900")
    
    (command "toolbar" "arch.arch_program" "top" "600,0")
    (command "toolbar" "arch.arch_sset" "top" "800,0")
    (command "toolbar" "acad.TB_REFEDIT" "top" "800,1")
    (command "toolbar" "arch.arch_modifyiii" "top" "850,1")
    ;;(command "toolbar" "arch.arch_spurge" "top" "950,1")
    (command "toolbar" "arch.arch_layeriii" "top" "900,0")
    (command "toolbar" "arch.arch_layeriv" "top" "900,1")
    (princ "\n***    Fowler's Standard Toolbar Setup     ***")
    (princ))
    (defun TBS7-V_16  ()
    (setvar "cmdecho" 0)
    
    (setenv "CmdVisLines" "3")
    (command "toolbar" "ALL" "hide")
    (command "toolbar" "acad.TB_STANDARD" "float" "100,100" "1")
    (command "toolbar" "acad.TB_OBJECT_PROPERTIES" "float" "100,100" "1")
    (cond ((= (atoi (substr (getvar "acadver") 1 2)) 16)
    (command "toolbar" "acad.TB_LAYER" "float" "100,100" "1")))
    (command "toolbar" "acad.TB_REFEDIT" "float" "100,100" "1")
    
    (command "toolbar" "arch.arch_program" "float" "100,100" "1")
    (command "toolbar" "arch.arch_sset" "float" "100,100" "1")
    (command "toolbar" "arch.arch_draw" "float" "100,100" "1")
    (command "toolbar" "arch.arch_layeri" "float" "100,100" "1")
    (command "toolbar" "arch.arch_layeriii" "float" "100,100" "1")
    (command "toolbar" "arch.arch_layeriv" "float" "100,100" "1")
    (command "toolbar" "arch.arch_modifyiii" "float" "100,100" "1")
    (command "toolbar" "arch.arch_textii" "float" "100,100" "1")
    (command "toolbar" "arch.arch_ql" "float" "100,100" "1")
    (command "toolbar" "arch.arch_act" "float" "100,100" "1")
    
    ;;;
    (command "toolbar" "acad.TB_STANDARD" "top" "0,0")
    (command "toolbar" "acad.TB_REFEDIT" "top" "600,0")
    
    (command "toolbar" "arch.arch_program" "top" "850,0")
    (command "toolbar" "arch.arch_modifyiii" "top" "900,0")
    (command "toolbar" "arch.arch_ql" "top" "950,0")
    ;;;
    (cond ((= (atoi (substr (getvar "acadver") 1 2)) 16)
    (command "toolbar" "acad.TB_LAYER" "top" "0,1")))
    (command "toolbar" "acad.TB_OBJECT_PROPERTIES" "top" "800,1")
    (command "toolbar" "arch.arch_sset" "top" "900,1")
    (command "toolbar" "arch.arch_act" "top" "901,1")
    (command "toolbar" "arch.arch_layeri" "left" "0,0")
    (command "toolbar" "arch.arch_draw" "left" "0,800")
    (command "toolbar" "arch.arch_textii" "left" "0,900")
    (command "toolbar" "arch.arch_ql" "left" "0,900")
    (command "toolbar" "arch.arch_layeriii" "top" "900,0")
    (command "toolbar" "arch.arch_layeriv" "top" "900,1")
    (princ "\n***    Fowler's Standard Toolbar Setup     ***")
    (princ))
    (defun TBS7IT  ()
    (cond ((= (atoi (substr (getvar "acadver") 1 2)) 15) (TBS7-V_15))
    ((= (atoi (substr (getvar "acadver") 1 2)) 16) (TBS7-V_16)))
    (princ))
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Toolbar Utilities
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;Original Concept by Brenda Larson
    ;;;Modified by Gary Fowler
    ;|
    (defun xARCH:READ_TBU (/ FILE A)
    (setq TBFILE
    (findfile
    (strcat "" "ARCH_TUB.lst")
    )
    )
    (cond
    ((= TBFILE nil)(alert "Toolbar List file not found"))
    ((/= TBFILE nil)
    (progn
    (setq FILE (open TBFILE "r"))
    (while (setq A (read-line FILE))
    (setq TBLIST (cons A TBLIST))
    )
    (close FILE)
    (setq TBLIST (reverse TBLIST))
    (start_list "tbsel")
    (mapcar 'add_list TBLIST)
    (end_list)
    )
    )
    )
    )
    |;
    (defun ARCH:READ_TBU  ()
    (setq MPICK (atoi MPICK))
    (setq MENUSEL (nth MPICK MENULIST))
    (setq TBLIST (reverse (ax:ListToolbars MENUSEL)))
    (start_list "tbsel")
    (mapcar 'add_list TBLIST)
    (end_list))
    (defun ARCH:READ_MENU  ()
    (setq MENULIST (reverse (vlxx-MenuGroups-ListAll)))
    (start_list "menusel")
    (mapcar 'add_list MENULIST)
    (end_list))
    (defun TBSELECT  (/ TBSEL)
    (setq PICK (atoi PICK))
    (setq TBSEL (nth PICK TBLIST))
    (cond ((= TBLOCN "S") (command "TOOLBAR" TBSEL TBLOCN))
    ((= TBLOCN "L") (command "TOOLBAR" TBSEL TBLOCN ""))
    ((= TBLOCN "R") (command "TOOLBAR" TBSEL TBLOCN ""))
    ((= TBLOCN "T") (command "TOOLBAR" TBSEL TBLOCN ""))
    ((= TBLOCN "B") (command "TOOLBAR" TBSEL TBLOCN ""))
    ((= TBLOCN "H") (command "TOOLBAR" TBSEL TBLOCN))))
    (defun TBRESET  ()
    (mode_tile "show" 0)
    (mode_tile "left" 0)
    (mode_tile "right" 0)
    (mode_tile "top" 0)
    (mode_tile "bottom" 0)
    (mode_tile "hide" 0))
    (defun TBTOOLS  ()
    (cond ((= TBTOOL "0") (TBHIT))
    ((= TBTOOL "A") (TBAIT))
    ((= TBTOOL "7") (TBS7IT))))
    (defun ARCH:DISPLAY_TBU  (dpnam / x y tbslb)
    (setq TBSLB (findfile (strcat "" "ARCH_TBU.slb")))
    (cond ((= TBSLB nil) (alert "Web Slidelib file not found"))
    ((/= TBSLB nil)
    (progn (setq x (dimx_tile dpnam))
    (setq y (dimy_tile dpnam))
    (start_image dpnam)
    (slide_image 0 0 x y (strcat "ARCH_TBU" "(" dpnam ")"))
    (end_image)))))
    (defun ARCH:DISCIPLINE_TBU  ()
    (progn (if (/= (menugroup "STRU") nil)
    (progn (ARCH:DISPLAY-DRAW "stru")
    (mode_tile "stru" 0)
    (mode_tile "strux" 1)
    (set_tile "engineering" " Engineering")))
    (if (/= (menugroup "MECH") nil)
    (progn (ARCH:DISPLAY-DRAW "mech")
    (mode_tile "mech" 0)
    (mode_tile "mechx" 1)
    (set_tile "engineering" " Engineering")))
    (if (/= (menugroup "ELEC") nil)
    (progn (ARCH:DISPLAY-DRAW "elec")
    (mode_tile "elec" 0)
    (mode_tile "elecx" 1)
    (set_tile "engineering" " Engineering")))
    (if (/= (menugroup "CIVL") nil)
    (progn (ARCH:DISPLAY-DRAW "civl")
    (mode_tile "civl" 0)
    (mode_tile "civlx" 1)
    (set_tile "engineering" " Engineering"))))
    (princ))
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Main Program
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (setq TBLOCN "S")
    (setq PICK "0")
    (setq ECHO (getvar "CMDECHO"))
    (setvar "CMDECHO" 0)
    (setq TBTOOL nil)
    (setq ARCH#LOGO " Arch Program©")
    (setq ARCH#YEAR (substr (rtos (getvar "CDATE") 2 16) 1 4))
    (setq DCL_ID (load_dialog "ARCH_TBU.DCL"))
    (ARCH:DIALOG_POSITION "ARCH_TBU")
    (set_tile
    "set-title"
    (strcat ARCH#LOGO " : TBU                            Toolbar
    Utilities"))
    (set_tile
    "set-copyright"
    (strcat ARCH#LOGO " " ARCH#YEAR " for AutoCAD®"))
    (ARCH:READ_MENU)
    (mode_tile "show" 1)
    (mode_tile "left" 1)
    (mode_tile "right" 1)
    (mode_tile "top" 1)
    (mode_tile "bottom" 1)
    (mode_tile "hide" 1)
    (mode_tile "tbsel" 1)
    (mode_tile "stru" 1)
    (mode_tile "mech" 1)
    (mode_tile "elec" 1)
    (mode_tile "civl" 1)
    (cond ((= (menugroup "ARCH") nil) (mode_tile "TBS7" 1) (mode_tile "TBA"
    1))
    ((/= (menugroup "ARCH") nil) (ARCH:DISCIPLINE_TBU)))
    (action_tile "show" "(setq TBLOCN \"S\")(done_dialog 1)")
    (action_tile "left" "(setq TBLOCN \"L\")(done_dialog 1)")
    (action_tile "right" "(setq TBLOCN \"R\")(done_dialog 1)")
    (action_tile "top" "(setq TBLOCN \"T\")(done_dialog 1)")
    (action_tile "bottom" "(setq TBLOCN \"B\")(done_dialog 1)")
    (action_tile "hide" "(setq TBLOCN \"H\")(done_dialog 1)")
    (action_tile "TBH" "(setq TBTOOL \"0\")(done_dialog)")
    (action_tile "TBA" "(setq TBTOOL \"A\")(done_dialog)")
    (action_tile "TBS7" "(setq TBTOOL \"7\")(done_dialog)")
    (action_tile "strux" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "mechx" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "elecx" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "civlx" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "stru" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "mech" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "elec" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "civl" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "UNLOAD" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "resize" "(ARCH:DO_ACT-DONE $key)")
    (action_tile
    "menusel"
    "(setq mpick $value)(ARCH:READ_TBU)(mode_tile \"tbsel\" 0)")
    (action_tile "tbsel" "(setq pick $value)(TBRESET)")
    (action_tile "arch" "(ARCH:DO_ACT-DONE $key)")
    (action_tile "about" "(ARCH:ABOUT)")
    (action_tile "cancel" "(ARCH:CANCEL2)")
    (setq BUTTON (start_dialog))
    (if (= BUTTON 1)
    (TBSELECT))
    (TBTOOLS)
    (cond ((= op "arch") (PlaceARCHMenu))
    ((= op "stru") (C:STRU))
    ((= op "mech") (C:MECH))
    ((= op "elec") (C:ELEC))
    ((= op "civl") (C:CIVL))
    ((= op "strux")
    (STRU)
    (if (/= (menugroup "STRU") nil)
    (command "toolbar" "STRU.STRU_Program" "float" "800,52" "1"))
    ;;;(C:TBU)
    )
    ((= op "mechx")
    (MECH)
    (if (/= (menugroup "MECH") nil)
    (command "toolbar" "MECH.MECH_Program" "float" "800,104" "1"))
    ;;;(C:TBU)
    )
    ((= op "elecx")
    (ELEC)
    (if (/= (menugroup "ELEC") nil)
    (command "toolbar" "ELEC.ELEC_Program" "float" "800,156" "1"))
    ;;;(C:TBU)
    )
    ((= op "civlx")
    (CIVL)
    (if (/= (menugroup "CIVL") nil)
    (command "toolbar" "CIVL.CIVL_Program" "float" "800,208" "1"))
    ;;;(C:TBU)
    )
    ((= op "UNLOAD")
    (command
    "menuunload" "STRU" "menuunload" "MECH" "menuunload" "ELEC"
    "menuunload" "CIVL"))
    ((= op "resize") (toggleLargeButtons)))
    (unload_dialog DCL_ID)
    (setvar "CMDECHO" ECHO)
    (princ))
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (princ)
    
     
    Gary Fowler, Mar 21, 2005
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.