Description
Dimension style families are sets of dimension styles (AcDbDimStyleTableRecords) that are related to one another by name. The child dimStyles are named with a numeric suffix. There are five suffixes based on the dimension entity's type. For example, for a parent dimStyle named "TESTSTYLE", the valid suffixes are:
TESTSTYLE$0 | Linear child of TESTSTYLE (both rotated and aligned types) |
TESTSTYLE$2 | Angular child of TESTSTYLE (both 2-line and 3-point types) |
TESTSTYLE$3 | Diameter child of TESTSTYLE |
TESTSTYLE$4 | Radius child of TESTSTYLE |
TESTSTYLE$6 | Ordinate child of TESTSTYLE |
TESTSTYLE$7 | Leader child of TESTSTYLE (used for tolerance entities (AcDbFcf) also) |
The key points about how dimStyle families work in the AutoCAD environment are as follows:
- Child dimStyle selection does not happen automatically in the AutoCAD APIs. If you programmatically create a dimension (such as (entmake), acdbEntMake(), or create a new dimension object via the ObjectARX API), you get exactly what you specify.
- AcDbDatabase has some helpful methods for child style manipulation; see getDimstyleChildData(), getDimstyleChildId(), and getDimstyleParentId().
- A named dimStyle is chosen for the particular dimension based on the type of the dimension. The parent dimStyle is used unless a child exists. (If a child dimStyle is the current dimStyle, it will be used no matter what type of dimension is being operated upon. But DDIM tries to make sure child styles are not current.)
- Overrides are computed based on the current dimStyle and not the child dimStyle, in cases where it is different (if overrides were computed against the child, all differences between the parent and child would become overrides and the style would effectively be the parent dimStyle.)
- This override computation process occurs when a dimension is first created by any of AutoCAD's dimension creation commands. It also happens during DIMSTYLE APPLY and DIM UPDATE operations.
- Dimension entities in pre-Release 14 DWG files may not have a dimension style. When AutoCAD edits such dimensions for the first time it assigns them the current dimStyle with family logic, so that if the appropriate child style exists, it is used.
- dimStyle families are only related by name. No persistent form of inheritance exists. As far as AutoCAD is concerned, child and parent dimStyles are completely unrelated. Edits made to parent dimStyles will have no effect on child dimStyles.
- The command line interface to dimStyles is completely dumb about families. You can make a child style current on the command line (DIMSTYLE RESTORE or DIM RESTORE). You can make a child without making a parent on the command line, etc. To the command line UI, parents and children are indistinguishable. They are autonomous dimStyles.