C++
ACCORE_PORT int acdbRToS( double val, AcString & sOut, int unit = -1, int prec = -1 );
File
acedads.h
Description
Formats a floating-point value as a string.
The following table lists the valid values for the units argument.
Linear units values:
1 | Scientific |
2 | Decimal |
3 | Engineering (feet and decimal inches) |
4 | Architectural (feet and fractional inches) |
5 | Fractional |
The current value of the AutoCAD DIMZIN dimensioning variable controls how acdbRToS() writes leading or trailing zeros to str.
If acdbRToS() succeeds, it returns RTNORM; otherwise, it returns an error code.
Parameters
Parameters | Description |
---|---|
val | Value to format |
sOut | Output string of the newly formatted value |
unit | Units into which the string is formatted as a valid AutoCAD LUNITS value; if -1, uses the current value of LUNITS |
prec | Number of decimal places of precision to include in the string; if -1, uses the current value of the AutoCAD LUPREC system variable |