Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PLJOIN in 2004

Status
Not open for further replies.

TDevil

Mechanical
Jul 10, 2002
31
Has anyone else experienced this let down? Apparently 2004 says it retained the pljoin.lsp program in a new format, but it doesn't work! I can't load the lsp found in the support files (and yes I did load all of the express menus) and "pljoin" means jack to autocad help. Anyone else tried this yet? Help! I miss my PLJOIN!
 
Replies continue below

Recommended for you

I'm not sure what pljoin did for you, but if you want to make line segments that share endpoints a polyline you could try this. Load it and them try "PJ".

(DEFUN C:pJ () (COMMAND "PEDIT" PAUSE "Y" "J" "BOX" PAUSE PAUSE "" "X") (PRINC)) ; Make a line a polyline & join selected lines

This one does the same thing, then closes the polyline. Load it and then try "PJC".

(DEFUN C:pJC () (COMMAND "PEDIT" PAUSE "Y" "J" "BOX" PAUSE PAUSE "" "C" "X") (PRINC)) ; Make a line a polyline, join selected lines, close it
 
Hi,
use "_pedit", or take this:


;;;
;;; PLJOIN.LSP
;;; Copyright © 1999 by Autodesk, Inc.
;;;
;;; Your use of this software is governed by the terms and conditions of the
;;; License Agreement you accepted prior to installation of this software.
;;; Please note that pursuant to the License Agreement for this software,
;;; "[c]opying of this computer program or its documentation except as
;;; permitted by this License is copyright infringement under the laws of
;;; your country. If you copy this computer program without permission of
;;; Autodesk, you are violating the law."
;;;
;;; AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
;;; AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
;;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
;;; DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;; UNINTERRUPTED OR ERROR FREE.
;;;
;;; Use, duplication, or disclosure by the U.S. Government is subject to
;;; restrictions set forth in FAR 52.227-19 (Commercial Computer
;;; Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
;;; (Rights in Technical Data and Computer Software), as applicable.
;;;
;;; ----------------------------------------------------------------

;Set global for controling precision of internal point comparison.
(setq #acet-pljoin-prec 0.0000001)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun c:pljoin ( / flt ss fuzz st )

(acet-error-init
(list (list "cmdecho" 0
"highlight" (getvar "highlight")
"plinetype" 2
"limcheck" 0
"osmode" 0
)
0
'(progn ;clean up some temporary entities
(if (and tmpna
(entget tmpna)
);and
(entdel tmpna)
);if
(if (and tmpna2
(entget tmpna2)
);and
(entdel tmpna2)
);if
);progn
);list
);acet-error-init
(setq flt (list
(list '((-4 . &quot;<OR&quot;) (0 . &quot;LINE&quot;) (0 . &quot;ARC&quot;) (0 . &quot;*POLYLINE&quot;) (-4 . &quot;OR>&quot;))
&quot;\n1 object was not a line, arc or pline.&quot;
&quot;\n%1 objects were not lines, arcs or plines.&quot;
);list
(list '((-4 . &quot;<OR&quot;) (0 . &quot;LINE&quot;) (0 . &quot;ARC&quot;)
(-4 . &quot;<AND&quot;)
(0 . &quot;*POLYLINE&quot;)
(-4 . &quot;<NOT&quot;) (-4 . &quot;&&quot;) (70 . 1) (-4 . &quot;NOT>&quot;) ;1
(-4 . &quot;AND>&quot;)
(-4 . &quot;OR>&quot;))
&quot;\n1 object was a closed pline.&quot;
&quot;\n%1 objects were closed plines.&quot;
);list
(list '((-4 . &quot;<OR&quot;) (0 . &quot;LINE&quot;) (0 . &quot;ARC&quot;)
(-4 . &quot;<AND&quot;)
(0 . &quot;*POLYLINE&quot;)
(-4 . &quot;<NOT&quot;) (-4 . &quot;&&quot;) (70 . 88) (-4 . &quot;NOT>&quot;) ;8 16 64
(-4 . &quot;AND>&quot;)
(-4 . &quot;OR>&quot;))
&quot;\n1 object was a mesh or 3dpoly.&quot;
&quot;\n%1 objects were 3d plines or meshes.&quot;
);list
(list &quot;LAYERUNLOCKED&quot;)
(list &quot;CURRENTUCS&quot;)
);list
);setq

(if (and (setq ss (ssget))
(setq ss (acet-ss-filter-current-ucs ss T))
(setq ss (car (acet-ss-filter (list ss flt T))))
);and
(progn
(setvar &quot;highlight&quot; 0)
(setq fuzz (acet-pljoin-get-fuzz-and-mode2)
st (cadr fuzz)
fuzz (car fuzz)
);setq
(princ &quot;\nProcessing pline data....&quot;)
(acet-pljoin2 ss st fuzz)
(princ (acet-str-format &quot;%1 Done.\n&quot; (chr 8)))
);progn then
(princ &quot;\nNothing valid selected.&quot;)
);if
(acet-error-restore)
);defun c:pljoin

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun c:pljoinmode ( / )
(acet-error-init nil)
(acet-pljoinmode2)
(acet-error-restore)
);defun c:pljoinmode

