MKI_ConvertStringLength (Strings) Changed in Version 2015.0

www.CAD6.com

C++ Syntax

bool

MKI_ConvertStringLength(

 double& f_rValue,

 const LPCWSTR f_pszText,

 HWND f_hParentWindow );

 

Converts a string's content into a length value, with terms like (0.5+2.0)/3 being evaluated.

 

Parameters

Value

[double&] Address of variable to receive the evaluated length value.

Text

[const LPCWSTR] Text containing the length value to be converted. This text may either include a single numeric value or a complete term like (0.5+2.0)/3 . For a description of the term syntax see Mathematical Terms.

ParentWindow

[HWND] If this handle is not nullptr, the corresponding window will be used as parent window of any error message occuring during term evaluation. If ParentWindow is nullptr, no error message is displayed.

 

Return Value

Returns true if successful, false if not.

 

Comment

This procedure will allow a value range of MKI_COORD_MIN (-1e100) to MKI_COORD_MAX (1e100). The default units are the currently active units for lengths and angles.

 

The term evaluation is limited to 100 bracket levels and 1000 elements per bracket level.

 

CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH