Evaluates an expression in VBA.
Signature
VBA : object.Eval(Expression)
VL : (val-Eval Expression)
(vla-eval applic (strcat
"MsgBox \"Hello Everybody\"" ", "
"vbInformation" ", "
"\"AfraLisp\""))
- Object : Application
The object or objects this method applies to.
- Expression : String; input-only
The expression to be evaluated.
Remarks
This method allows Automation clients to execute a line of VBA code in
the context of the current project without creating modules and
functions.
Example :
(defun c:al-eval ()
(vl-load-com)
(setq applic (vlax-get-acad-object))
(vla-eval applic (strcat "MsgBox \"Hello Everybody\"" ", "
"vbInformation" ", " "\"AfraLisp\""))
(vla-eval applic (strcat "MsgBox \"Are You Fine?\"" ", "
"vbQuestion" ", " "\"CAD Encoding\""))
(vla-eval applic (strcat "MsgBox \"Or, are you not Well?\"" ", "
"vbCritical" ", " "\"VBA Expresso\""))
(alert "\nAnd this is the boring\nAutoCAD message box!!")
(princ)
);defun
|
|