@jlaidle1,
While your method does work, it draws an error if that property already exists. IMO it would be best to check for that property first. Here's my take:
(defun c:test (/ newProp)
(vl-load-com)
(setq newProp "Division2")
(if (not (PropertyExists newProp))
(vla-addcustominfo (vla-get-summaryinfo (vla-get-activedocument (Vlax-get-acad-object))) newProp "")
);if
(princ "\nComplete.")
(princ)
);defun
(defun PropertyExists (pName / sumInfo tmp eProp eVal)
;IN: pName - property name to search as string (NOT case sensitive)
;OUT: returns t if property exists, else nil
(setq sumInfo (vla-get-summaryinfo (vla-get-activedocument (Vlax-get-acad-object)))
tmp 0)
(vla-GetCustomByIndex sumInfo tmp 'eProp 'eVal)
(while (and (not (eq (setq eProp (strcase eProp)) (setq pName (strcase pName)))) (< (+ tmp 1) (vla-numcustominfo sumInfo)))
(setq tmp (1+ tmp))
(vla-GetCustomByIndex sumInfo tmp 'eProp 'eVal)
);while
(if (eq eProp pName) t nil)
);defun
...should be pretty easy to edit as you wish.
Best,
~DD