![]() AutoCAD Visual LISP / AutoLISP:: Leader And Block Count Nov 29, 2011. Get A Block Count Without Opening DWG Object DBX; AutoCAD Visual LISP / AutoLISP:. I used this code in a drawing to count how many entities there per layer. Prints a report of the number of objects on each layer in a drawing. Hello dear Masters, My name is Sean and I'm very new to this Lisp programming. It's like 2 weeks now and I begin to frustrate that I can't get my code work. First thing I was able to make the lisp to count the blocks being selected and i was very happy to it. Then I decided to name the blocks also that is being selected. I know about the command ' BCOUNT' but older versions of AutoCAD has no bcount command yet (Autocad 2010) I really wanted to learn LISP stuffs but gets stuck every time. Please help me with this code. I've been to many sites and still can't figure out what to do next. Thank you in advance masters. Reposting according to guidelines.I hope. ![]() Hello Sean, A company I worked for a decade ago used the following code to display each block name and the number of instances each appear. It was probably found/copied via forums like this one. There's no documentation as to who wrote this code, nor how old it really is. If anyone recognizes it as theirs, my sincere gratitude for the use! When you run BLKLST and it asks you to Select Objects, type ALL. F2 to show the list. Hope it works how you need it. (defun C:BLKLST (/ BLKS CHK I J K L L1 N BNAME ENAME EDATA BLIST BNUM BNAME1 BNAME2 TEMP1 TEMP2 ) (princ ' nUse standard selection methods to ') (setq BLKS (ssget (list (cons 0 'INSERT')))) (setq L (sslength BLKS)) (setq L (- L 1)) (setq I 0) (setq BLIST (list 'BLOCK NAMES')) (setq BNUM (list 'INSTANCES')) (while ( key to hide the text screen after viewing results. ') (princ) );_ end of defun;(princ; ' n Blocklst loaded. Start command by typing BLOCKLST ';(princ). Thank You so much Sir @Lee mac and Sir ORgrown for providing me LISPs. I will study those lisp that you've shared to me. As what i've seen on Sir @Lee Mac's programs, my expression was like 'ahhhH! How does he do this codes?' How do you really? I wanna know. Sir @ORgrown there's still many things for me to learn in order to understand that lisp you showed, some are familiar codes but still, i gotta learn more. This will be my first step in creating a LISP. Thank you so much Masters!
0 Комментарии
Оставить ответ. |
АвторНапишите что-нибудь о себе. Не надо ничего особенного, просто общие данные. Архивы
Март 2019
Категории |