CadStyleSample
from OpenCAD2D import CadStyleSample
class CadStyleSample(System.Object) ยท CadStyleSample in the .NET reference
A sample drawing of a style preview with its parts told apart: the dimensions (or the multileader) of the sample are drawn into model space of CadStyleSample.Database as the entities of their pictures, each with a handle of its own, so that the display list names the part an item belongs to (CadStyleSample.PartOf) and the preview lights it. A sample dimension is made by the builders the DIM commands use, its block's entities copied out into model space and the dimension erased: what is drawn is what the dimension drew.
Properties and fields
Database
@property
def Database(self) -> DxfDatabase
Gets the drawing of the sample: its model space holds the outline and the parts, each its own entities.
Parts
@property
def Parts(self) -> System.Collections.Generic.IReadOnlyList[CadStyleSamplePart]
Gets the parts of the sample in the order they are drawn: one for each part of each dimension, with the handles of its entities. The words of a dimension whose style fills behind them are listed twice, as CadStylePart.Text and as CadStylePart.TextFill, the one entity.
Methods
PartOf
def PartOf(self, handle: str) -> CadStylePart
Gets the part an entity of the sample is, by its handle.