Jump to content

Recommended Posts

Posted

how to get x & y coords from given angle and distance.

i need a code for that

 

if Distance=80, Angle=45.....i want to draw line with first point A(0,0) to the next point B from given distance and angle.

I know i can use @distance

 

Kindly reply

 

Thanks a lot:)

Posted
(Setq B (polar A [angle in radians] distance))

Posted

Try this .

 

(setq b (polar '(0. 0. 0.) (/ pi 4.) 80.))

Posted

A bit more

 

(defun dtr (a)
(* pi (/ a 180.0))
)
(setq pt1 (getpoint "\nPick point")) 
(setq ang (dtr (getreal "\nEnter angle")))
(setq dist (getreal "\nEnter distance"))
(Setq pt2 (polar pt1 ang dist))
(princ pt2)

Posted
(setq ang ([b]getangle[/b] "\nEnter angle"))

Posted

Thanks a lot guys........ its working great for me:thumbsup:

Posted

i want to ask 1 more thing while drawing leader from entmakex

what is code for arrow head type, i want to give user arrow head by block

Posted

hmmmn. never tried creating a leader using entmakex before. Hows about showing us your code satishrajdev

Posted

       (entmakex (list '(0 . "LEADER")
	       '(100 . "AcDbEntity")
	       '(100 . "AcDbLeader")
	       '(410 . "Model")
	       (cons 10 (trans B 1 0))
	       (cons 10 (trans A 1 0))
	       '(71 . 1)
	       '(72 . 0)
	       '(73 . 3)
	       '(74 . 0)
	       '(75 . 0)
	       '(76 . 2)
	 )
      )

 

I want to change arrow head to "user Arrow" and specify a blockname for that

Posted

My guess is it will be too complicated compared to AddLeader Method. But i'm pretty sure it can be done.

Posted

Ok.

 

Then any suggestions from your side, or any else way to do this????

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...