How this is supposed to work is the user will first select objects, then run the command. The routine will determine if either "DEC" or "CNF" is in the point description. If it is, place a block and some text.
Not sure why this is giving me an error now. It looks like it only errors after the IF statement triggers TRUE:
Command: ; error: no function definition: nil
(defun c:desc2 (/ ss x northng pnt eastng descr)
(vl-load-com)
(if (ssget ":S:E" '((0 . "AECC_COGO_POINT")))
(progn
(vlax-for x
(setq ss (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object))))
(setq pnt (vlax-get x 'number)
eastng (vlax-get x 'easting)
northng (vlax-get x 'northing)
descr (vlax-get x 'rawdescription)
);END setq
(if
(or
(= 0 (vl-string-search "DEC" descr))
(= 0 (vl-string-search "CNF" descr))
);END or
(
(command "text" "c" (list eastng northng) 0.5 0 descr)
(command "-insert" "nf_shrub_conifer" (list eastng northng) "" "" "")
);END if TRUE
);END if
);END vlax-for
);END progn
);END if
(princ)
)