![]() |
MKI_InstanceFastInsert (Entity Creation) Changed in Version 2022.2 |
www.CAD6.com |
C++ SyntaxMKI_InstanceFastInsert( MKI_CONST_ENTITY_PTR f_pRefEntity, bool f_fEmbed );
This procedure terminates a currently opened provisional instance (see MKI_InstanceOpen) and inserts it to a currently open provisional clipping surface, extended object, group, block, or to the current drawing (in that order).
Parametersf_pRefEntity New in Version 2022.2 [MKI_CONST_ENTITY_PTR] Address of a reference entity behind which the instance shall be inserted. If f_pRefEntity is nullptr , the instance is appended at the end. f_fEmbed New in Version 2022.2 [bool] If true, the block will be embedded, i.e. the block data will become part of the drawing (increasing the drawing size significantly). Otherwise, the block data will only be referenced by library name (making the drawing dependent from the external library file). Will be ignored if the instance is not inserted to the main memory list or if the instance references an internal block.
Return ValueReturns the address of the new instance if it was successfully inserted. Returns nullptr if the insertion was not successful, normally due to insufficient memory.
Regardless of the result, the provisional instance is closed afterwards (either because it was not open to start with, or because it was just closed before trying to insert it).
CommentThis procedure is a kind of macro that executes steps similar to the following code segment:
MKI_ENTITY_INSTANCE_PTR pNewEntity = MKI_InstanceInsert( f_pRefEntity, f_fEmbedded ); return( pNewEntity );
This causes the provisional instance to be terminated, initialized and then inserted to the current drawing. Afterwards, it is closed. For a detailed description, see the referenced procedure's descriptions.
If possible, you should use this command instead of calling the separate procedures to increase speed and to reduce code size.
|
CAD6interface 2025.1 - Copyright 2025 Malz++Kassner® GmbH