Strange.. the code is not even supposed to invoke the Layer command. whee did that come from?
EDIT: I see now, it gives that error if none found(the code doesnt include much errorr trapping in testing phase) perhaps enitites on locked layer?
Quick Fix:
Code:(setq objs (ssget ":L" '((0 . "*LINE,ARC,CIRCLE")))) .... (if (> (sslength Dupss) 1) (command "_chprop" objs "R" Dupss "" "p" "Layer" "Duplicates" "") (princ "\nNo Duplicates Found:")) (princ) )
You can add this to David's Code
It will create a layer for every Type of Entity Found i.e. If duplicate lines are found it will createCode:(ssdel en ss)) (if (setq i (sslength (setq objs (eval (read (strcat "S" e)))))) (repeat i (setq ent_e (entget (ssname objs (setq i (1- i))))) (entmod (subst (cons 8 (strcat "Dup_" e))(assoc 8 ent_e) ent_e)) ) ) )) (prin1))
Dup_LINES layer and so on..
Hope this helps




Reply With Quote
(the code doesnt include much errorr trapping in testing phase) perhaps enitites on locked layer?
)


Bookmarks