Jump to content

Recommended Posts

Posted

how to place the line with angle using code.actually i want to place the line with 15Degrees.Please see the picture.

 

like Command: l LINE Specify first point:

Specify next point or [undo]: @250

 

Command: l LINE Specify first point:

Specify next point or [undo]: @250LineWithAngle.jpg

Posted (edited)

Please take a look to POLAR function; take care that accept angle in radians as argument.

 

(command "_LINE" MyFirstPoint (polar MyFirstPoint theAngle theLength) "")

Regards,

Mircea

Edited by MSasu
spelling
Posted

msasu tried.but no working..currently i am using

 

(defun c:1 ()

(command "_Line" Pause "@1500

(princ))

(defun c:2 ()

(command "_Line" Pause "@1500

(princ))

Posted

You can achive the same result by using the code below - please feel free to adjust this example to suit your needs.

 

(setq OldOsmode (getvar "OSMODE"))
(setq thePoint (getpoint "\nInsertion point: "))

(setvar "OSMODE" 0)
(command "_LINE" thePoint (polar thePoint (* (/ 15 180.0) pi) 1500.0) "")
(command "_LINE" thePoint (polar thePoint (* (/ 75 180.0) pi) 1500.0) "")
(setvar "OSMODE" OldOsmode)

 

Regards,

Mircea

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...