(defun c:int (/ all all2 allcif buk bukn bukx1 bukx2 bukxy1 bukxy2 buky1 buky2 cif cifn cifx1 cifx2 cifxy1 cifxy2 cify1 cify2 coor cor cor2 int intt nam namm pl1 pl2 ) ;;;;;;;;;;;;;;;;;;;; ;SELECT AXIS WITH LETTERS AND GROUP THEM IN LIST ;��������� ����� � ����� � �� ������� � ���� (setq all '()) (setq all2 '()) (setq coor '()) (setq intt nil) (alert "\nSELECT AXIS WITH 'A' 'B' 'C' ... \nWHEN YOU ARE READY PRES - ENTER -") (setq pl1 (entsel "\nSELECT AXIS WITH LETTERS: ")) (progn (while (/= pl1 nil) (setq coor '()) (setq nam (entget (car pl1))) (setq cor (assoc 10 nam)) (setq buk (getstring "\nWHICH LETTER IS THE AXIS: ")) (while (/= cor nil) (setq coor (cons cor coor)) (setq nam (vl-remove cor nam)) (setq cor (assoc 10 nam)) );end while ;(princ coor) (setq all (cons (cons (reverse coor) buk) all)) (setq pl1 (entsel "\nSELECT AXIS WITH LETTERS: ")) );end while (setq all (reverse all)) );end progn ;;;;;;;;;;;;;;;;;;;; ;SELECT AXIS WITH THE NUMBERS AND GROUP THEM IN LIST ;��������� ����� � ����� � �� ������� � ���� (alert "\nNOW SELECT AXIS WITH NUMBER \nWHEN YOU ARE READY PRES - ENTER -") (setq pl2 (entsel "\nSELECT AXIS WITH NUMBER: ")) (progn (while (/= pl2 nil) (setq coor '()) (setq namm (entget (car pl2))) (setq cor2 (assoc 10 namm)) (setq cif (getstring "\nWHICH NUMBER IS THE AXIS: ")) (while (/= cor2 nil) (setq coor (cons cor2 coor)) (setq namm (vl-remove cor2 namm)) (setq cor2 (assoc 10 namm)) );end while (setq all2 (cons (cons (reverse coor) cif) all2)) (setq pl2 (entsel "\nSELECT AXIS WITH NUMBER: ")) );end while (setq all2 (reverse all2)) );end progn (princ) ;;;;;;;;;;;;; ;INTERSECT POINTS FROM FIRST LIST AND SECOND LIST (repeat (length all) (setq allcif all2) (setq bukX1 (car (cdr (caaar all))) bukY1 (cadr (cdr (caaar all))) bukX2 (car (cdr (car (cdr (caar all))))) bukY2 (cadr (cdr (car (cdr (caar all))))) bukN (cdr (car all)) bukXY1 (list bukX1 bukY1) bukXY2 (list bukX2 bukY2) ) (repeat (length all2) (setq cifX1 (car (cdr (caaar allcif))) cifY1 (cadr (cdr (caaar allcif))) cifX2 (car (cdr (car (cdr (caar allcif))))) cifY2 (cadr (cdr (car (cdr (caar allcif))))) cifN (cdr (car allcif)) cifXY1 (list cifX1 cifY1) cifXY2 (list cifX2 cifY2) ) (setq int (inters bukXY1 bukXY2 cifXY1 cifXY2 T)) (setq allcif (cdr allcif)) (setq intt (cons (cons int (strcat bukN cifN)) intt)) ) (setq all (cdr all)) ) (setq intt (reverse intt)) ;try2 is the name of the block ;Use your block with only one attribute for this lisp (repeat (length intt) (command "_INSERT" "try2" "_Scale" 1.0 "_Rotate" 0 "_none" (car (car intt)) (cdr (car intt)) ) (setq intt (cdr intt)) ) (princ) ) (prompt "\nDate create: February 2020 \nLisp start with command: Int \n At line 103 change try2 with your block name \nThe lisp work only with plines, \n1.Select pline \n2.Write which letter is the line \n3.When you are ready pres ENTER \n4.Select line \n5.Write which number is the line \n6.When you are ready pres ENTER \nIF YOU WANT THIS MEESEGE TO DISSAPEAR AT LINE 113 CHANGE alert WITH prompt")