Jump to content
ivanfrancis

Create a line with Corresponding Dimension

Recommended Posts

ivanfrancis

Hi, I was wondering if i could use two commands, line and dimlinear, in a single lisp file. this one i have measures a line you set with two points and creates a line that is a 1/3 in length of the distance between the two points. I want to add dimension line that will be 500 units above the created line. Any help would be very much appreciated. Thank you in advance.

 

(defun c:aa ()

(setq po1 (getpoint "Pick first point:")

po2 (getpoint po1 "Pick second point:")

le (/ (distance po1 po2) 3)

po3 (polar po1 (angle po1 po2) le))

(entmake (list '(0 . "LINE") (cons 10 po1) (cons 11 po3)))

)

Share this post


Link to post
Share on other sites
SLW210

Please read the Code Posting Guidelines and edit your Code to be included in Code Tags.[NOPARSE]

Your Code Here[/NOPARSE]

=

Your Code Here

Share this post


Link to post
Share on other sites
BIGAL

Just look at the steps in creating the dimension write them down, you need an extra point this is 500 units above po1 use a polar with (+ (/ pi 2.0) (angle po1 po2)). As a hint when you type dimalign when it asks for a start point type !po1 then type !po3 this will use the two lisp points previously created.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×