Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP NEEDED FOR DATA EXTRACTION TABLE

1 REPLY 1
Reply
Message 1 of 2
nelson_creek
409 Views, 1 Reply

LISP NEEDED FOR DATA EXTRACTION TABLE

can a routine modify the standard table from extracted data?  i'd like to take y coordinates, such as 100'- 6", and display it as N. 100'-6 or S. 100'-6" for a negative value.  the same process for x coordinates and display them as E. "value" or "W. "value".  i don't anything about writing code, so i appreciate anyone willing to help me with this.  thanks

1 REPLY 1
Message 2 of 2
smaher12
in reply to: nelson_creek

You might need to clarify with an image on what you trying to accomplish. Meanwhile the following will allow you to pick points and display N. or S. for a negative value and same for E. or W. Don’t know, may or may not help….

 

 

(defun c:test (/ pt x y x1 y1)
(setq pt (getpoint "\nSpecify point: "))
(setq x (rtos (car pt)))
(setq y (rtos (cadr pt)))

(if (> (car pt) 0)
(setq xpos "E. ")
)
(if (< (car pt) 0)
(setq xpos "W. ")
)
(if (> (cadr pt) 0)
(setq ypos "N. ")
)
(if (< (cadr pt) 0)
(setq ypos "S. ")
)

(setq x1 (abs (atof x)))
(setq y1 (abs (atof y)))
(command "_.text" "m" pt "" "" (strcat ypos (rtos y1 4 1) " " xpos (rtos x1 4 1)))
(princ)
)

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost