Who says you can't vl-bb-set functions?

Who says you can't vl-bb-set functions?

john.uhden
Mentor Mentor
586 Views
2 Replies
Message 1 of 3

Who says you can't vl-bb-set functions?

john.uhden
Mentor
Mentor

Well, only the AutoCAD help.

But here's a workaround example...

(setq x '(defun c:hello nil (alert "   HELLO\n   WORLD!")(princ)))
(vl-bb-set 'code x)
(eval (list (eval (vl-bb-ref 'code))))

Though @Sea-Haven is convincing me to use a script, I am still trying to be persistent in using vla-sendcommand on an xref.

I imagine that x really has no length limit, and you don't have to escape any quotes, so...

John F. Uhden

0 Likes
Accepted solutions (1)
587 Views
2 Replies
Replies (2)
Message 2 of 3

hak_vz
Advisor
Advisor
Accepted solution

Or use vl-propagate:

(setq xx '(defun c:hello nil (alert "   HELLO\n   WORLD!")(princ)))
(vl-propagate 'xx)
(eval (list (eval xx)))

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 3 of 3

john.uhden
Mentor
Mentor
Very cool!

John F. Uhden

0 Likes