HPE Posted November 14, 2008 Posted November 14, 2008 I have a lisp routine that draws an arc then an arrow at the end of the arc, similar to the leader command. What I want to do is make the arrowhead change according to the dimscale that I set the drawing to. We use a lot of details that we have pre-drafted with these arcs to save time, but I dont want to have to scale every arrowhead when i use them in a differently scaled drawing. Any suggestions? I am using Autocad 2007. Quote
Lee Mac Posted November 15, 2008 Posted November 15, 2008 Would you be able to post the LISP to be modified? Thanks Quote
Strix Posted November 15, 2008 Posted November 15, 2008 does this one work for what you're trying to do? http://www.cadtutor.net/forum/showthread.php?p=96233&highlight=arrow*#post96233 Quote
HPE Posted November 17, 2008 Author Posted November 17, 2008 does this one work for what you're trying to do?http://www.cadtutor.net/forum/showthread.php?p=96233&highlight=arrow*#post96233 No not really, Its is almost the same Lisp as what i have running now. What I want to do is be able to change the dimscale of the drawing, and then use DIM UPDATE to resize the arrowhead to the correct size. With the Arc Arrow already drawn. Quote
HPE Posted November 17, 2008 Author Posted November 17, 2008 Would you be able to post the LISP to be modified? Thanks Here ya go. (defun c:ARCARW ( / sblip shigh sorth ssnp saptr arc1 arc1s arc2 arc3 rotpt pt rot th dim) ;IMB1ARW (setvar "cmdecho" 0) (command "undo" "g") (setq as (getvar "dimscale")) (prompt "\nArc (3 pt) Arrow: ") (setq arc1 (getpoint "\nEnter first arc point: ")) (setq arc2 (getpoint "\nEnter second arc point: ")) (command "color" "green") (command "linetype" "S" "hidden" "" "") (command "arc" arc1 arc2 pause) (setq arc3 (getvar "lastpoint") en (entlast) ed (entget en)) (command "color" "bylayer") (command "linetype" "S" "continuous" "" "") (setq rotpt (polar arc3 (angle arc3 arc2) (* 0.1 (getvar "dimscale")))) (setq rad (cdr (assoc 40 ed)) cen (cdr (assoc 10 ed))) (setq arrw (* 0.0625 (getvar "dimscale")) bside (sqrt (- (* rad rad) (* arrw arrw)))) (setq radend (angle cen arc3) difang (atan (/ arrw bside))) (arcdir ed arc3) ;RETURNS ARCD EITHER "E" OR "N" (if (= arcd "E") ;EQUAL, ADD 90 to ANGLES (progn (setq newang (+ radend difang) rotang (+ newang pi)) ) (progn (setq newang (- radend difang) rotang (- newang pi)) ) ) (setq mopt (polar cen newang rad) rot (angle arc3 mopt) rotd (* (/ rot pi) 180)) (command "-INSERT" "L:/LIBRARY/i66" arc3 as as (* (/ rot pi) 180)) (command "undo" "e") (prin1) (setvar "cmdecho" 1) ) 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.