Skip to main content
Doc objects are part of a parent-child containment hierarchy, where the parent represents the container and the children represent the contents. If a doc object is deleted, all its descendants (its children, recursively) are also deleted. For example, a Part contains zero or more DesignBody objects, each of which contains one or more DesignFace objects. The parent of a design face is a design body, and the parent of a design body is a part. Similarly, a design body is a child of a part, and a design face is a child of a design body.
The parent chain continues up the hierarchy until the root object is reached. This is the topmost parent, which itself has no parent (its parent is null). Examples of root objects are: Part, DrawingSheet, and Layer. All doc objects in the same parent-child hierarchy belong to the same document. The Document class provides properties to access its root objects: MainPart, Parts, DrawingSheets, and Layers.