thiemksb Posted April 28, 2023 Posted April 28, 2023 Hello, i am newbie. How to draw line (red) perpendicular with tops of polygon(yellow) use VBA many thanks Quote
BIGAL Posted May 1, 2023 Posted May 1, 2023 Ok the way to do is depends on the yellow lines simplest is pick 2 points, get the angle add pi / 2 and subtract pi / 2 for the end angle then draw a line. If its a pline can do automatically. I only dabble in VBA but use this as a guide in lisp convert it to VBA, also why VBA ? (defun c:test ( / dist pt1 pt2 pt3 pt4 ) (setvar 'osmode 1) (setq dist 10) (setq pt1 (getpoint "\nPick point 1 ")) (setq pt2 (getpoint "\nPick point 2 ")) (setq ang (angle pt1 pt2)) (setq pt3 (polar pt1 (+ ang (/ pi 2)) dist)) (setq pt4 (polar pt2 (+ ang (/ pi 2)) dist)) (command "line" pt1 pt3 "") (command "line" pt2 pt4 "") (princ) ) (c:test) This is just a start need a while added for more point picks. 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.