Hi All,
I have this routine to use "polyline" when I want to edit att blocks however I just can use it when I have blocks in line.
I need to change this routine to work when the blocks is not in line. Can you help me to modify this LISP?
(defun af_VERTEX_LIST (AN_ENTITY / e d p vertex_list)
(setq e AN_ENTITY)
(setq d (entget e))
(if (= (cdr(assoc 0 d)) "LWPOLYLINE")
(progn
(foreach x d
(if (= 10 (car x))
(setq vertex_list (cons (append (cdr x)(list 0.0)) vertex_list))
)
)
)
)
(if (= (cdr(assoc 0 d)) "POLYLINE")
(progn
(setq e (entnext e))
(setq d (entget e))
(while (= "VERTEX" (cdr(assoc 0 d)))
(setq p (cdr(assoc 10 d)))
(setq vertex_list (cons p vertex_list))
(setq e (entnext e))
(setq d (entget e))
)
)
)
(setq vertex_list vertex_list)
)
Thank you.
That code only makes a list of a Polyline's vertices, adding 0 as the Z coordinate for a LWPolyline [whose entity data stores only XY coordinates for each vertex]. I think we need to see whatever does something with the Blocks you mention. Post more code, and/or a sample drawing with before and after conditions.
So, what do you want to do with those things? Select the stepping Polyline and the Blocks, and have them Moved to the perpendicular location on the Polyline? If so, will they always be in a similar relationship, i.e. always with orthogonal Polyline line [only] segments, and always Moving the Blocks in the same orthogonal direction as each other?
You mention "edit att blocks" in Post 1. Do you already have something that puts the number values in for the ?? Attributes, or are you looking for something to do that, in addition to Moving the Blocks? If so, what are the criteria for the numbering?
I could probably think of more questions.... Be as specific and detailed as you can.
With the code I have, I can edit a terminal fence (change the numbers) but only if the polyline is drawn horizontal. I am wondering if I can change the code so that I will be able to edit all the terminal on a page, from top to bottom, not just from side to side?
I've tried to edit all the terminals on one page with one polyline, which links the top row and the bottom row of terminals but this causes 'too many arguments' in autocad.
I hope this is more helpful.
Thank you.
Can't find what you're looking for? Ask the community or share your knowledge.