Jump to content

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    22

  • SteveK

    20

  • CAB

    8

  • MSasu

    6

Top Posters In This Topic

Posted

Ta!

That's a good alternative.

Posted

Glad you like it. I have never seen the TabSelected property exposed to LISP.

Posted
Glad you like it. I have never seen the TabSelected property exposed to LISP.

 

Put it on the wishlist I think :)

 

vla-get-TabSelected

Posted

CAB, about your layout select program. I want to run it from another lisp to get the tab list. After I run it is there a way to retrieve the tablst variable? Or is setting tablst as a global variable the only way?

Thanks.

Posted

Steve,

Use this version & it will return the list or nil if none selected.

(defun GetTabList (/ dclfile dcl# layouts ptr tablist)
 (setq dclfile "LayoutSelect.dcl")
 (cond
   ((< (setq dcl# (load_dialog dclfile)) 0) ; Error 
    (prompt (strcat "\nCannot load " dclfile "."))
   )
   ((not (new_dialog "layoutselect" dcl#)) ; Error 
    (prompt (strcat "\nProblem with " dclfile "."))
   )
   (t ; No DCL problems: fire it up 
    (setq layouts (vl-sort (layoutlist) '<))
    (start_list "layouts")
    (foreach one layouts
      (add_list one)
    )
    (end_list)
   (action_tile "layouts" "(setq ptr $value)")
   (action_tile "ok" "(done_dialog 5)")
   (action_tile "cancel" "(done_dialog 1)")
    (setq action (start_dialog))
    (unload_dialog dcl#)
    (if (and ptr (= action 5)) ;  get the list of selections to list of numbers
      (setq ptr     (read (strcat "(" ptr ")"))
            tablist (mapcar '(lambda (x) (nth x layouts)) ptr))
    )
   ) ; end cond T
 ) ; end cond
 tablist
)

Posted

You're quite welcome.

Just after midnight here so I'll say good night, guess you're just getting up. :)

Posted

Getting up? Lol no it's the afternoon, I'm gearing up for home time. I think it would be Lee just getting up. :D

Posted
Yes, it is a function defined in the ai_utils.lsp in the ACAD Support folder :)

 

Try it at the command line :)

 

Lee,

I couldn't find that file anywhere - any Idea?

Posted
Try this:

(findfile "ai_utils.lsp")

 

Oops... yeah, I kinda forgot the extension :oops:

Posted

That did it! Thanks!

 

It was under

"C:\\program files\\autocad civil 3d 2010\\support\\ai_utils.lsp"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...