MKI_RefFastInsert (Entity Creation) Changed in Version 2022.2

www.CAD6.com

C++ Syntax

MKI_ENTITY_REF_PTR

MKI_RefFastInsert(

 MKI_CONST_ENTITY_PTR f_pRefEntity );

 

This procedure terminates a currently opened provisional drawing reference (see MKI_RefOpen) and inserts it to a provisional extended object, group, block, or to the current drawing (in that order).

 

Parameters

RefEntity New in Version 2022.2

[MKI_CONST_ENTITY_PTR] Address of a reference entity behind which the drawing reference shall be inserted. If RefEntity is nullptr, the drawing reference is appended at the end.

 

Return Value

Returns the address of the new drawing reference if it was successfully inserted. Returns nullptr if the insertion was not successful, normally due to insufficient memory.

 

Regardless of the result, the provisional drawing reference is closed afterwards (either because it was not open to start with, or because it was just closed before trying to insert it).

 

Comment

This procedure is a kind of macro that executes steps similar to the following code segment:

 

MKI_RefAddEnd();

MKI_ENTITY_REF_PTR pNewEntity = MKI_RefInsert( f_pRefEntity );

MKI_RefClose();

return( pNewEntity );

 

This causes the provisional drawing reference 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.0 - Copyright 2025 Malz++Kassner® GmbH