MKI_ConvertVariablesEx (Strings) Changed in Version 2020.1

www.CAD6.com

C++ Syntax

bool

MKI_ConvertVariablesEx(

 const LPCWSTR f_pszText,

 LPWSTR f_pszBuffer,

 const size_t f_unBufferSize,

 MKI_CONST_UNITSTACK_PTR f_pStack,

 __int32 f_nSystem,

 MKI_CONST_UNIQUE_ID_PTR f_pLinkedID,

 MKI_VARIABLEDEF_PTR f_pExtraVariables,

 __int32 f_nExtraCount,

 __int32 f_nDigits );

 

 template <size_t f_unSize> bool

 MKI_ConvertVariablesEx(

         const LPCWSTR f_pszText,

         wchar_t (&f_rDestin)[f_unSize],

         MKI_CONST_UNITSTACK_PTR f_pStack,

         __int32 f_nSystem,

         MKI_CONST_UNIQUE_ID_PTR f_pLinkedID,

         MKI_VARIABLEDEF_PTR f_pExtraVariables,

         __int32 f_nExtraCount,

         __int32 f_nDigits );

 

Resolves all Variables (including the provided ones) and Attributes contained in a text (recursively, if necessary), as well as Statements, and returns the resolved text.

 

This conversion will work regardless of the current settings in the View > Drawing Settings > Screen options dialog. Use MKI_ConvertVariables instead to depend on the user settings.

 

Parameters

Text

[const LPCWSTR] Text to be resolved. Any variables contained in this text will be replaced by their values, recursively if necessary.

Buffer

[LPWSTR] Pointer to or [wchar_t[]&] Reference to a buffer into which the resolved text shall be stored. The result is a standard text as described in Formatting.

BufferSize

[const size_t] Size of the buffer in UTF-16 characters, i.e. maximum string length including the terminating zero.

Stack New in Version 2020.1

[MKI_CONST_UNITSTACK_PTR] Either the address of a MKI_ENTITYSTACK structure containing the sequence of entities used to access the text (and thus possibly containing attributes required to resolve it) or nullptr. Will be used for implicit variable and local attribute resolving.

System New in Version 2017.0

[__int32] Index of the coordinate system that shall be used for conversions.

LinkedID New  in Version 2017.0

[MKI_CONST_UNIQUE_ID_PTR] Address of a linked unique ID that can be used in terms were a unique ID is expected but not stated explicitly. If nullptr, no implicit unique ID is available.

ExtraVariables

[MKI_VARIABLEDEF_PTR] Address of a list of variable definitions that shall be used in addition to the currently defined attributes and variables. May be nullptr if unused.

ExtraCount

[__int32] Number of valid entries in ExtraVariables.

Digits

[__int32] Number of fractional digits for double to string conversion in terms. Set to -1 for system default.

 

Return Value

Returns true if successful, false if not.

 

Comment

Any local attribute defined in the entities pointed to by Stack will overwrite equally named variables in ExtraVariables! Apart from that, variables in ExtraVariables will be preferred to global variables in the current drawing.

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH