MKI_LAYERDEF (Entity Data Classes) Changed in Version 2023.2 |
www.CAD6.com |
C++ Syntaxclass MKI_LAYERDEF { public:
MKI_LAYERNAME m_szLayerName; MKI_COMMENTSHORT m_szLayerComment; MKI_XPROPERTY m_cLayerIntern, m_cLayerExtern; __int32 m_nLayerMode;
void Init( void ); };
This structure contains a layer definition.
Element Descriptionm_szLayerName Changed in Version 2019.1 [MKI_LAYERNAME] Name of the layer, up to 255 characters. m_szLayerComment Changed in Version 2019.1 [MKI_COMMENTSHORT] Comment on the layer, up to 63 characters. m_cLayerIntern [MKI_XPROPERTY] This set of properties defines single or multiple properties to be transmitted to all entities assigned to this layer during display. This transmission has a higher priority then the pen transmission, i.e. it will override properties transmitted by the pen. However if an object property is fixed any transmission will be ignored. A transmission of the layer index will be ignored, of course. This extended property set will only be used if the layer transmission is not identical for display and output. m_cLayerExtern [MKI_XPROPERTY] This set of properties defines single or multiple properties to be transmitted to all entities assigned to this layer during output. This transmission has a higher priority then the pen transmission, i.e. it will override properties transmitted by the pen. However if an object property is fixed any transmission will be ignored. A transmission of the layer index will be ignored, of course. m_nLayerMode [__int32] Determines whether the layer is locked, displayed and/or idle (see MKI_PENLAYERMODE_*).
MKD SyntaxThe section =LAYER= contains up to MKI_LAYER_MAX layer definitions.
A layer defines a transparency which is used to integrate a special type of entities in the drawing (like outlines, fillings, hatchings, texts, dimensions etc.) into a "group". They are usually used to maintain a basic structure throughout the drawing to allow easy selection and manipulation of related entities. Especially, layers can easily be locked or hidden by a single command. Additionally, layers can transmit single or multiple properties to all entities assigned to them. This allows an easy way to distinguish the entities of different layers. As this transmission can be limited to screen display, no modification of the entities themselves is necessary.
The layer with the index 0 is named "*Standard" and is predefined by default as a visible, non-locked layer that does not transmit any properties. This layer is valid throughout all drawings and libraries and does not occur in any MKD file.
Head of Section=LAYER=; TotalNum,LayerBaseModes,LayerActive;
Entry for each Layer DefinitionLayerName,LayerIndex, LayerIntern, LayerExtern, LayerMode,LayerComment;
End of Section=END=;
If the section =LAYER= does not exist, assume no layer to be defined (m_nTotalNum = 0) and layer 0 to be active. In this case, m_nLayerBaseMode should be initialized with MKI_BASEMODE_DEFAULT.
Element Descriptionm_nTotalNum [__int32] Number of layer definitions to follow. Valid range is 0 to MKI_LAYER_MAX inclusive. m_nLayerBaseMode Changed in Version 2017.0 [__int32] Basis layer handling modes, see MKI_BASEMODE_*. Supported modes are:
MKI_BASEMODE_PROPS_IDENTICAL Determines whether the two property sets of the pen are used, or only the external set. If set, only the property set m_cPenExtern is used both for display and output. If not set, the property set m_cPenExtern is used for output, the property set m_cPenIntern is used for display.
MKI_BASEMODE_SHOW_COMMENTS No longer effective in Version 2023.2 If set, pen comments will be displayed in all layer dialog lists in the application in addition to the pens' names. m_nLayerActive [__int32] Index of the layer that was active when the drawing was saved (referring to m_nLayerIndex). Valid range is 0 to MKI_LAYER_MAX inclusive. This value is optional and will be set to 0 if not existing! m_nLayerIndex [__int32] Index of the layer (1 to MKI_LAYER_MAX). Each index may be assigned to one layer only, as this index is used internally to identify a layer.
Example of a Layer Definition|Name,Index| "Hatchings",100, |Intern| 10,0,0,1.0/1.0/1.0,1.0/0.0/0.0,0.0,0,0,0, |Extern| 0,0,0,1.0/1.0/1.0,0.0/0.0/0.0,0.0,0,0,0, |Mode| 3, |Comment| "";
This is the definition of the layer "Hatchings" having the index 100. All enitities assigned to this layer will be displayed framed with a red line. During output (to printer, clipboard etc.) they will keep their own properties. The entities are visible, will be output and can be modified.
|
CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH