MKI_ObjectInsert (Entity Creation) Changed in Version 2019.0

www.CAD6.com

C++ Syntax

MKI_ENTITY_OBJECT_PTR

MKI_ObjectInsert(

 MKI_CONST_ENTITY_PTR f_pRefEntity );

 

Inserts the temporary object (see MKI_ObjectOpen) to a memory list. If no temporary clipping surface, extended object, group, or block is currently open, the object is inserted to the main memory list of the drawing behind the object pointed to by RefEntity. If RefEntity is nullptr, the object is appended at the end.

 

If a temporary clipping surface, extended object, group, or block is currently open (in that order), the object is appended to that entity. RefEntity is ignored in this case.

 

In most cases, you can use MKI_ObjectFastInsert instead of this procedure to speed up execution and to reduce code size. See the description of that procedure for details.

 

Parameters

RefEntity

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

 

Return Value

Returns the address of the inserted object. Returns nullptr if the insertion was not successful, normally due to insufficient memory.

 

The returned object address is valid (and therefore can be used for subsequent modifications) even after the temporary object has been closed using MKI_ObjectClose. The object pointer remains valid until the plug-in returns control to the serving application or the plug-in modifies the object by itself, e.g. deleting it.

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH