In a lisp, more routines
Following the example of post http://www.cadtutor.net/forum/showthread.php?31653-Lisp-coordinates-of-points-to-excel-sheet-(-point-number)&p=258931&viewfull=1#post258931, is it possible to put in one more routine operations to these settings at the beginning:1. Select a polyline (only LW)
2. Add a point (in current layer) at the intersection of lines or LW polylines with a selected polyline
3. Number the points of intersection (justification of the point of intersection)
3. Export numbered points to .txt file with coma separator N, Y, X, Z (if inserted points)
4. Break intersecting lines or polylines at points of intersection 2.)
5. Break selected polyline 1.)
6. If break selected polyline, convert segments polyline 5.) to lines
7. If convert segments to line, print segment length on the middle lines
Yes, its doable, but unfortunately I don't have much time to play withthis problem... I would do it differently... I would use(vla-intersectwith) method to obtain all intersections between LWPOLYand other entities or if all entities are LWPOLYS (I would use"plintav.lsp" from PLINETOOLS postedhere...In all situations I would then add vertices of intersections to LWPOLYwith the same algorithm like "plav.lsp" from PLINETOOLS... Then I wouldentmake texts numbering vertices of LWPOLY, make list of dotted pairs(cons pt no), where pt is list representing vertex point of LWPOLY and nointeger for numbering vertex, then I would write this info into CSV fileusing (setq f (open "c:/lwvertinfo.csv" "w")) and (write-line) functionthen (close f)... Then I would just explode LWPOLY into LINES and alsoentmake texts at each line mid point with its length (if its necessary Iwould align this texts to line entities using (angle '(0.0 0.0 0.0)(vlax-curve-getfirstderiv lin 0.0)), and for mid point for textinsertions I would use (mapcar '/ (mapcar '+ (cdr (assoc 10 (entgetlin))) (cdr (assoc 11 (entget lin)))) '(2.0 2.0 2.0)); for length I would just use (distance (cdr (assoc 10 (entget lin))) (cdr (assoc 11 (entget lin))))... Like you Marko use the pick pline as a "Fence" option to build the list of objects, eg dim house plans I just pick left side and right side and offset all done. Ps no post ncopyrited software.
Manually just use snap end,int and use a auto pt num routine then export to excel.
页:
[1]