VS:Num2StrF: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
No edit summary
Line 35: Line 35:
<remark>
<remark>


 
IMPORTANT NOTE: whether or not you get unit marks appended to the returned string value depends on a user-accessible Show Marks setting in the Units dialog box (CMP)


This appears not to work as advertised. The string value returned appears to be in inches no matter the unit settings of the document.</remark>
This appears not to work as advertised. The string value returned appears to be in inches no matter the unit settings of the document.</remark>
Line 41: Line 41:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<sample>
<sample>
==== VectorScript ====
<code lang="pas">
<code lang="pas">
oldnumValue:=23.45;
oldnumValue:=23.45;
newStrValue:=Num2StrF(oldnumValue);
newStrValue:=Num2StrF(oldnumValue);
{would return 1'-11 1/2"}</code>
{would return 1'-11 1/2"}</code>
==== Python ====
<code lang="py">
</code>
</sample>
</sample>



Revision as of 18:08, 4 April 2014

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Function Num2StrF converts a specified REAL value into a string. The numeric value will be converted and displayed in the current unit settings of the drawing.

FUNCTION Num2StrF(
vDistance :REAL) : STRING;
def vs.Num2StrF(vDistance):
    return STRING

Parameters

vDistance REAL Numeric value.

Remarks

IMPORTANT NOTE: whether or not you get unit marks appended to the returned string value depends on a user-accessible Show Marks setting in the Units dialog box (CMP)

This appears not to work as advertised. The string value returned appears to be in inches no matter the unit settings of the document.

Example

VectorScript

oldnumValue:=23.45;
newStrValue:=Num2StrF(oldnumValue);
{would return 1'-11 1/2"}

Python


Version

Availability: from All Versions