Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

error: no function definition: VLAX-GET-ACAD-OBJECT

2 REPLIES 2
Reply
Message 1 of 3
JonYoung
642 Views, 2 Replies

error: no function definition: VLAX-GET-ACAD-OBJECT

I'm having a problem with using a lisp command and the tool bars. I try a custom command and this is what pops up. On the tool bars I can figure out. Ihave ADT 2007 and i dont know what to use ACAD or ADT. When I pick one and load all of my custom tools, Plus the google earth to autocad it loads but when i hit a button on my mouse ofr keyboard it shuts down autocad with out a working anyone know what is going on. Here is the lisp that i'm trying to do.

;;; Switch Tabs ;;;
;;; Created on 02-13-2008 ;;;
;;; ;;;
;;; If you need help let Jon Young ;;;


(defun c:q (/ ActDoc DocNumb LoCol TabList)

(setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object)))
(setq LoCol (vla-get-Layouts ActDoc))
(vlax-for i LoCol
(setq TabList (cons (cons (vla-get-Name i) (vla-get-TabOrder i))
TabList
)
)
)
(setq TabList (vl-sort TabList '(lambda (a b) (< (cdr a) (cdr b)))))
(setq TabList (append TabList (list (car TabList))))
(setvar "ctab"
(car (nth (1+ (vl-position
(assoc (getvar "ctab") TabList)
TabList
)
)
TabList
)
)
)
)

(defun c:qq (/ ActDoc DocNumb LoCol TabList)

(setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object)))
(setq LoCol (vla-get-Layouts ActDoc))
(vlax-for i LoCol
(setq TabList (cons (cons (vla-get-Name i) (vla-get-TabOrder i))
TabList
)
)
)
(setq TabList (vl-sort TabList '(lambda (a b) (< (cdr a) (cdr b)))))
(setq TabList (append TabList (list (car TabList))))
(setvar "ctab"
(car (nth (1- (vl-position
(assoc (getvar "ctab") TabList)
TabList
)
)
TabList
)
)
)
)

And this one dosnt work


(defun c:l1 ()
(command layiso)
)
(princ)



(defun C:l2 ()
(command layuniso)
)
(princ)
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: JonYoung

This is well known thing
Add (vl-load-com)
after:
(defun c:q (/ ActDoc DocNumb LoCol TabList)
(vl-load-com)
< rest code goes here >

~'J'~
Message 3 of 3
JonYoung
in reply to: JonYoung

I still get this error

q ; error: no function definition: VLAX-GET-ACAD-OBJECT

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost