MKI_BLOCK_TEXT (Data Block Classes) Changed in Version 2019.1 |
www.CAD6.com |
C++ Syntaxclass MKI_BLOCK_TEXT : public MKI_BLOCK_BASE { public:
wchar_t m_pText[]; };
This structure describes a data block storing STRx data (Texts).
Element DescriptionHeader [MKI_BLOCK_HEADER] This structure contains general information about the data block. The ElemType element is to be set to MKI_DB_TYPE_TEXT (8). Data Changed in Version 2019.1 [whar_t[]] List of data elements stored in the data block.
MKD SyntaxThis data block is used to store one value of type MKI_STRW.
BlockOwner,BlockType,8,ElemCount,Text;
Element DescriptionBlockOwner [__int16] This value is a unique identification of the creator of the plug-in that created the data block. The value MKI_DB_OWNER_MK is reserved for use by Malz++Kassner, especially for objects and data blocks that are created and handled directly by the application. Valid range: 0 <= Value < 10000. Third-party vendors that plan to implement a plug-in should contact Malz++Kassner to receive their unique identification (see Getting Your Private Owner ID). BlockType [__int16] This value is an internal identification of the data block. This value is used by the plug-in that created this object. For information about this value see the documentation of the plug-in which should include a description of all extended objects used. Data blocks created by third-party vendors should use values between 1000 and 29999 (inclusive), the other values are reserved for direct use by Malz++Kassner. ElemCount [__int16] Maximum text length to be stored in this data block. If the value is positive, only the number bytes actually needed to store the current text will be allocated. This saves memory, but requires a reorganisation of the data block structure each time the text is altered. If the value is negative, the amount of bytes given by the absolute value of ElemCount will be allocated statically in memory, allowing a direct modification of the text. Both types of texts must be supported. The static allocation (negative ElemCount) is currently only used for texts containing dimension numbers. The absolute value must be between 1 and MKI_LENGTH_TEXT_LONG (inclusive). Text Changed in Version 2019.1 [wchar_t[]] Character string. The length of the string may be less or equal to ElemCount, including 0. The text must consist of Ansi characters and is delimited by the characters " (Ansi 34). The maximum size of texts and comments is MKI_LENGTH_TEXT_LONG characters, inside of dimensions it is MKI_LENGTH_TEXT_SHORT characters.
The text may contain variables (see Variables), terms (see Mathematical Terms) and statements (see Statements). Variables are text sections delimited by the character ~ (Ansi 126). A possible text including a variable is: Serial Number: ~SerNum~ If such a variable is found inside a text, the application first checks whether such a variable is defined drawing-wide. If not, it determines whether the text object resides inside a block. If so, an attribute having the same name as the variable (in this example: SerNum) is searched. If it does exist, the current value of that attribute is displayed instead of the variable's name. Supposing the value of the attribute SerNum is "DT3507", the displayed text would be: Serial Number: DT3507 A text may contain more than one variable. If the attribute of the given name is not found, the text "(Undefined)" will be display instead of the attribute's value. If the text object is not inside a block, the text is displayed unmodified.
CommentThe following MKI_STRW data block types are predefined:
Data Block Type 110 (Texts) A data block of type MKI_DB_ALL_TEXT (110) is used to store a single MKI_STRW, mainly in texts and dimensions.
BlockOwner,110,2,ElemCount,Text;
|
CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH