(princ (layercount:padbetween (strcat "\n" (car itm)) (itoa (cdr itm)) "." 61)) (foreach itm (vl-sort lst '(lambda ( a b ) (> (cdr a) (cdr b)))) (princ (layercount:padbetween "\nLayer" "Objects" " " 61)) (setq lst (layercount:assoc (vla-get-layer att) lst)) (foreach att (vlax-invoke obj 'getattributes) (= :vlax-true (vla-get-hasattributes obj)) (= "AcDbBlockReference" (vla-get-objectname obj)) (setq lst (layercount:assoc (vla-get-layer obj) lst)) (vlax-for blk (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) Prints a report of the number of objects on each layer in a drawing ![]() just the complete drawing count is correct again. ![]() It worked great for the first time, but when i wanted to use it on other drawings it doesnt show the correct values anymore. ![]() it shows the result in a Bricscad log window. I used this code in a drawing to count how many entities there per layer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |