comet712 Posted October 10, 2017 Posted October 10, 2017 Hi, I'm looking for a routine where I can have auto dimension from multiple selected points to a line perpendicular to the points. Thank you in advance. Dimension from Point to line.dwg Quote
BIGAL Posted October 10, 2017 Posted October 10, 2017 Here is a start for you, change the line to a dim command, next step is to pick all points and do in one go. Please have a go at modifying. (setq oldsnap (getvar 'osmode)) (setq obj (vlax-ename->vla-object (car (entsel "\nPick line object")))) (while (setq pt (getpoint "pick point")) (setq pt2 (vlax-curve-getClosestPointTo obj pt acextendnone)) (setvar 'osmode 0) (command "line" pt pt2 "") (setvar 'osmode oldsnap) ) Quote
comet712 Posted October 12, 2017 Author Posted October 12, 2017 Hi BIGAL, Thank you for your reply. However I have no background on LISP Programming. I have tried my best to modify by changing the line to dim command as below. Still couldn't get it working though. Would you mind pointing out where went wrong? (defun c:try2 () (setq oldsnap (getvar 'osmode)) (setq obj (vlax-ename->vla-object (car (entsel "\nPick line object")))) (while (setq pt (getpoint "pick point")) (setq pt2 (vlax-curve-getClosestPointTo obj pt acextendnone)) (setvar 'osmode 0) (command ".DIMLINEAR" pt pt2 "") (setvar 'osmode oldsnap) ) ) Quote
BIGAL Posted October 13, 2017 Posted October 13, 2017 Very simple fix dim expects an offset point so (command ".DIMLINEAR" pt pt2 pt ) Quote
Kumar1 Posted 2 hours ago Posted 2 hours ago auto dimensioning by selecting multiple points and one line object 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.