;;;backward compatibility stub functions....
(defun acet-pljoin ( ss st fuzz)
(acet-pljoin2 ss st fuzz)
)
(defun acet-pljoin-1st-pass ( ss flt)
(acet-pljoin-1st-pass2 ss flt)
)
(defun acet-pljoin-2nd-pass ( ss fuzz st flt)
(acet-pljoin-2nd-pass2 ss fuzz st flt)
)
(defun acet-pljoin-get-matched-pairs ( lst lst5 fuzz g st tmpe1 tmpe2 flst)
(acet-pljoin-get-matched-pairs2 lst lst5 fuzz g st tmpe1 tmpe2 flst)
)
(defun acet-pljoin-get-closest ( p1 lst fuzz g flst)
(acet-pljoin-get-closest2 p1 lst fuzz g flst)
)
(defun acet-pljoin-do-join ( fuzz st na p1 na2 p2 lst3 tmpe1 tmpe2)
(acet-pljoin-do-join2 fuzz st na p1 na2 p2 lst3 tmpe1 tmpe2)
)
(defun acet-pljoin-round ( ss g)
(acet-pljoin-round2 ss g)
)
(defun acet-pljoin-get-epoints ( na)
(acet-pljoin-get-epoints2 na)
)
(defun acet-lwpline-remove-duplicate-pnts ( e1)
(acet-lwpline-remove-duplicate-pnts2 e1)
)
(defun acet-pljoin-fillet-with-fuzz ( fuzz na p1 tmpe1 na2 p2 tmpe2)
(acet-pljoin-fillet-with-fuzz2 fuzz na p1 tmpe1 na2 p2 tmpe2)
)
(defun acet-pljoin-get-best-int ( a lst)
(acet-pljoin-get-best-int2 a lst)
)
(defun acet-pljoin-get-closest-int ( p1 p2 lst)
(acet-pljoin-get-closest-int2 p1 p2 lst)
)
(defun acet-pljoin-fillet-mod-epoint ( e1 flag x)
(acet-pljoin-fillet-mod-epoint2 e1 flag x)
)
(defun acet-pljoin-mod-tmp ( na p1 tmpe1)
(acet-pljoin-mod-tmp2 na p1 tmpe1)
)
(defun acet-pljoin-calc-new-bulge ( p1 b p2 p3)
(acet-pljoin-calc-new-bulge2 p1 b p2 p3)
)
(defun acet-pljoin-do-ss-pre-work ( ss flt)
(acet-pljoin-do-ss-pre-work2 ss flt)
)
(defun acet-pljoin-get-width ( na)
(acet-pljoin-get-width2 na)
)
(defun acet-pljoin-ss-flt ( ss flt)
(acet-pljoin-ss-flt2 ss flt)
)
(defun acet-pljoinmode ()
(acet-pljoinmode2)
)
(defun acet-pljoin-init-mode ()
(acet-pljoin-init-mode2)
)
(defun acet-pljoin-get-fuzz-and-mode ()
(acet-pljoin-get-fuzz-and-mode2)
)


(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-lwpline-remove-duplicate-pnts2 e1)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-1st-pass2 ss flt)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin2 ss st fuzz)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-2nd-pass2 ss fuzz st flt)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-calc-new-bulge2 p1 b p2 p3)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-do-join2 fuzz st na p1 na2 p2 lst3 tmpe1 tmpe2)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-do-ss-pre-work2 ss flt)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-fillet-mod-epoint2 e1 flag x)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-fillet-with-fuzz2 fuzz na p1 tmpe1 na2 p2 tmpe2)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-get-best-int2 a lst)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-get-closest2 p1 lst fuzz g flst)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-get-closest-int2 p1 p2 lst)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-get-epoints2 na)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-get-fuzz-and-mode2)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-get-matched-pairs2 lst lst5 fuzz g st tmpe1 tmpe2 flst)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-get-width2 na)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-init-mode2)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoinmode2)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-mod-tmp2 na p1 tmpe1)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-round2 ss g)))
(acet-autoload2 '(&quot;PLJOINSUP.LSP&quot; (acet-pljoin-ss-flt2 ss flt)))
(princ)
 
Thanks alot! I just liked the idea of joining multiple lines into multiple polylines.
That lsp works perfectly, thanks Exxit! I had planned on copying the file from home, where I have 2002, but that saved me the work!
By the way, while I was waiting, I came up with a simple button macro to use that works too:
^C^Cmpedit;\\;y;j;;;
I'm still learning the basics of lsp programs, so button macros are my first logical choice.
Thanks for all of your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor