Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

cool.stuff
895 Vistas, 7 Respuestas

Ask for distance and store it and add distance in text with a certain height - Modify LISP

Hi!! :cara_con_una_leve_sonrisa:


New year community!! :cara_con_una_leve_sonrisa:


I've found this lisp:


;Use this command to measure the distance between two points while applying a Combined Scale Factor
;Be sure to copy this lisp to your job folder, and set your CSF as required. Do not change CSF outside of job folder.
;Ahmed F. 2017
(defun c:DM ()
(setq TD 0)
(setq x1 (getpoint "\nSelect First Point: "))
(setq x2 (getpoint x1 "\nSelect Second Point: "))
(prompt
(strcat
(rtos (distance x1 x2))
(rtos (setq TD (+ TD (/(distance x1 x2) 0.12345))))
)
)
(prompt (strcat "\nTotal Distance = " (rtos TD)))
(princ)
)


It measures a distance and divide it by the factor 0.12345.


I would like to know if anyone could help me and change the lisp to do the following things please:
- Asks for the factor and store it in a variable. Later, if the user wants, if could set the factor again (like the fillet radius);
- Add a text with the TD value, which would be placed in the 2nd point (it would be possible to define the text height, as the factor?);


Many many thanks!!! :cara_con_una_leve_sonrisa:

Etiquetas (1)