@orange47 wrote:
Phil, could you please modify your lisp program so that it works with plines? it doesn't matter which node of pline is used as block coordinate. thanks.
I haven't worked with DCL, so I might not catch all the implications, but...
It looks to me as though it's already set up to do Polylines [despite not mentioning them in the prompt], though only of the "heavy" types. To do lightweight ones instead, in the .LSP file, add polyline to the selection prompt, and replace this:
....(/= REP_TYPE "POLYLINE")....
with this:
....(/= REP_TYPE "LWPOLYLINE")....
or to do it with either, with this:
....(not (wcmatch REP_TYPE "*POLYLINE"))....
But it uses a more-complicated-than-necessary way to check the type; I would be inclined to replace this whole thing:
....
(if (and (/= REP_TYPE "CIRCLE")(/= REP_TYPE "POLYLINE")(/= REP_TYPE "ARC")
(/= REP_TYPE "POINT")(/= REP_TYPE "INSERT")(/= REP_TYPE "TEXT")
(/= REP_TYPE "ELLIPSE"))
....
with this:
....
(if (not (wcmatch REP_TYPE "CIRCLE,*POLYLINE,ARC,POINT,INSERT,*TEXT,ELLIPSE"))
....
[that will also alow Mtext, which the original routine doesn't.]
It's using the (assoc 10) value from the entity data for all entity types. It would use the first vertex of a lightweight Polyline. You could even add LINE to the options, and it would use the starting end, and there are some other less-often-used entity types you could add, too [e.g. IMAGE]. If you want to include Lines, Splines and Xlines in addition to Polylines, you could replace *POLYLINE above with just *LINE.
[I'm not sure of the purpose of the distinction in the (cond) function that's treating Blocks and Text differently from everything else, so it could be that those two options could be combined.]
everything ok, inserted the block as file, works perfectly, thanks to author.
this is truly fantastic lisp program.
This is a very good program, which I have used with great effect.
It could be even more fantastic if it could apply rotation of the text entity to the inserted block.
I tried to look at the code, but I do not know lisp... 😞