LISP QUESTION FOR A CIRCLE COMMAND

LISP QUESTION FOR A CIRCLE COMMAND

alx86
Enthusiast Enthusiast
2,131 Views
3 Replies
Message 1 of 4

LISP QUESTION FOR A CIRCLE COMMAND

alx86
Enthusiast
Enthusiast

Hi,

I'm beginner with Lisp Editor. I'm able to create basic functions (really basic 😉 ) 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")  

     )

0 Likes
Accepted solutions (1)
2,132 Views
3 Replies
Replies (3)
Message 2 of 4

nestly
Advisor
Advisor
Accepted solution

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

Message 3 of 4

alx86
Enthusiast
Enthusiast

Thank a lot, exactly what I was looking for.

I also add Lynn Allen to my subscription on Youtube 🙂

0 Likes
Message 4 of 4

scot-65
Advisor
Advisor

@Anonymous wrote:

Hi,

I'm beginner with Lisp Editor. I'm able to create basic functions (really basic 😉 ) 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
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes