Hi, I am in a bit of a hurry, I need to draw a table with point number, easting, northing, elevation for a lot of points and need a lisp to read the xl spreadsheet and draw the table, can you help.
Your firts error is the WCMATCH wilcard use
(prompt (strcat "\n" LN)) ;;;"0\t415013.38\t790131.48\t0" (cond ((wcmatch LN "*`,*") (setq CD T)); CD = Comma Delimited ;;;;the COMMA char is a reserved wildcar , in this case it will return T , despite it have no comma ;;;"0\t415013.38\t790131.48\t0" ;;To use COMMA as pattern it need a reversed quote ` ((wcmatch LN "*`\t*") (setq CD nil)); space delimited ;;Your file is not space limited , it is TAB limited ;; browse the lisp help for wcmatch (T (prompt "\nDid not recognize format.") (quit)); otherwise ); cond
Also you have a miss )
(setq pt2 (list 0 0)) (Setq pt3 (list 0 25));_ miss parenthesis (setq pt4 (list 150 25))
I have to chek it further more , it is the start.
Feel fre to contact me , if you want to.
Had a little time to look at my lisp and the attached works pretty well, a few tweeks to go but I am all good now. You may have the text rotated weirdly but it works fine for our 0 degrees orientation of North.
To fill the table , you need TEXT , so you shall use (RTOS number 2 4) 2 for decimal , 4 for precision or
From the VLIDE help
Converts a number into a string (rtos number [mode [precision]]) The rtos function returns a string that is the representation of number according to the settings of mode, precision, and the system variables UNITMODE, DIMZIN, LUNITS, and LUPREC. Arguments number A number. mode An integer specifying the linear units mode. The mode corresponds to the values allowed for the LUNITS AutoCAD system variable. The mode can be one of the following numbers: 1 Scientific 2 Decimal 3 Engineering (feet and decimal inches) 4 Architectural (feet and fractional inches) 5 Fractional
ITOA , integer to alfa
itoa Returns the conversion of an integer into a string (itoa int) Arguments int An integer. Return Values A string derived from int. Examples Command: (itoa 33) "33" Command: (itoa -17) "-17"