Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
pbejse
Posts: 2,500
Registered: ‎11-24-2009
Message 11 of 11 (142 Views)

Re: Navigate Viewports

01-12-2013 09:48 AM in reply to: Lineabove

Lineabove wrote:

EXCELLENT !

 

Thank you.


Glad you found what you need Lineabove

 

FWIW: Heres a mini rouitne to demonstrate CTAB [from an old routine of mine]

 

(defun c:tab ( / CDiaStr ListBoxDia StrDiaFnme lname)
;;;	pBe 12Jan2013	;;;
(defun CDiaStr (/ fnSTR)
  (setq StrDiaFnme
         (vl-filename-mktemp "tmp.DCL" ))
  (setq fnSTR (open StrDiaFnme "a"))
  (write-line
    "dcl_settings : default_dcl_settings { audit_level = 3; }
  ListofLayoutTabs : dialog 
  { label = \"\"; key= \"Base\";
  : list_box { key = \"StrListS\"; 
  width = 20; height = 20; } spacer ;
  ok_cancel;
  }" fnSTR )
  (close fnSTR)
  T
  )

(defun ListBoxDia  (DiaName Title Lst / el x)
            (setq StrDIA (load_dialog StrDiaFnme))
            (if (not (new_dialog DiaName StrDIA))
                  (exit)
                  )
            (start_list "StrListS")
            (mapcar 'add_list Lst)
            (end_list)
            (set_tile "Base" Title)
            (action_tile "StrListS" "(setq el (get_tile $key))")
            (action_tile "accept" "(done_dialog 1)(setq x T)")
            (action_tile "cancel" "(done_dialog 0)")
            (start_dialog)
            (unload_dialog StrDIA)
            (if x (read (strcat "(" el ")")))
            )
(cond ((and
	(CDiaStr)
	(setq lname (ListBoxDia
	   "ListofLayoutTabs"
	   "Select Layout Name"
	   (layoutlist)))
	   (vl-file-delete StrDiaFnme)
           (setvar 'ctab (nth (car lname) (layoutlist))
           )
        )
       )
      )
      (princ)
  )

 

HTH

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!