MKI_ENTITY_REF (Entity Classes) Changed in Version 2026.0

www.CAD6.com

C++ Syntax

calss MKI_ENTITY_REF : public MKI_ENTITY_BASE

{

  public:

 

  MKI_XPROPERTY m_cXProperty;

  MKI_FILEREFERENCE m_szDrawingName;

  MKI_DISPLAY_EFFECT m_cDisplayEffect;

  MKI_MATRIX m_cDisplayMatrix;

  __int32 m_nDisplayMode;

  MKI_DRAWINGREF m_cOptions;

  MKI_HIDELAYERS m_afHideLayers;

 

  char m_pData[];

};

 

This structure describes an entity of type MKI_ENTITYTYPE_REF, i.e. an external drawing reference. m_nHeader.m_nEntityType must be MKI_ENTITYTYPE_REF (4).

 

Element Description

m_cXProperty

[MKI_XPROPERTY] Properties of the instance including transmission.

m_szDrawingName Changed in Version 2019.1

[MKI_FILEREFERENCE] File name of the drawing to be displayed, maximum 255 characters.

m_cDisplayEffect New in Version 2026.0

[MKI_DISPLAY_EFFECT] Color display effect of the drawing reference. All colors of entities stored in the drawing reference have to be modified according to those effects before display.

m_cDisplayMatrix

[MKI_MATRIX] Display matrix of the drawing reference. All entities stored in the drawing reference have to be multiplied with this matrix before display. It contains translation, rotation, scaling and distortion.

m_nDisplayMode

[__int32] Bit-wise OR combination of some flags indicating the display mode for references. Possible values are (see MKI_DISPLAYMODE_*):

MKI_DISPLAYMODE_DEFAULT

MKI_DISPLAYMODE_SCALED_WIDTH

MKI_DISPLAYMODE_CONFINED

MKI_DISPLAYMODE_NOGEO

MKI_DISPLAYMODE_ADAPT_ANGLE

MKI_DISPLAYMODE_SCALED_LENGTH

MKI_DISPLAYMODE_ADAPT_SCALE

MKI_DISPLAYMODE_NOHIDE New in Version 2021.1

m_szOptions New in Version 2026.0

[MKI_DRAWINGREF] Import settings for non-MKD references.

m_cHideLayers New in Version 2018.0

[MKI_HIDELAYERS] This array contains one bit for each layer indicating if the layer shall be output or not.

m_pData

[char[]] This data section contains a list of data blocks (see Data Blocks). The data section of a reference only contains local attributes (see MKI_BLOCK_ATTRIBUTE), followed by an end-of-list data block (MKI_DB_END).

 

Attributes New in Version 2021.0

A reference may contain attribute data blocks (see MKI_BLOCK_ATTRIBUTE) only of type "local". Attributes of types "global", "outline", and "point" must not exist. The total number of attributes per reference is limited to MKI_ATTRIBS_PER_OBJECT.

 

MKD Syntax

This entity represents an external drawing reference. It is used to reference and display a complete drawing file. An entity of type "Drawing" has the following structure:

 

0,EntityOwner,4,UniqueID,XProperty,

DrawingName,

DisplayEffect,DisplayMatrix,DisplayMode,

Options,HideLayers;

-Data Block List-

,999,0,0;

-Entity List-

,,999,,"";

 

Parts of Options will only be written if Options.m_nFileType is not MKI_FILETYPE_MKD. If HideLayers is completely zero, it may be omitted.

 

Element Description

EntityOwner

[__int16] This value is a unique identification of the plug-in that created the entity. 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).

-Data Block List-

The data block list contains a list of data blocks (see Data Blocks). Currently, references only contain local attributes. This may change in further releases, so be prepared to find global attributes and other data blocks in this section.

-Entity Link List-

The entity link list contains the extended object's sub-entity link-list ("link data") as defined by m_cHeader.m_pLinkFirst and Header.LinkLast. Currently, this list is usually empty (except for maybe entities of extended object's link lists).

 

Example

|Header,XProperty|

0,0,4,"",64,0,0,0/0/0,0/0/0,0.0,0,0,1,

|DrawingName|

"\\Server\Pool\01224349.mkd",

|DisplayEffect,DisplayMatrix,DisplayMode|

0,0,0,0,0/0/0,2.0,0.0,0.0,2.0,50.0,0.0,

|FileType,CacheName,Options,HideLayers|

0;

|B999|

0,999,0,0;

 

This drawing reference inserts the drawing file "\\Server\Pool\01224349.mkd". The drawing will be displayed at location (50.0,0.0), scaled by factor 2.0. Since the reference uses a MKD file (FileType = 0), neither Options not CacheName are written. HideLayers was omitted because it is completely zero.

 

CAD6interface 2026.0 - Copyright 2026 Malz++Kassner® GmbH