Abrasive Posted November 21, 2022 Posted November 21, 2022 As usual I hope I can explain myself...lol Can someone help with a routine so I can place a dimension at 90deg from 2 clicked points AND have it offset 17" from the second clicked point? Quote
BIGAL Posted November 21, 2022 Posted November 21, 2022 (edited) Have a look at this little bit of code it makes a dim and then moves the dim text. Its 120 in mm the mapcar is X Y Z offsets. (command "dim" "VER" p1 pt1 pt3 "" "exit") (setq obj (vlax-ename->vla-object (entlast))) (setq tpos (mapcar '+ (vlax-get obj 'TextPosition) (list 125.0 120.0 0.0))) (vlax-put obj 'TextPosition tpos) Edited November 21, 2022 by BIGAL Quote
Abrasive Posted November 22, 2022 Author Posted November 22, 2022 hmmm, Is there a way to set the angle of the dimension text? Quote
Abrasive Posted November 22, 2022 Author Posted November 22, 2022 After thinking about what I actually need to get done, this could be just text using the distance between the two clicks. Then find the angle and turn the text 90deg and offsetting a distance from the second click? Quote
BIGAL Posted November 22, 2022 Posted November 22, 2022 (edited) Ok found it adding to what I posted earlier, need angle in radians. The offset point may need the values worked out like 1/2 dim length. Not tested. (command "dim" "ver" p4 pt1 pt3 "" "exit") (setq obj (vlax-ename->vla-object (entlast))) (vla-put-textrotation obj (/ pi 2.)) Edited November 22, 2022 by BIGAL 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.