MKI_ObjectReplace (Entity Creation) Changed in Version 2019.0

www.CAD6.com

C++ Syntax

MKI_ENTITY_OBJECT_PTR

MKI_ObjectReplace(

 MKI_CONST_ENTITY_PTR f_pRefEntity,

 bool f_fDuplicate );

 

Replaces the entity pointed to by RefEntity with the provisional object (see MKI_ObjectOpen). If RefEntity is part of a group, it will be replaced within the group.

 

An open provisional block, group, clipping surface, or extended object will be ignored.

 

Parameters

RefEntity

[MKI_CONST_ENTITY_PTR] Address of the object to be replaced.

Duplicate

[bool] If true, a duplicate will be created. As a result, RefEntity will not be deleted, but the new object will be added. If RefEntity is part of a group, the new object will be added outside the group.

 

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 provisional 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 2025.0 - Copyright 2025 Malz++Kassner® GmbH