Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pedit command

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
266 Views, 2 Replies

Pedit command

If I want to use the pedit command to make lines into plines
How would I write it along the following method?

( Command "pedit" ( the entity is selected) "yes" "join" (select
all entities to join) "" )

what I would like is for the user to select entities only once, so the
sequence is command / pedit / yes / join / then "select entities to join"
thanks to anyone who can help.....
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Hi Russell

Try this program:

(defun C:AutoJoin ( / CurSet FltLst FstEnt)
(setq FltLst '((0 . "POLYLINE,LWPOLYLINE,LINE,ARC"))
CurSet (cond ((ssget "I" FltLst)) ((ssget FltLst)))
)
(if CurSet
(progn
(setq FstEnt (ssname CurSet 0))
(if (member (cdr (assoc 0 (entget FstEnt))) '("LINE" "ARC"))
(command "_.PEDIT" FstEnt "_YES" "_JOIN" CurSet "" "")
(command "_.PEDIT" FstEnt "_JOIN" CurSet "" "")
)
)
)
(princ)
)

Have a good day...
Cheers
--
Juerg Menzi
MENZI ENGINEERING GmbH, Switzerland
http://www.menziengineering.ch


Kiwi Russ schrieb:
>
> If I want to use the pedit command to make lines into plines
> How would I write it along the following method?
>
> ( Command "pedit" ( the entity is selected) "yes" "join" (select
> all entities to join) "" )
>
> what I would like is for the user to select entities only once, so the
> sequence is command / pedit / yes / join / then "select entities to join"
> thanks to anyone who can help.....
Message 3 of 3
Anonymous
in reply to: Anonymous

Hi Jürg
thats great! many thanks......
Russell

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost