Data Blocks (File Format) |
www.CAD6.com |
Data blocks are the smallest information elements inside entities. Each data block starts with a sequence of three values: The data block owner identification, the data block element type (see MKI_DB_TYPE_*), and the data block type (see MKI_DB_POINT_*, MKI_DB_ALL_*, MKI_DB_INFO_*, and MKI_DB_ATTRIB_*). The values inside a data block are separated by a comma, the data block is ended with a semicolon.
The number of values inside a data block is variable. Even if a special data block is currently defined with a fixed number of values, it may grow in future. If so, new values will be appended to the data block, i.e. the currently defined values will remain at the same location. As a result, do always read all defined values of each data block, and then skip until the next semicolon to over-read unknown values.
Each entity may contain a variable number of data blocks of different type and length. This data block sequence is terminated by a data block of type 999. Data blocks of the same type do not always have the same length. Especially text and binary data varies in length!
If the description of an entity type states a specific data block sequence, this sequence must be maintained in any case. The usual sequence is:
If an explicitly stated sequence is not maintained, this can lead to an application crash, as this sequence is not explicitly tested during file load.
Data blocks of all types use the same element sequence that determines the owner of the data block, the data block type and the type and number of data values stored in that data block. The following data block types exist:
Generic Data BlocksGeneric data blocks are simple data blocks that are used to store values of a single, explicitly stated data type and can be handled without knowledge of their purpose. These data blocks can be used by third-party plug-ins to store all types of data.
Element type "Signed Integer value" (__int32)
Element type "Floating point number" (double)
Element type "Point" (MKI_POINT)
Element type "Color" (MKI_COLORVALUE)
Element type "Property Set" (MKI_PROPERTY)
Element type "Extended Property Set" (MKI_XPROPERTY)
Element type "Font" (MKI_FONTDEF)
Element type "Text" (MKI_STRW)
Element type "Binary Data" (BINARY)
Standard Data BlocksAll kinds of data blocks have a unique identification stored in the value BlockType. The application uses some standard data blocks for building its entities. These standard data blocks include generic as well native data blocks. Generic data blocks are normally used for general purposes, whereas native data blocks are used for a few number of object types. See MKI_DB_POINT_* and MKI_DB_ALL_*.
Data Block Type 0 (General Point) Data Block Type 1 (Start-Point) Data Block Type 2 (End-Point) Data Block Type 3 (Center-Point) Data Block Type 4 (Radius Definition Point) Data Block Type 5 (Angle Definition Point) Data Block Type 6 (Vector Definition Point) Data Block Type 7 (First Pivot Point) Data Block Type 8 (Second Pivot Point) Data Block Type 9 (Arc End-Point) Data Block Type 10 (Marking) Data Block Type 50 (Fixed General Point) Data Block Type 51 (Fixed Start-Point) Data Block Type 52 (Fixed End-Point) Data Block Type 53 (Fixed Center-Point) Data Block Type 54 (Fixed Radius Definition Point) Data Block Type 55 (Fixed Angle Definition Point) Data Block Type 56 (Fixed Vector Definition Point) Data Block Type 57 (Fixed First Pivot Point) Data Block Type 58 (Fixed Second Pivot Point) Data Block Type 59 (Fixed Arc End-Point) Data Block Type 60 (Fixed Marking)
Data Block Type 100 (Constant) Data Block Type 101 (Arc) Data Block Type 102 (Curve)
Data Block Type 110 (Texts)
Data Block Type 999 (End of List)
Native Data BlocksNative data blocks are complex data blocks that are used to store native data of the application. Every native data block has its own structure and must be handled separately. See MKI_DB_INFO_*.
Third-party plug-ins are not allowed to define their own native data blocks, they have to use Generic Data Blocks instead.
Data Block Type 220 (Dimension Line)
Data Block Type 225 (Large Dimension)
Data Block Type 230 (Small Dimension)
Data Block Type 235 (Standard Text)
Data Block Type 236 (Frame Text)
Data Block Type 237 (Reference Text)
Data Block Type 240 (Comment Data)
Data Block Type 243 (Bitmap Reference)
Attribute Data BlocksSome entity types can contain explicit attributes. An explicit attribute is a named text containing information and is assigned to an entity to be processed later on, e.g. to create a parts list or to create any other kind of statistic. See MKI_DB_ATTRIB_*.
Explicit attributes can be of one of the following type:
All kinds of attributes may either be of type "Text", "Number", or "URL". Attributes of types "Text" and "URL" may contain any text of up to MKI_LENGTH_ATTRIBUTE characters in length, whereas attributes of type "Number" must contain a valid numeric value. The total number of attributes of each type (global + local, outline, point) per respective element (entity, outline, and point) is limited to MKI_ATTRIBS_PER_OBJECT per type.
Explicit attributes are stored in a special type of native data block with element type MKI_DB_TYPE_NATIVE (0), see MKI_BLOCK_ATTRIBUTE.
|
CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH