Having trouble with if statement in lisp

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm sure that this is vairly easy, but its my first lisp and I'm having trouble adding an if statement. I am modifying another lisp to suit my needs, what i have added is in red.
My main goal is to set an if statement (if (Selcted txt = "10'", "5'", if( selected txt = "20'", "10'", if(etc.)
Any help at all would be great.
(defun c:test (/ vpObj fldObj vpID util fldtxt)
(vl-load-com)
(setq vpObj (vlax-ename->vla-object
(car (nentsel "\nSelect the viewport: "))
)
fldObj (vlax-ename->vla-object (car (nentsel "\nSelect the Field: ")))
vpID (vla-get-objectid vpObj)
);; setq
(if (> (vl-string-search "x64" (getvar "platform")) 0)
(progn
(setq util (vla-get-Utility
(vla-get-activedocument (vlax-get-acad-object))
)
vpID (vlax-invoke-method
util
"GetObjectIdString"
vpObj
:vlax-False
)
);; setq
);; progn
(setq vpID (vl-princ-to-string (vla-get-Objectid vpObj)))
);; if
(setq fldtxt (strcat "%<\\AcObjProp Object(%<\\_ObjId "
vpID
">%).TextString>%"
)
)
(vla-put-textstring fldObj fldtxt)
(vla-update fldObj)
(vla-regen (vla-get-activedocument (vlax-get-acad-object))
1
)
(setq gsfive "5'")
(setq gsten "10'")
;;if
(= fldtxt gsten)
(progn (gsfive)) ("ERROR")
(princ)
);; test