AutoCAD 2007/2008/2009

AutoCAD 2007/2008/2009

Reply
Active Contributor
abonneau
Posts: 26
Registered: ‎05-23-2012
Message 1 of 4 (843 Views)
Accepted Solution

LISP QUESTION FOR A CIRCLE COMMAND

843 Views, 3 Replies
06-20-2012 08:43 AM

Hi,

I'm beginner with Lisp Editor. I'm able to create basic functions (really basic :smileywink: ) I wan't to create a Lisp that will start a circle with 3 points wich the 3 point selection mode being:

1st:  TAN
2nd: TAN

3th:  NEAR

 

I think that what I need would look something like this, but I don't know if it's possible to insert a mouse click (for the selection) in the routine. :

 

(defun C:c3t (/)  

  (command "circle" "3p" "TAN" (MOUSE CLICK) "TAN" (MOUSE CLICK) "NEAR")  

     )

I'm a beginner with AutoLisp also, but I knew this one thanks to Lynn Allen

 

http://www.youtube.com/watch?feature=player_detailpage&v=nnkX7M0Hikk

 

 

(defun C:c3t ()  
   (command "circle" "3p" "TAN" pause "TAN" pause "NEAR" pause)
   (princ)
)

*Pro
nestly
Posts: 1,283
Registered: ‎09-03-2010
Message 2 of 4 (841 Views)

Re: LISP QUESTION FOR A CIRCLE COMMAND

06-20-2012 09:19 AM in reply to: abonneau

I'm a beginner with AutoLisp also, but I knew this one thanks to Lynn Allen

 

http://www.youtube.com/watch?feature=player_detailpage&v=nnkX7M0Hikk

 

 

(defun C:c3t ()  
   (command "circle" "3p" "TAN" pause "TAN" pause "NEAR" pause)
   (princ)
)

Active Contributor
abonneau
Posts: 26
Registered: ‎05-23-2012
Message 3 of 4 (838 Views)

Re: LISP QUESTION FOR A CIRCLE COMMAND

06-20-2012 09:29 AM in reply to: nestly

Thank a lot, exactly what I was looking for.

I also add Lynn Allen to my subscription on Youtube :smileyhappy:

*Expert Elite*
scot-65
Posts: 2,210
Registered: ‎12-11-2003
Message 4 of 4 (827 Views)

Re: LISP QUESTION FOR A CIRCLE COMMAND

06-20-2012 03:15 PM in reply to: abonneau

abonneau wrote:

Hi,

I'm beginner with Lisp Editor. I'm able to create basic functions (really basic :smileywink: ) I wan't to create a Lisp that will start a circle with 3 points wich the 3 point selection mode being:

1st:  TAN
2nd: TAN

3th:  NEAR

 

I think that what I need would look something like this, but I don't know if it's possible to insert a mouse click (for the selection) in the routine. :

 

(defun C:c3t (/)  

  (command "circle" "3p" "TAN" (MOUSE CLICK) "TAN" (MOUSE CLICK) "NEAR")  

     )


Next, create a toolbar with your first button.

Where it shows the "Macro" line, inside the CUI, declare the following script:

^C^C.circle;3p;tan;\tan;\nea;\

 

Backslash "\" is for user to specify a point on the screen.

Semi-colon ";" is equal to [Enter].

 

untested.

Scot-65
Dyslexia is a permanent physical disability that cannot be seen.
Introverts is proof that there is indeed intelligent life on this planet.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.