See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: Variable for Hide Layout/Model tabs

  1. #1
    Member
    Join Date
    2007-11
    Location
    Pune
    Posts
    36
    Login to Give a bone
    0

    Question Variable for Hide Layout/Model tabs

    Hello All
    what is the variable for Hide Layout/Model tabs.
    (The option is available on context menu & in Options->Display->Layout Elements)

    Thanks
    Yogesh

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Variable for Hide Layout/Model tabs

    It is not a system variable, but stored in the registry here:
    HKCU\Software\Autodesk\AutoCAD\Rxx.x\ACAD-xxxx:xxx\Profiles\[profile_name]\Drawing Window\ShowTabs

    You can control it at the command line like this:

    Code:
    
    
    (setenv "ShowTabs" "1")
    (setenv "ShowTabs" "0")
    
    
    R.K. McSwain | CAD Panacea |

  3. #3
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Variable for Hide Layout/Model tabs

    It is also set by workspaces in the CUI.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  4. #4
    Member
    Join Date
    2010-02
    Posts
    12
    Login to Give a bone
    0

    Default Re: Variable for Hide Layout/Model tabs

    Could someone be more specific about how to find it in the CUI. Somehow my tabs disappeared and I can't figure out how to get them back. The box is checked in options to show model and layout tabs. It's driving me nuts. Thanks.

    p.s. I also tried (setvar "Showtabs" "1"), didn't work.

  5. #5
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Variable for Hide Layout/Model tabs

    setenv and setvar are _not_ the same thing

    Also, when you are using setenv to manipulate environment settings, case sensitivity matters -- SHOWTABS is not the same as ShowTabs or showtabs or Showtabs.

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    1

    Default Re: Variable for Hide Layout/Model tabs

    Here's another way:

    Code:
    (defun c:TABS  ()
      ;; © RenderMan 2011
      (vl-load-com)
      (if (= :vlax-true
             (vla-get-displaylayouttabs
               (cond (*prefsDisplay*)
                     ((setq *prefsDisplay*
                             (vla-get-display
                               (vla-get-preferences (vlax-get-acad-object))))))))
        (progn
          (vla-put-displaylayouttabs *prefsDisplay* :vlax-false)
          (prompt "\n** Layout tabs: Off ** "))
        (progn
          (vla-put-displaylayouttabs *prefsDisplay* :vlax-true)
          (prompt "\n** Layout tabs: On ** ")))
      (princ))
    [edit]
    Simplified version:

    Code:
    (defun c:TABS ()
      ;; © RenderMan 2011
      (if (= "1" (getenv "ShowTabs"))
        (progn
          (setenv "ShowTabs" "0")
          (prompt "\n** Layout tabs: Off ** "))
        (progn
          (setenv "ShowTabs" "1")
          (prompt "\n** Layout tabs: On ** ")))
      (princ))
    [/edit]
    Last edited by RenderMan; 2011-03-08 at 04:41 PM. Reason: Typo
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  7. #7
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Variable for Hide Layout/Model tabs

    Quote Originally Posted by templedesignllc View Post
    p.s. I also tried (setvar "Showtabs" "1"), didn't work.
    That is because you used "setvar" not "setenv" and the string is case sensitive.
    Try again: (setenv "ShowTabs" "1")
    R.K. McSwain | CAD Panacea |

  8. #8
    Geospatial Moderator Jmurphy's Avatar
    Join Date
    2000-11
    Location
    TN/KY Area
    Posts
    1,640
    Login to Give a bone
    0

    Default Re: Variable for Hide Layout/Model tabs

    Quote Originally Posted by RenderMan View Post
    Here's another way:

    Simplified version:

    Code:
    (defun c:TABS ()
      ;; © RenderMan 2011
      (if (= "1" (getenv "ShowTabs"))
        (progn
          (setenv "ShowTabs" "0")
          (prompt "\n** Layout tabs: Off ** "))
        (progn
          (setenv "ShowTabs" "1")
          (prompt "\n** Layout tabs: On ** ")))
      (princ))
    [/edit]
    Instead of the prompt I like
    (alert "Wax ON")
    or
    (alert "Wax OFF")
    The Karate Kid movie has been on all the past week.

  9. #9
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Variable for Hide Layout/Model tabs

    Quote Originally Posted by Jmurphy View Post
    Instead of the prompt I like
    (alert "Wax ON")
    or
    (alert "Wax OFF")
    The Karate Kid movie has been on all the past week.


    Code:
    (defun c:FOO (/ onOff)
      (initget 1 "ON OFF")
      (if (= "ON" (setq onOff (getkword "\n\"Wax On\", or \"Wax Off\"? [On/oFf]: ")))
        (command "._browser" "http://mhs9192.com/clipart/80s%20chi...0WAX%20OFF.jpg")
        (command "._browser" "http://www.yourkloset.com/wp-content...gin-Waxing.jpg"))
      (princ))
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Similar Threads

  1. Hide Layout Tabs
    By robert.1.hall72202 in forum AutoCAD General
    Replies: 9
    Last Post: 2007-09-24, 01:07 PM
  2. Add Right Click Menu to Hidden Model/Layout Tabs
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2007-09-21, 07:40 AM
  3. Hide Layout/Model tabs in every drawing
    By robert.1.hall72202 in forum AutoCAD General
    Replies: 5
    Last Post: 2007-06-19, 02:11 PM
  4. Model / Layout tabs are missing
    By stephen.coff in forum AutoCAD General
    Replies: 3
    Last Post: 2007-06-14, 06:07 AM
  5. Replies: 2
    Last Post: 2006-07-27, 04:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •