Search the Community
Showing results for tags 'if function'.
-
Request a variable and set a new variable with If function
Manuel_Kunde posted a topic in AutoLISP, Visual LISP & DCL
Hi, I'm trying to query the variable "Weight" and if it has the content "50" I want to define a new variable: "Stamp" with the content "internal". Is WCMATCH the right command for this? (if (= wcmatch Weight "50") (progn (setq stamp "intern"))) (princ) -
(defun gp:getPointInput (/ StartPt EndPt HalfWidth) (if (setq StartPt (getpoint "\nStart point of path: ")) (if (setq EndPt (getpoint StartPt "\nEndpoint of path: ")) (if (setq HalfWidth (getdist EndPt "\nhalf-width of path: ")) T ) ) ) ) I thought the syntax for the if function was: (if (test expression) (expression) (optional expression) ) What is the purpose of using 'if' in the above code?