robwell Posted February 12, 2018 Share Posted February 12, 2018 Is there a way to dimension the x-y lengths between two points at the same time without have to do a linear dimension each time? I don't wan't coordinates. I am looking for lengths. Maybe a lisp or a macro? Thanks Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 13, 2018 Share Posted February 13, 2018 Simplest way is a dimension style you can turn off lots of stuff so could just have a style which is the arrows but it would use the dim align command but a little lisp would fix that. Good one to have a go at yourself. In words pick pt1, pick pt2, command dim align pt1 pt2 all done Quote Link to comment Share on other sites More sharing options...
robwell Posted February 13, 2018 Author Share Posted February 13, 2018 If only I knew how to write lisp codes. Quote Link to comment Share on other sites More sharing options...
Dahzee Posted February 13, 2018 Share Posted February 13, 2018 Robwell, This will dimension x and y of a selection, not sure if it is what you need. Tharwat kindly wrote this so make sure you don't remove his name. (defun c:kk (/ s i l r l1 r1 lx ly rx ry a b c d p1 p2 p3) ;; Tharwat 28. Nov. 2013 ;; (if (setq s (ssget '((-4 . "<NOT") (-4 . "<OR") (0 . "XLINE") (0 . "RAY") (0 . "*DIMENSION") (-4 . "OR>") (-4 . "NOT>") ) ) ) (progn (repeat (setq i (sslength s)) (vla-GetBoundingBox (vlax-ename->vla-object (ssname s (setq i (1- i)))) 'l 'r ) (setq l1 (vlax-safearray->list l) r1 (vlax-safearray->list r) lx (cons (car l1) lx) ly (cons (cadr l1) ly) rx (cons (car r1) rx) ry (cons (cadr r1) ry) ) ) (setq a (apply 'min lx) b (apply 'min ly) c (apply 'max rx) d (apply 'max ry) p1 (list c d) p2 (list a d) p3 (list c b) ) (command "._dimlinear" "_none" p1 "_none" p2 "_none" (polar p1 (* pi 0.5) (/ (distance p1 p2) 10.)) ) (command "._dimlinear" "_none" p1 "_none" p3 "_none" (polar p1 0. (/ (distance p1 p3) 10.)) ) ) ) (princ) ) (vl-load-com) Quote Link to comment Share on other sites More sharing options...
robwell Posted February 13, 2018 Author Share Posted February 13, 2018 This works perfectly. I was able to manipulate a couple numbers to make the offset a little further out. The only thing I wish I knew how to do would be to put the dims on the opposite sides in which they are placed with this lisp. I can still definitely use it though. Thank you. If anyone knows how to manipulate the location placement of the dims, that would be awesome. Thanks again, Dahzee. Quote Link to comment Share on other sites More sharing options...
CyberAngel Posted February 13, 2018 Share Posted February 13, 2018 If anyone knows how to manipulate the location placement of the dims, that would be awesome. If I understand what you want and what the code says, you can move the origin to the other side of the selection box. In other words, the line p1 (list c d) becomes p1 (list a b) Quote Link to comment Share on other sites More sharing options...
robwell Posted February 20, 2018 Author Share Posted February 20, 2018 That's the right direction CyberAngel, thanks. It doesn't place them exactly as I like, so I will work with that to find the right placement. 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.