thekiki Posted March 18 Share Posted March 18 Hi, I'm looking for a lisp that can extend polygons following the polyline select. Thanks for your answers. Polyline extend.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 19 Share Posted March 19 Just some ideas get co-ords of pline sort on X&Y use a Intersect with to work out new bottom points then update pline co-ords. A little trick is can select pline near a corner and rearrange the points so start at that corner. Possibly the way I might go. Will think about it. Oh yeah people will understand CW or CCW. Quote Link to comment Share on other sites More sharing options...
thekiki Posted March 19 Author Share Posted March 19 I've found the other way to do that. First, i explode polylines and make extend to polyline. Than, i make the contour of all the polylines selected. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 20 Share Posted March 20 Glad your happy to explode but can be done sometimes you just have to wait for an answer so plines remain. "contour of all the polylines selected" I dont understand this ? Quote Link to comment Share on other sites More sharing options...
mhupp Posted March 20 Share Posted March 20 22 minutes ago, BIGAL said: "contour of all the polylines selected" I dont understand this ? bpoly maybe? Quote Link to comment Share on other sites More sharing options...
thekiki Posted March 20 Author Share Posted March 20 Yes by bpoly, but using this method take a lot of time if i have hundred of polygons. Quote Link to comment Share on other sites More sharing options...
mhupp Posted March 20 Share Posted March 20 This might help. Quote Link to comment Share on other sites More sharing options...
thekiki Posted March 21 Author Share Posted March 21 Could you please send me dwg file. Thanks! Quote Link to comment Share on other sites More sharing options...
XDSoft Posted April 12 Share Posted April 12 [XDrX-PlugIn(103)] Supper Extend (theswamp.org) https://www.theswamp.org/index.php?topic=59151.0 (defun c:xdtb_polyextend (/ e1 e2 e3 inx1 inx2 bak) (if (and (setq e1 (xdrx-entsel (xdrx-string-multilanguage "\n拾取多段线延伸起始边<结束>:" "\nPick Polyline Extend start Edge<Exit>:" ) '((0 . "*polyline")) ) ) (or (setq e2 (xdrx-entsel (xdrx-string-multilanguage "\n拾取延伸结束边<alone>:" "\nPick Extend end Edge<Exit>:" ) '((0 . "*polyline")) ) ) t ) (equal (car e1) (car e2)) ) (progn (xd::begin) (setq inx1 (xdrx-getpropertyvalue (car e1) "onseg" (cadr e1)) inx2 inx1 ) (if e2 (setq inx2 (xdrx-getpropertyvalue (car e2) "onseg" (cadr e2))) ) (if (setq e3 (xdrx-entsel (xdrx-string-multilanguage "\n拾取目标边<退出>:" "\nPick Dest Edge<Exit>:" ) '((0 . "*polyline,line,arc,circle")) ) ) (xdrx-polyline-extend inx1 inx2 e1 e3) ) (xd::end) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
thekiki Posted April 12 Author Share Posted April 12 Thanks for your answer, but i have this message: Commande: XDTB_POLYEXTEND ; erreur: no function definition: XDRX-STRING-MULTILANGUAGE Commande: Quote Link to comment Share on other sites More sharing options...
XDSoft Posted April 12 Share Posted April 12 2 hours ago, thekiki said: Thanks for your answer, but i have this message: Commande: XDTB_POLYEXTEND ; erreur: no function definition: XDRX-STRING-MULTILANGUAGE Commande: need XDRX-API: download link: xdcad/XDrx-API: Autolisp development library written in ObjectARX (github.com) https://github.com/xdcad/XDrx-API Quote Link to comment Share on other sites More sharing options...
thekiki Posted April 12 Author Share Posted April 12 Once download, what the follow steps! Quote Link to comment Share on other sites More sharing options...
XDSoft Posted April 13 Share Posted April 13 2 hours ago, thekiki said: Once download, what the follow steps! Execute the EXE in the compressed package. It will be installed all the way by default and all ACAD versions will be checked. After installation, after starting ACAD, there will be a prompt whether the API loading is successful. Then you copy the forum code and execute the command. Quote Link to comment Share on other sites More sharing options...
thekiki Posted April 15 Author Share Posted April 15 It's OK for English version (AutoCAD) but not for french version. By the way, it's better to have this lisp, but if i have hundred of polygons, it takes nevertheless a lot of time. Many thanks. Quote Link to comment Share on other sites More sharing options...
XDSoft Posted April 15 Share Posted April 15 3 hours ago, thekiki said: It's OK for English version (AutoCAD) but not for french version. By the way, it's better to have this lisp, but if i have hundred of polygons, it takes nevertheless a lot of time. Many thanks. 1. What's wrong with the French version? The prompt string is garbled, or the program cannot be executed? Or is it that the French version cannot successfully load the API? 2. Doesn't extension require your mouse to pick up the interaction? Do you have a lot of POLYGON and want to do it in batches? Then tell me what you want to do, and how to tell the program which one you want to extend to which one? Quote Link to comment Share on other sites More sharing options...
XDSoft Posted April 15 Share Posted April 15 3 hours ago, thekiki said: It's OK for English version (AutoCAD) but not for french version. By the way, it's better to have this lisp, but if i have hundred of polygons, it takes nevertheless a lot of time. Many thanks. Select N polylines, and then extend all edges in the window to the specified polylines? Quote Link to comment Share on other sites More sharing options...
thekiki Posted April 15 Author Share Posted April 15 I have this message: Commande: XDTB_POLYEXTEND ; erreur: no function definition: XDRX-STRING-MULTILANGUAGE Did you have the lisp without executing the program "XDRX-API..." Quote Link to comment Share on other sites More sharing options...
XDSoft Posted April 15 Share Posted April 15 6 hours ago, thekiki said: It's OK for English version (AutoCAD) but not for french version. By the way, it's better to have this lisp, but if i have hundred of polygons, it takes nevertheless a lot of time. Many thanks. Send one that can be processed in batches (defun c:xdtb_polyxextend (/ e3 ge ins ins1 inx1 inx2 pts ss verts verts1 x y) (if (and (setq pts (XD::Doc:GetPolygon (xdrx-string-multilanguage "\n请指定第一点" "\nPlease specify the first point" ) (xdrx-string-multilanguage "下一点" "Next point") 7 ) ) (setq ss (ssget "f" pts '((0 . "*polyline")))) (xdrx-entity-redraw ss 3) ) (progn (xd::begin) (if (setq e3 (xdrx-entsel (xdrx-string-multilanguage "\n拾取目标边<退出>:" "\nPick Dest Edge<Exit>:") ' ((0 . "*polyline,line,arc,circle")) ) ) (progn (setq ge (xdge::constructor "kcompositecrv3d" (xd::pnts:close pts))) (mapcar '(lambda (x) (setq verts (xdrx-getpropertyvalue x "vertices") ins (xdrx-curve-isinside ge verts t) ) (if (and (xdrx-curve-isclosed x) (member (xdrx-getpropertyvalue x "startpoint") ins) ) (progn (setq verts1 (xd::list:subtract verts ins)) (xd::polyline:resetstartpoint x (car verts1)) ) ) (setq ins1 (mapcar '(lambda (y) (xdrx-getpropertyvalue x "nearindex" y) ) ins ) ins1 (vl-sort ins1 '(lambda (x y) (< x y) ) ) ) (setq inx1 (car ins1) inx2 (last (xd::list:removetail ins1)) ) (xdrx-polyline-extend inx1 inx2 x e3) ) (xdrx-ss->ents ss) ) ) ) (xd::end) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
XDSoft Posted April 15 Share Posted April 15 2 hours ago, thekiki said: I have this message: Commande: XDTB_POLYEXTEND ; erreur: no function definition: XDRX-STRING-MULTILANGUAGE Did you have the lisp without executing the program "XDRX-API..." The English version is normal. Does the French version report this error? Quote Link to comment Share on other sites More sharing options...
pkenewell Posted April 15 Share Posted April 15 @XDSoft This person is asking for a solution WITHOUT your extension API. You'll find that not everyone here wants to load a 3rd party API, and many CANNOT because of company policies. Since AutoLISP is a interpreted language, they don't need to install anything, thus not violating company I.T. policies that prevent them from installing anything without approval first. While I appreciate the usefulness of your API, not everyone wants here wants a solution including it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.