MKI_PENDEF (Entity Data Classes) Changed in Version 2023.2 |
www.CAD6.com |
C++ Syntaxclass MKI_PENDEF { public:
MKI_PENNAME m_szPenName: MKI_COMMENTSHORT m_szPenComment; MKI_PROPERTY m_cPenIntern, m_cPenExtern; __int32 m_nPenLayer, m_nPenMode;
void Init( void ); };
This structure contains a pen definition.
Element Descriptionm_szPenName Changed in Version 2019.1 [MKI_PENNAME] Name of the pen, up to 255 characters. m_szPenComment Changed in Version 2019.1 [MKI_COMMENTSHORT] Comment on the pen, up to 63 characters. m_cPenIntern [MKI_PROPERTY] Property set for screen display. This property set will only be used if the pen transmission is not identical for display and output. m_cPenExtern [MKI_PROPERTY] Property set for output (printer, plotter, clipboard, metafile, export etc.). m_nPenLayer [__int32] Index of the layer that is to be activated if this pen is activated. If m_nPenLayer is -1, the current layer will not be changed. Valid range: -1 <= Value <= MKI_PEN_MAX. m_nPenMode [__int32] Determines whether the pen is locked, displayed and/or idle (see MKI_PENLAYERMODE_*).
MKD SyntaxThe section =PEN= contains up to MKI_PEN_MAX pen definitions.
A pen basically consists of two complete property sets, one for screen display and one for output. These two property sets provide a large flexibility in property usage. If, e.g., a drawing is created on top of a black screen background, entities could not be drawn using black lines or fillings. But later, when printing this drawing, most entities will usually be black. Using pens, this problem is easy to solve. For each line type and width to use in the drawing, define a pen that has one "colored" property set for screen display and one "black on white" property set for output. Another advantage of pen usage is the easy modification of complete entity groups - if all entities used for outlines have to be widened from 0.25 mm to 0.35 mm, simply edit the pen used for drawing these entities.
The pen with the index 0 is named "*Standard". It causes the usage of concrete properties instead of pen properties, i.e. pen 0 does not transmit any properties. In this case, the entities using this pen will be drawn using the properties stored in their m_cXProperty field - independent of the current properties of pen 0. By this means, entities can be equipped with properties that are not stored in any pen.
Head of Section=PEN=; TotalNum,PenBaseMode,PenActive; PenZero;
Entry for each Pen DefinitionPenName,PenIndex, PenIntern, PenExtern, PenLayer,PenMode,PenComment;
End of Section=END=;
If the section =PEN= does not exist, assume no pen to be defined (m_nTotalNum = 0) and pen 0 to be active. In this case, m_nPenBaseMode should be initialized with MKI_BASEMODE_DEFAULT, pen 0 should be initialized with the following properties:
0,0/0/0/0,0/1/1/1,0.25,0,3,0,0
Element Descriptionm_nTotalNum [__int32] Number of pen definitions to follow. Valid range is 0 to MKI_PEN_MAX inclusive. m_nPenBaseMode Changed in Version 2017.0 [__int32] Basic pen 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.
MKI_BASEMODE_PASSIVE New in Version 2022.2 If set, pens will be passive. As a result, they will not actively transmit their properties. Instead, their properties will only be used as initial values when creating new or modifying existing entities. All modes stored in m_nPenMode will be ignored, i.e. you cannot hide or lock passive pens. m_nPenActive [__int32] Index of the pen that was active when the drawing was saved (referring to m_nPenIndex). Valid range is 0 to MKI_PEN_MAX inclusive. This value is optional and will be set to 0 if not existing! m_cPenZero [MKI_PROPERTY] Current properties of pen 0. m_nPenIndex [__int32] Index of the pen (1 to MKI_PEN_MAX). Each index may be assigned to one pen only, as this index is used internally to identify a pen.
Example of a Pen Definition|Name,Index| "Black Type1 0.25mm",1, |Intern| 2,0.5/0.5/0.5,1.0/1.0/1.0,0.0,0,0, |Extern| 2,0.0/0.0/0.0,0.0/0.0/0.0,0.25,0,1, |Layer,Mode,Comment| 1,3,"";
This is the definition of the pen "Black, Type 1, 0.25mm" having the index 1. When assigning this pen to an entity, this entity will be output with a black, 0.25 mm wide frame using line type 1 and will be filled in black. On the screen, this entity will be drawn with a white hairline frame and it will be filled in gray. When selecting this pen in the application, layer 1 will be activated.
|
CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH