Here is a simple “Hello World!” program written in AutoLISP (Visual LISP):
(setq message "Hello World!")
(princ message)
In this code:
(setq ...)
sets the value ofmessage
to the string “Hello World!”.(princ ...)
prints the value ofmessage
to the screen.
To run this code, you would typically open AutoCAD (or another application that supports Visual LISP), create a new script, and enter these lines. Then, you could execute the script by clicking the “Run” button or pressing F5. The output should be “Hello World!” displayed in a message box or printed to the console.
Note: In Visual LISP, the princ
function is used for printing text messages, whereas the print
function would return the string instead of printing it directly.
Text model: llama3
Image model: CHEYENNE