JoeyG_77 Posted February 27, 2019 Share Posted February 27, 2019 Hey everyone ... Im trying to make a macro that will when I pick 2 points that it will draw that line .074 short of the 2 points in the Y axis. Im having trouble with the code for it. This is all I have so far and it wont go any further after I get to the from. ^C^C_LINE;\FROM;\@.074<-90;; Thanks Joey G Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 28, 2019 Share Posted February 28, 2019 (edited) You would be better writing in lisp. Its easy to get the two points x & Y then subtract the 0.074 from the Y then draw a line. ; draw a line with y amount changed ; By Big-al Feb 2019 (defun c:074 ( / pt1 pt2 x1 x2 y1 y2 diff) ;(setq diff (getreal "Enter difference)) ; use this if want to enter value (setq diff 0.074) ; remove this line if use line above (setq pt1 (getpoint "Pick 1st point")) (setq x1 (car pt1)) (setq y1 (+ (cadr pt1) diff)) ; add 0.074 to Y (setq pt2 (getpoint "Pick point 2")) (setq x2 (car pt2)) (setq y2 (- (cadr pt2) diff)) ; subtract 0.074 from Y (setq pt2 (list x2 y2)) ; make new co-ords (command "line" pt1 pt2 "") ; draw a line ) Edited February 28, 2019 by BIGAL Quote Link to comment Share on other sites More sharing options...
JoeyG_77 Posted February 28, 2019 Author Share Posted February 28, 2019 BIGAL, Thanks for the lisp !! ... worked perfect and added it to my macro Thanks again Joey G Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 2, 2019 Share Posted March 2, 2019 No worries very easy request. How often do you do this offset in a dwg and do you change the offset value ? There is a shortcut method if offset varies. Quote Link to comment Share on other sites More sharing options...
JoeyG_77 Posted March 6, 2019 Author Share Posted March 6, 2019 Hey BIGAL ... Thanks again for all the help w/ many lisps and advice given over the years. You asked a question and I didnt know how to answer about the offset value. I have something along the same line but alittle more involved i think. I work for a cabinet shop and making changes all the time. I would need a lisp that would be able to pick 2 points then ask what my subtraction would be and then minus that from the overall dimension that you picked in the beginning. Then you would have to divide that into equal spaces based on a number you entered. Then it would draw 6" lines @ every point . Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 8, 2019 Share Posted March 8, 2019 So you draw a rectang and dimension it but the dim has to have a undersize tolerance so you can push it in, correct ? That is easy use dimension overide and change dim value. I am not sure about the offset lines post a couple of examples. When doing a BIM of the sheets check for textoverride value and use that. ; IAcadDimRotated: AutoCAD Rotated Dimension Interface ; Property values: ; Measurement (RO) = 44.09 ; TextOverride = "" ; change dimension value by an amount ; By Alan H March 2019 (defun c:foo ( / ans dist obj) (setq obj (vlax-ename->vla-object (car (entsel "\nPick Dimension")))) (setq dist (getreal "enter distance")) (setq ans (vla-get-measurement obj)) (setq ans (- ans dist)) (vla-put-TextOverride obj (rtos ans 2 2)) ) (c:foo) 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.