Mason Dixon Posted January 25, 2010 Share Posted January 25, 2010 I'm trying to stretch or lengthen an arc 8-1/8" but when acad says to select an object in LENGTHEN I can't, nothing happens when I click on the object. I also tried STRETCH but it will only let me pull a corner, I need everything to lengthen around the center point of the circle Quote Link to comment Share on other sites More sharing options...
CADMASTER1128 Posted January 25, 2010 Share Posted January 25, 2010 See if this LISP will work... Created by LeeMac! ;; Quick Arc Editor, by Lee McDonnell 20.07.2009 (defun c:acEd (/ *error* foo prop str ent Obj eLst gr dat val osPt) (vl-load-com) (defun *error* (err) (if (and Obj eLst (not (vlax-erased-p Obj))) (mapcar (function (lambda (x) (vlax-put-property Obj (car x) (cdr x)))) eLst)) (if (not (wcmatch (strcase err) "*BREAK,*CANCEL*,*EXIT*")) (princ (strcat "\n** Error: " err " **")) (princ "\n*Cancel*")) (redraw) (princ)) (setq foo 'distance prop 'Radius str "") (while (progn (setq ent (entsel "\nSelect Arc/Circle: ")) (cond ((vl-consp ent) (if (vl-position (vla-get-ObjectName (setq Obj (vlax-ename->vla-object (car ent)))) '("AcDbArc" "AcDbCircle")) nil (princ "\n** Invalid Object Selection **"))) (t (princ "\n** Nothing Selected **"))))) (foreach x '(StartAngle EndAngle Radius) (and (vlax-property-available-p Obj x) (setq eLst (cons (cons x (vlax-get-property Obj x)) eLst)))) (while (progn (setq gr (grread 't 15 0) dat (cadr gr)) (redraw) (cond ((and (eq 5 (car gr)) (listp (setq cPt (cadr gr)))) (if (and (< 0 (getvar "OSMODE") 16383) (setq osPt (osnap dat (osLst (getvar "OSMODE"))))) (osMark osPt)) (vlax-put-property Obj prop ((eval foo) (vlax-get Obj 'Center) cPt)) (grdraw (vlax-get Obj 'Center) cPt 30 (~ -2)) t) ((eq 25 (car gr)) nil) ((eq 3 (car gr)) (if (and (< 0 (getvar "OSMODE") 16383) (setq osPt (osnap dat (osLst (getvar "OSMODE"))))) (vlax-put-property Obj prop ((eval foo) (vlax-get Obj 'Center) osPt)))) ((eq 2 (car gr)) (cond ((or (< 47 dat 58) (eq dat 46)) (princ (chr dat)) (setq str (strcat str (chr dat)))) ((and (= dat (> (strlen str) 0)) (princ (strcat (chr " " (chr )) (setq str (substr str 1 (1- (strlen str))))) ((eq 6 dat) (cond ((< 0 (getvar "OSMODE") 16384) (setvar "OSMODE" (+ 16384 (getvar "OSMODE")))) (t (setvar "OSMODE" (- (getvar "OSMODE") 16384))))) ((eq 9 dat) (and (eq "AcDbArc" (vla-get-ObjectName Obj)) (setq foo (cond ((eq foo 'angle) 'distance) (t 'angle)))) (setq prop (cond ((vl-position prop '(EndAngle StartAngle)) (setq prop 'Radius)) (t (setq prop (propt Obj cPt)))))) ((vl-position dat '(13 32)) (cond ((or (and (eq foo 'angle) (setq val (angtof str 0))) (and (eq foo 'distance) (setq val (distof str)))) (vlax-put-property Obj prop val)))) '(t))) (t)))) (redraw) (princ)) (defun propt (Obj pt) (if (eq "AcDbArc" (vla-get-ObjectName Obj)) (cond ((> (distance pt (vlax-get Obj 'StartPoint)) (distance pt (vlax-get Obj 'EndPoint))) 'EndAngle) (t 'StartAngle)) 'Radius)) (defun oSlst (os / str cnt) (setq str "" cnt 0) (if (< 0 os 16383) (foreach mod '("_end" "_mid" "_cen" "_nod" "_qua" "_int" "_ins" "_per" "_tan" "_nea" "_non" "_app" "_ext" "_par") (if (not (zerop (logand (expt 2 cnt) os))) (setq str (strcat str mod (chr 44)))) (setq cnt (1+ cnt)))) (vl-string-right-trim (chr 44) str)) (defun osMark (pt / drft osSz osCol ratio bold glst i) (setq drft (vla-get-drafting (vla-get-preferences (vlax-get-acad-object))) osSz (vla-get-AutoSnapMarkerSize drft) oscol (vla-get-AutoSnapMarkerColor drft) ratio (/ (getvar "VIEWSIZE") (cadr (getvar "SCREENSIZE"))) bold (mapcar (function (lambda (x) (* x ratio))) (list (+ osSz 0.5) osSz (- osSz 0.5))) i 0) (repeat 50 (setq glst (cons (polar '(0 0 0) (* i (/ pi 25.)) 1.) glst) i (1+ i))) (foreach x bold (grvecs (append (list oscol) glst (cdr glst) (list (car glst))) (list (list x 0.0 0.0 (car pt)) (list 0.0 x 0.0 (cadr pt)) (list 0.0 0.0 1.0 0.0) (list 0.0 0.0 0.0 1.0))))) (princ (strcat (chr " " (chr )) (setq str (substr str 1 (1- (strlen str))))) ((eq 9 dat) (and (eq "AcDbArc" (vla-get-ObjectName Obj)) (setq foo (cond ((eq foo 'angle) 'distance) (t 'angle)))) (setq prop (cond ((vl-position prop '(EndAngle StartAngle)) (setq prop 'Radius)) (t (setq prop (propt Obj cPt)))))) ((vl-position dat '(13 32)) (cond ((or (and (eq foo 'angle) (setq val (angtof str 0))) (and (eq foo 'distance) (setq val (distof str)))) (vlax-put-property Obj prop val)))) '(t))) (t)))) (redraw) (princ)) (defun propt (Obj pt) (if (eq "AcDbArc" (vla-get-ObjectName Obj)) (cond ((> (distance pt (vlax-get Obj 'StartPoint)) (distance pt (vlax-get Obj 'EndPoint))) 'EndAngle) (t 'StartAngle)) 'Radius)) Quote Link to comment Share on other sites More sharing options...
CarlB Posted January 25, 2010 Share Posted January 25, 2010 When you "list" it, is it really an arc? If so, lengthen will work on it. Quote Link to comment Share on other sites More sharing options...
Mason Dixon Posted January 25, 2010 Author Share Posted January 25, 2010 Its says its an arc, not sure why that line can't be selected when I'm in the lengthen command. Quote Link to comment Share on other sites More sharing options...
Mason Dixon Posted January 25, 2010 Author Share Posted January 25, 2010 See if this LISP will work... Created by LeeMac! ;; Quick Arc Editor, by Lee McDonnell 20.07.2009 (defun c:acEd (/ *error* foo prop str ent Obj eLst gr dat val osPt) (vl-load-com) (defun *error* (err) (if (and Obj eLst (not (vlax-erased-p Obj))) (mapcar (function (lambda (x) (vlax-put-property Obj (car x) (cdr x)))) eLst)) (if (not (wcmatch (strcase err) "*BREAK,*CANCEL*,*EXIT*")) (princ (strcat "\n** Error: " err " **")) (princ "\n*Cancel*")) (redraw) (princ)) (setq foo 'distance prop 'Radius str "") (while (progn (setq ent (entsel "\nSelect Arc/Circle: ")) (cond ((vl-consp ent) (if (vl-position (vla-get-ObjectName (setq Obj (vlax-ename->vla-object (car ent)))) '("AcDbArc" "AcDbCircle")) nil (princ "\n** Invalid Object Selection **"))) (t (princ "\n** Nothing Selected **"))))) (foreach x '(StartAngle EndAngle Radius) (and (vlax-property-available-p Obj x) (setq eLst (cons (cons x (vlax-get-property Obj x)) eLst)))) (while (progn (setq gr (grread 't 15 0) dat (cadr gr)) (redraw) (cond ((and (eq 5 (car gr)) (listp (setq cPt (cadr gr)))) (if (and (< 0 (getvar "OSMODE") 16383) (setq osPt (osnap dat (osLst (getvar "OSMODE"))))) (osMark osPt)) (vlax-put-property Obj prop ((eval foo) (vlax-get Obj 'Center) cPt)) (grdraw (vlax-get Obj 'Center) cPt 30 (~ -2)) t) ((eq 25 (car gr)) nil) ((eq 3 (car gr)) (if (and (< 0 (getvar "OSMODE") 16383) (setq osPt (osnap dat (osLst (getvar "OSMODE"))))) (vlax-put-property Obj prop ((eval foo) (vlax-get Obj 'Center) osPt)))) ((eq 2 (car gr)) (cond ((or (< 47 dat 58) (eq dat 46)) (princ (chr dat)) (setq str (strcat str (chr dat)))) ((and (= dat (> (strlen str) 0)) (princ (strcat (chr " " (chr )) (setq str (substr str 1 (1- (strlen str))))) ((eq 6 dat) (cond ((< 0 (getvar "OSMODE") 16384) (setvar "OSMODE" (+ 16384 (getvar "OSMODE")))) (t (setvar "OSMODE" (- (getvar "OSMODE") 16384))))) ((eq 9 dat) (and (eq "AcDbArc" (vla-get-ObjectName Obj)) (setq foo (cond ((eq foo 'angle) 'distance) (t 'angle)))) (setq prop (cond ((vl-position prop '(EndAngle StartAngle)) (setq prop 'Radius)) (t (setq prop (propt Obj cPt)))))) ((vl-position dat '(13 32)) (cond ((or (and (eq foo 'angle) (setq val (angtof str 0))) (and (eq foo 'distance) (setq val (distof str)))) (vlax-put-property Obj prop val)))) '(t))) (t)))) (redraw) (princ)) (defun propt (Obj pt) (if (eq "AcDbArc" (vla-get-ObjectName Obj)) (cond ((> (distance pt (vlax-get Obj 'StartPoint)) (distance pt (vlax-get Obj 'EndPoint))) 'EndAngle) (t 'StartAngle)) 'Radius)) (defun oSlst (os / str cnt) (setq str "" cnt 0) (if (< 0 os 16383) (foreach mod '("_end" "_mid" "_cen" "_nod" "_qua" "_int" "_ins" "_per" "_tan" "_nea" "_non" "_app" "_ext" "_par") (if (not (zerop (logand (expt 2 cnt) os))) (setq str (strcat str mod (chr 44)))) (setq cnt (1+ cnt)))) (vl-string-right-trim (chr 44) str)) (defun osMark (pt / drft osSz osCol ratio bold glst i) (setq drft (vla-get-drafting (vla-get-preferences (vlax-get-acad-object))) osSz (vla-get-AutoSnapMarkerSize drft) oscol (vla-get-AutoSnapMarkerColor drft) ratio (/ (getvar "VIEWSIZE") (cadr (getvar "SCREENSIZE"))) bold (mapcar (function (lambda (x) (* x ratio))) (list (+ osSz 0.5) osSz (- osSz 0.5))) i 0) (repeat 50 (setq glst (cons (polar '(0 0 0) (* i (/ pi 25.)) 1.) glst) i (1+ i))) (foreach x bold (grvecs (append (list oscol) glst (cdr glst) (list (car glst))) (list (list x 0.0 0.0 (car pt)) (list 0.0 x 0.0 (cadr pt)) (list 0.0 0.0 1.0 0.0) (list 0.0 0.0 0.0 1.0))))) (princ (strcat (chr " " (chr )) (setq str (substr str 1 (1- (strlen str))))) ((eq 9 dat) (and (eq "AcDbArc" (vla-get-ObjectName Obj)) (setq foo (cond ((eq foo 'angle) 'distance) (t 'angle)))) (setq prop (cond ((vl-position prop '(EndAngle StartAngle)) (setq prop 'Radius)) (t (setq prop (propt Obj cPt)))))) ((vl-position dat '(13 32)) (cond ((or (and (eq foo 'angle) (setq val (angtof str 0))) (and (eq foo 'distance) (setq val (distof str)))) (vlax-put-property Obj prop val)))) '(t))) (t)))) (redraw) (princ)) (defun propt (Obj pt) (if (eq "AcDbArc" (vla-get-ObjectName Obj)) (cond ((> (distance pt (vlax-get Obj 'StartPoint)) (distance pt (vlax-get Obj 'EndPoint))) 'EndAngle) (t 'StartAngle)) 'Radius)) I've never used a LISP command before, where do you put the code? Quote Link to comment Share on other sites More sharing options...
CarlB Posted January 25, 2010 Share Posted January 25, 2010 Is it on a locked layer? Quote Link to comment Share on other sites More sharing options...
CADMASTER1128 Posted January 25, 2010 Share Posted January 25, 2010 1. Copy and past code into notepad. 2. Save as ArcEdit.lsp (Make sure format is NOT Text Document; *.txt, Save as Type - All Files) 3. Go into AutoCAD and enter "APPLOAD" into command line. 4. Select the location of the LISP and click LOAD. 5. Execute the LISP you loaded. In this case the command would be ACED. Enjoy the command... Hit TAB to make arc longer or shorter. Quote Link to comment Share on other sites More sharing options...
paulmcz Posted January 25, 2010 Share Posted January 25, 2010 This is the drawing I uploaded to the previous thread, which I edited later, after realizing that I forgot to trim the gap lines. I corrected it and uploaded the new one. In the new drawing the segment was made into a closed polyline, for easier selecting for polar array. If the drawing you are working on is the corrected one that I uploaded later, to lengthen the arc, you have to explode it first. Otherwise, upload your drawing here and I or someone else will find the solution. Quote Link to comment Share on other sites More sharing options...
rkent Posted January 25, 2010 Share Posted January 25, 2010 lengthen command, built right into autocad Quote Link to comment Share on other sites More sharing options...
Mason Dixon Posted January 25, 2010 Author Share Posted January 25, 2010 Thanks Cadmaster, that worked. Quote Link to comment Share on other sites More sharing options...
kindy52 Posted January 26, 2010 Share Posted January 26, 2010 I use lengthen all the time. I usely hit lenghten - t (for total) - type the desired length - and then select the object towards the end I want to lengthen. This should work for arcs and lines. 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.