Iftikhar Arain Posted July 3, 2024 Posted July 3, 2024 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 Quote
Iftikhar Arain Posted July 3, 2024 Author Posted July 3, 2024 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? Quote
BIGAL Posted July 3, 2024 Posted July 3, 2024 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 ! 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.