ACA-AMEP: Edit Property Data Via AutoLISP, Part 3

First article in the series.
Previous article in the series.

In the previous article, we used a while loop to examine each Property Set in the collection of Property Sets attached to the object of interest, comparing each Property Set’s Name to the name of the Property Set that holds the Property whose value is to be changed. At this point, there are two possible conditions:

  1. A matching Property Set was found. The value in the Property Set counter variable, iPSet, was set to one more than the number of Property Sets in the collection (variable iPSets).
  2. A matching Property Set was not found. The value in the Property Set counter variable, iPSet, will be equal to the number of Property Sets in the collection (variable iPSets).
(cond    ; Cond A.
((= iPSet iPSets)
;; If the Property Set is not found after processing all attached property sets, issue prompt.
(prompt
(strcat
"nProperty Set "
sPSet
" not found on object passed to argument obj. "
) ;_ End...

Read more