Glad you got it working, jpcadconsulating. You should implement Lee's suggestions (All of his comments up to the grammar part are necessary). Now, the real question is, do you understand your code (that's the important part)?
The basic structure (the conditional--IF in this case-) to your code now will be used in many, many situations. I had used another conditional statement, COND, and they are essentially the same at this point in your learning but so you know there is an important difference in how the two conditionals (IF and COND) operate. As an exercise/lesson take the two different structures in this thread (the IF and the COND) and convert them to simple statements (try to explain them using your own words).
For example, here is your code with Lee's necessary suggestions made.
(defun c:chkaecc
( / ss
) (alert "No AECC objects found in this drawing.") )
)
- Based on the condition of a variable; the existence of AECC objects,
- Convert the number of objects to a string and prompt the user of the number of AECC objects found.
- Otherwise, prompt the user that there are not any AECC members found.
And here is my COND structure for reference.
(defun c:chkaecc
( / ss
) )
(0)
)
)
" AECC objects found in this drawing."
)
)
)
The COND structure I posted would be:
- Convert the result of a conditional and prompt the user.
- First condition (the existence of AECC objects): The number of AECC objects found.
- Second condition (fail-safe/default): 0 if none were found.
This exercise is more important then the code you write. It is an essential task, and one that often gets overlooked by people just learning.