Jump to content

Recommended Posts

Posted

The circle get drawn perfectly at the selected center  point by using command function but drawn far away if use entmake function.

Also, I need to know , how we can use option of colour to draw circle e.g with red colour in command function.

 

 ;Program to draw a circle 
(defun c:dcir(/ cen rad)
    (setq cen (getpoint "\nSelect centre point")      
      rad (getreal "\nEnter radius")
      )
   (command "circle" cen rad)
   ;(entmake (list (cons 0 "circle")(cons 10 cen)(cons 40 rad)(cons 62 1)))  entmake function draw circle far away from the selected center point
  );end

Posted

Thanks BIGAL, learned another thing for AutoLISP programming. Yes UCS was set up at an object. When changed this to WCS, entmake function worked. Now another question arises, why entmake function don't draw circle at a selected point while USC set up at an object?

Posted

After setting a ucs I added the trans function, but you have to check what is current UCS, I only scratched the surface in testing and maybe if (getvar 'UCSXDIR) is not 1.0 use trans.

 

(entmake (list (cons 0 "circle")(cons 10 (trans cen 1 0))(cons 40 rad)(cons 62 1)))

 

Any body else have suggestions !

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