tazzzz Posted January 30, 2015 Posted January 30, 2015 Hello all, I was looking for a lisp routine that will perform A DIMCONTINUE for arcs but no success. If you have something like this could you please share the code ? Also, it is possible to dimension only portions of an arc using a lisp? Thank you Quote
Lee Mac Posted January 31, 2015 Posted January 31, 2015 Also, it is possible to dimension only portions of an arc using a lisp? No LISP is required for this, simply use the 'Partial' option of the standard DIMARC command: Command: _dimarc Select arc or polyline arc segment: Specify arc length dimension location, or [Mtext/Text/Angle/[color=red]Partial[/color]]: Quote
tazzzz Posted February 2, 2015 Author Posted February 2, 2015 Thank you Lee, I feel so embarrassed I didn't know about this one ( I am using Acad for a long time). What about creating continuous dimensions for an arc? It is still possible without LISP? Quote
tazzzz Posted February 2, 2015 Author Posted February 2, 2015 I did some research and i found this lisp. I don't know who wrote this program in order to give him or her credit for. ; DLA.LSP - dimension length of arc ; modified version of DIMARC from (^v^) XANADU, http://www.xanadu.cz ; runs continuously - <Esc> to exit (defun C:DLA ( / *ERROR* pt1 pt2 cen a1 a2 ad D1 D2 D i r oldOs oldCmde) (defun *ERROR* (msg) (princ " function") (setvar "OSMODE" oldOs) (setvar "CMDECHO" oldCmde) (princ) ) (setq oldCmde (getvar "CMDECHO")) (setq oldOs (getvar "OSMODE")) (setvar "CMDECHO" 0) (while T (princ "\n Pick 2 points on an arc - ") (setvar "OSMODE" 33) (while (not cen) (setq pt1 (getpoint "\n 1st pt: ") cen (osnap pt1 "_CEN") ) (if (not cen) (alert "Doesn't lay on an arc, retry") (setq pt2 (getpoint pt1 "\n 2nd pt: ")) ) ) ; while (setvar "OSMODE" 0) (setq a1 (angle cen pt1) a2 (angle cen pt2) ad (abs (- a2 a1)) r (distance pt1 cen) D1 (* r ad) D2 (* r (- (* 2 pi) ad)) ) (princ (strcat "\n Arc length (1) = " (rtos D1) ", Complement (2) = " (rtos D2))) (setq D D1) (initget "1 2") (setq i (getkword "\n Dim which? [1 2] : ")) (princ "\n Place dimension : ") (if (= i "2") (setq D D2)) (command "_DIMANGULAR" "" cen pt1 pt2 "_T" (rtos D) pause "") (setq cen nil) ) ; while (setvar "OSMODE" oldOs) (setvar "CMDECHO" oldCmde) (princ) ) I need help in changing the code to do this: - text to show fractions as horizontal; - make option 1 as default (no need to ask for input); Thank you for your help Quote
BrianTFC Posted February 2, 2015 Posted February 2, 2015 take this part of the code out and it will stop asking and revert to 1 (initget "1 2") (setq i (getkword "\n Dim which? [1 2] : ")) (princ "\n Place dimension : ") (if (= i "2") (setq D D2)) Quote
tazzzz Posted February 2, 2015 Author Posted February 2, 2015 Thanks Brian, This one is solved. What about the text ? 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.