How can change basic command to Lisp command?.

How can change basic command to Lisp command?.

jinkinglee
Enthusiast Enthusiast
419 Views
1 Reply
Message 1 of 2

How can change basic command to Lisp command?.

jinkinglee
Enthusiast
Enthusiast

Learning lisp.

 

I did with basic language.

  

Point Name is N, N_X, P13.

 

Dist from P13 to ? = 4.97

 

Dist from N to ? = 3.09

 

 

ABC_COMMAND "TEXT", P13, 0.25, 0, " N,P13="+ABC_RTOS(P13.X - N.X,-1,2)

 

DATA_PT = ABC_POLAR( N_X, 0.0, 0.5 )

DATA_PT = ABC_POLAR( DATA_PT, -PI/2, 1.0 )

ABC_COMMAND "TEXT", DATA_PT, 0.25, -90, "Y=N,P13="+ABC_RTOS(N.Y – P13.Y,-1,2)

 

Like this or ?:

COMMAND "TEXT" "" (strcat "N,P13 = " (rtos (DISTANCE ????? ) 2 2)))

Please help me.

Thanks.

JinCapture.PNG

0 Likes
420 Views
1 Reply
Reply (1)
Message 2 of 2

smaher12
Advocate
Advocate

Not sure of what your trying to accomplish but I gave it a shot.

 

 

(defun C:333 (/ p1 p2)

   (setq p1 (getpoint "\nSpecify first point: ")
         p2 (getpoint p1 "\nSpecify second point: ")
   )
  (command "_.text" "s" "Standard" "r" "_none" p2 10 0 (strcat "N,P13 = " (rtos (distance p1 p2) 2 2)))
)
0 Likes