Lee Mac Posted April 19, 2010 Posted April 19, 2010 I have provided you with another option if you want the Perpendicular ObjectSnap to be retained. Quote
kyosmith Posted April 19, 2010 Posted April 19, 2010 Lee i didnt understand what you said about the wipeout. I dont know how to code in lisp. if someone can do it for me i will be very grateful thanks anyway Quote
symoin Posted June 22, 2010 Posted June 22, 2010 I have a dwg. which contains a lot of polylines and many places it will have a block on the vertices of the polylines. I need to break the bunch of polylines at the insertion point of the block or at the vertex of each of the polyline nearest to the place i select the polylines. Thanks in advance... Quote
manirpg Posted June 28, 2010 Posted June 28, 2010 Hi Lee, Nice routine.. I need the same with some other application. If possible pls help me. means required jump in all breaking points.Here attached jpeg for ur reference thanks in advance Mani:) Quote
alanjt Posted June 28, 2010 Posted June 28, 2010 http://www.cadtutor.net/forum/showthread.php?t=45820&highlight=jumper Quote
manirpg Posted June 30, 2010 Posted June 30, 2010 Hi, I checked in that thread also, many jumper routines posted by lee....but all are not working fine.(need any initial setting?). also need gap or radious input (mine its showing too small).Any way that all jumper routines working one by one, but i need all in one time without pick intersetion points. Jumper either horizontal or vertical not a problem......... pls someone help me............. Thanks in advance Regards mani:) Quote
jack_sharkit Posted April 20, 2012 Posted April 20, 2012 Hi, is there a lsp to obtain the results showed in the attachement ? Is it available to other objects too ? I'd like to break all selected objects using two params: "distance" and "gap". "Distance" is the distance from one to another break and "gap" is the break gap if an object length is shorter than "distance", cut in the middle. Sample.dwg Quote
jack_sharkit Posted May 1, 2012 Posted May 1, 2012 Hi, I found a solution for my problem, but I'm new with LISP and I have a problem: I added a if condition to check in the length of object is less that the distance. This stops the execution. Is there anyone who can check the code anb save me ? Thanks Jack (defun c:BDG (/ *error* AT:DrawX _getint _getint2 cmd seg i ss e div gap poc poc2 ) ;; Break object(s) at Distance with Gap ;; Modified by Jack, 04.29.12 ;; Original by Alan J. Thompson, 11.01.11 (vl-load-com) (defun *error* (msg) (and cmd (setvar 'CMDECHO cmd)) (and *AcadDoc* (vla-endundomark *AcadDoc*)) (if (and msg (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*QUIT*,")) ) (princ (strcat "\nError: " msg)) ) ) (defun AT:DrawX (P C) ;; Draw and "X" vector at specified point ;; P - Placement point for "X" ;; C - Color of "X" (must be integer b/w 1 & 255) ;; Alan J. Thompson, 10.31.09 (if (vl-consp P) ((lambda (d) (grvecs (cons C (mapcar (function (lambda (n) (polar P (* n pi) d))) '(0.25 1.25 0.75 1.75) ) ) ) P ) (* (getvar 'VIEWSIZE) 0.02) ) ) ) (defun _getint (/ i) (cond ((not (setq i (getdist "\nSpecify Distance: ")))) ((<= i 0) (princ "\nValue must be greater than 0!") (_getint) ) (i) ) ) (defun _getint2 (/ i) (cond ((not (setq i (getdist "\nSpecify Gap: ")))) ((<= i 0) (princ "\nValue must be greater than 0!") (_getint2) ) (i) ) ) (vla-startundomark (cond (*AcadDoc*) ((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object))) ) ) ) (setq cmd (getvar 'CMDECHO)) (setvar 'CMDECHO 0) (redraw) (if (and (setq div (_getint)) (setq gap (_getint2)) (setq i -1 ss (ssget "_:L" '((0 . "ARC,LINE,*POLYLINE,SPLINE,CIRCLE,ELLIPSE")) ) ) ) (while (setq e (ssname ss (setq i (1+ i)))) (setq len (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e)) ) (if (> len div) ( (setq seg (fix (/ len div))) (repeat (1- seg) (setq poc (trans (vlax-curve-getPointAtDist e div) e 1)) (setq poc2 (trans (vlax-curve-getPointAtDist e (+ div gap)) e 1) ) (vl-cmdf "_.break" e "_F" "_non" poc "_non" poc2) (setq e (entlast)) ) ) ( (setq poc (trans (vlax-curve-getPointAtDist e (- (/ len 2) (/ gap 2))) e 1 ) ) (setq poc2 (trans (vlax-curve-getPointAtDist e (+ (/ len 2) (/ gap 2))) e 1 ) ) (vl-cmdf "_.break" e "_F" "_non" poc "_non" poc2) (setq e (entlast)) ) ) ) ;; end while ) (*error* nil) (princ) ) Quote
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.