Hi,
Here's a way, it returns the number of times the selected object has been exactely duplicated.
If you don't want to match some properties (layer, color and so on...), had their DXF code to the list in the (vl-remove-if ...) expression.
(defun c:duplicated? (/ ent ss)
(and
(setq ent (car (entsel)))
(setq ss (ssget "_X"
(vl-remove-if
'(lambda (x) (member (car x) '(-1 5)))
(entget ent)
)
)
)
(alert (strcat "\nObject duplicated "
(itoa (1- (sslength ss)))
" times."
)
)
)
(princ)
)