I have this but never tried it.
;; from Marc'Antonio Alessi (nospam_maalessi_at_tin_dot_it)
; #PlineJoinPrec = global
;
(defun C:ALE_PlJoin (/ SelSet FltLst OldLPr)
;(setvar "CMDECHO" 0) ; I have always = 0
(princ "\nSelect lines, arcs or polylines to join: ")
(setq OldLPr (getvar "LUPREC")) (setvar "LUPREC" 8)
(setq
FltLst
'((0 . "LWPOLYLINE,POLYLINE,LINE,ARC"))
#PlineJoinPrec
(ureal 5 "" "Precision distance" (cond ( #PlineJoinPrec ) ( 0.00001 )))
)
(setvar "LUPREC" OldLPr)
(cond
( (not (setq SelSet (cond ((ssget "_I" FltLst)) ((ssget FltLst)))))
(prompt "\nNo arc or polyline selected. ")
)
( (ssget "_P" '((0 . "LINE,ARC")))
(command "_.PEDIT" "_M" SelSet "" "_Y" "_J" "_J" "_E" #PlineJoinPrec"")
(princ (strcat
"\n" (itoa (sslength SelSet))
" lines, arcs or polylines are joined. "
) )
)
( T
(command "_.PEDIT" "_M" SelSet "" "_J" "_J" "_E" #PlineJoinPrec "")
(princ "\n_ ")
(princ (strcat "\n " (itoa (sslength SelSet)) " polylines are joined."))
)
)
(princ)
)
;*
;* UREAL Funzione di interfaccia utente per numeri reali.
;* BIT (0 per nessuno) e KWD key word ("" per nessuna) sono gli stessi di
;* INITGET.
;* MSG e' la stringa di prompt, alla quale e' aggiunto numero reale di default
;* come <DEF> (nil per nessuno), e un : sara' aggiunto.
;*
(defun ureal (bit kwd msg def / inp)
(if def
(setq
msg (strcat "\n" msg " <" (ALE_RTOS_DZ8 def) ">: ")
bit (* 2 (fix (/ bit 2)))
)
(setq msg (strcat "\n" msg ": "))
)
(initget bit kwd)
(setq inp (getreal msg))
(if inp inp def)
);defun UREAL
;
(defun ALE_RtoS_DZ8 (ReaVal / CurDZn OutVal)
(if (= 8 (setq CurDZn (getvar "DIMZIN")))
(setq CurDZn nil)
(setvar "DIMZIN" 8)
)
(setq OutVal (rtos ReaVal 2))
(and CurDZn (setvar "DIMZIN" CurDZn))
OutVal
)