
Originally Posted by
bharthts01
Basically what you're trying to say is if I put a number after
Code:
(strcat "X=" (rtos (car p)) "\\XY=" (rtos (cadr p)))
Code:
(strcat "X=4" (rtos (car p)) "\\XY=" (rtos (cadr p)))
This should then change the 'gap' between each of the x and y coordinates?
EDIT: No, it doesn't it just adds a number in front of the x and y coordinates.
The luprec and And lunits just confuse me, I put a number e.g. 3/4 and it adds fractions to the end of the coordinates.
To explain further, the rtos function (as used in my code) converts the X & Y numerical coordinate values of the selected point into strings to be used with the DimOrdinate command.
The rtos function takes the following format:
Code:
(rtos <number> <units> <precision>)
If the units and precision parameters are not supplied, rtos will use the current values of the LUNITS and LUPREC System Variables.
To use specific Units and Precision, supply the rtos function with the units and precision parameters, hence, in my code:
Code:
(strcat "X=" (rtos (car p)) "\\XY=" (rtos (cadr p)))
becomes:
Code:
(strcat "X=" (rtos (car p) 2 0) "\\XY=" (rtos (cadr p) 2 0))
Here, 2=decimal and 0=zero decimal places.
The "\\X" part of the string:
Code:
(strcat "X=" (rtos (car p) 2 0) "\\XY=" (rtos (cadr p)2 0))
forces the subsequent text ("Y=....") onto a new line beneath the dimordinate dimension line.
Removing the "\\X" from the string will keep everything on the same line:
Code:
(strcat "X=" (rtos (car p) 2 0) " Y=" (rtos (cadr p) 2 0))
Bookmarks