CADDIT CAD CAM CNC Software - download AutoCAD compatible design software progeCAD Alibre T-FLEX and more
CADDIT Website Knowledge Base Search:

progeCAD Help

Welcome to progeCAD
Working with progeCAD
Command Reference
CAD System Variables
Programming progeCAD
Full Index (caution - 400kb)

Further Links:

Download progeCAD
Register progeCAD


T-FLEX PLM tutorial (PDF)
progeCAD IntelliCAD and AutoCAD training 
CATIA 2D 3D design tutorial
Alibre CAD/CAM basic tutorial


Educational CAD Software Solutions
Python scripting for DOS and Windows
Other free software downloads
CADDIT CAD CAM Forum Australia

(setq symbol1 statement1 [symbol2 statement2] ...)

Set the symbol to the statement.

This function is LISP's most commonly-used assignment function. This function assigns statement1 to symbol1. For example:

(setq x 16)

sets the value of 16 to the symbol x.

NOTE Don't confuse this with the equals function (=. The = function doesn't assign.

Symbol1 is the variable that receives the value, where as statement1 is the value that is assigned to symbol1. Statement1 can be a variable representing a value, a numeric value, or a string.


Code Returns
(setq y 10) 10
(setq x y) 10
Sets the variable x to the value of y-previously we set y to 10.
(setq myvar "Mom") "Mom"
(setq pt1 '(5 3)) (5 3)

NOTE  You can set multiple variables at a time with the setq function. The [symbol2 stmt2]... is optional. When assigning multiple variables, the value returned is the last variable's assigned value.

Code Returns
(setq a 5 b 6) 6
(setq x 1.0y 2.0 z 3.0) 3.0

To see the value of any variable, type ! before the variable name:

Code Returns
!a 5
!b 6

(defun [c:] name ([arg1 arg2 ...] / [local-var1 local-var2 ...]) expression)

(lambda arguments expression ...)

(quote statement)

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language

CADDIT® is a registered trademark in Australia. All Rights Reserved. Comments concerning the content of this site should be addressed to our webmaster. progeCAD is a trademark of ProgeCAD srl. Autodesk® and AutoCAD® are both registered trademarks or trademarks of a third party, and used only for comparison purposes. All other trademarks, trade names or company names referenced herein are used for identification only and are the property of their respective owners. Legal and Terms of Use. Google. Find us on Google+.