Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pljoin.lsp

67 views
Skip to first unread message

Joe

unread,
May 10, 2006, 11:41:52 AM5/10/06
to
I used for years, quite happily, a routine PLJOIN.LSP (c)1999 by Autodesk,
Inc. in Acad2000. It was a very quick way of joining a number of line,
pline, arc, etc, entities into a polyline. With a two key alias the moves
were: [PJ-Enter-Select entities-Enter-Enter]

Our office has recently moved to 2006 and pljoin fails about 95% of the
time. We are forced to use Polyline Edit which is twice as many keystrokes
[PE-Enter-M-Enter-Select entities-Enter-J-Enter-Enter] and just doesn't
seem to flow as well. It may seem a small thing, but after years of using
pljoin I seem to always stumble over the PEdit sequence.

So my theoretical question is: Why does pljoin fail in '06? What is so
different about the drawn entities?
My practical questions are: Has anyone modified the routine to work in the
'04-'06 series (and where can I find it)? And, if it hasn't been done yet,
can it be, practically -and I suppose- legally? My lsp skills are very
rudimentary; would someone be willing to take this on?

Thanks,
Joe


Pete

unread,
May 10, 2006, 10:49:08 PM5/10/06
to
I use this but you don't have the option to select entities so the results
may be a bit unpredictable if there are crossing entities. All you need to
do is select any entity in the group you wish to convert and it will convert
all connected entities into one polyline. It will only join lines, arcs,
and polylines. I have noticed that it has slowed down considerably in some
instances in acad 2006.

Pete

(defun c:pj ()
(setq closed 1)
(while closed
(while (not (setq ent (entsel "\nSelect object to convert: "))))
(setq elt (entget (car ent)))
(if (or (or
(= (cdr (assoc 70 elt)) 1)
(= (cdr (assoc 0 elt)) "CIRCLE"))
(= (cdr (assoc 42 elt)) (* 2 PI)))
;
(alert "OBJECT IS CLOSED
\nCAN'T JOIN OBJECTS") ;repeat loop
(setq closed nil); exit loop
);if
);while
;
;(prompt "\nSelect objects to join: ")
(setq ss (ssget "X"))
(cond
((or (= (cdr (assoc 0 elt)) "LINE") (= (cdr (assoc 0 elt)) "ARC"))
(command"PEDIT" ent "Y" "J" ss "" "")
)
((or (= (cdr (assoc 0 elt)) "LWPOLYLINE") (= (cdr (assoc 0 elt))
"POLYLINE"))
(command ".pedit" ent "j" ss "" "")
)
(T (alert "Object selected cannot be converted"))
)
(princ)
)

"Joe" <joe-nww_at_blackfoot.net> wrote in message
news:e3t1j...@enews4.newsguy.com...

R.K. McSwain

unread,
May 11, 2006, 8:38:41 AM5/11/06
to
Joe wrote:
>
> Our office has recently moved to 2006 and pljoin fails about 95% of the
> time. We are forced to use Polyline Edit which is twice as many keystrokes
> [PE-Enter-M-Enter-Select entities-Enter-J-Enter-Enter] and just doesn't
> seem to flow as well. It may seem a small thing, but after years of using
> pljoin I seem to always stumble over the PEdit sequence.

Maybe this would help.

(defun c:pljoin ()
(setvar "peditaccept" 1)
(princ "\nSelect objects ")
(setq sset (ssget))
(command "._pedit" "_M" sset "" "_J" "0.0" "")
)

--
R.K. McSwain
http://rkmcswain.blogspot.com

0 new messages