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
    26


    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
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    8,790


    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,854


    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


    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
    Certifiable AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    4,313


    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.
    Real pirates wear silk suits & ties, and write EULAs
    The only thing more dangerous to the liberty of a free people than big government, is big business.

    Toward a Sustainable Water Future: Visions for 2050 http://ascelibrary.org/doi/book/10.1061/9780784412077

  6. #6
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    4,862


    1 members found this post helpful.

    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
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Sincpac C3D ~ Autodesk Exchange Apps

  7. #7
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    8,790


    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
    South Eastern US, exact location unknown
    Posts
    1,589


    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.
    J. Murphy
    AKA
    Murph
    The former AutoCAD MAP3D Power User

  9. #9
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    4,862


    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))
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Sincpac C3D ~ Autodesk Exchange Apps

Similar Threads

  1. Hide Layout Tabs
    By Robert.Hall 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 acadwishlist 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.Hall 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
  •