Table of Contents

Class CadProperties

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Describes a selection for the Properties panel, as AutoCAD's Properties palette does.

public static class CadProperties
Inheritance
CadProperties
Inherited Members

Fields

CustomGroup

The title of the group of a dynamic block's properties, as AutoCAD's palette names it: its rows are set through SetProperty(CadDocument, IReadOnlyCollection<string>, string, string), by the name of the property, not through CadPropertyEditor.

Methods

Describe(CadDocument, CadSpace, IReadOnlyCollection<string>)

Describes the selected entities as AutoCAD's Properties palette does. With none selected, the current settings the drawing's header holds (General: colour, layer, linetype, its scale, lineweight, transparency), the plot style, the view of the space (its centre, height and width, those of what the space draws, read-only) and Misc (the annotation scale, the UCS icon, the visual style "2D Wireframe"). With one, the box reads "Line (1)" and the rows are its General ones (its colour as ByLayer, ByBlock, Red to White, an index such as 8, or red, green and blue such as 255,128,0) and those of its kind: a line from (0, 0) to (300, 400) has Length 500.0000 and, at an $AUPREC of 0, Angle 53. With several, the box reads "Line (3)" where they are all of one kind and "All (3)" where not, and the rows are those they share, a value that differs shown as VariesText. Numbers are written in the invariant culture, lengths and coordinates to 4 places, angles in degrees to the places the header's $AUPREC gives.

Describe(CadDocument, CadSpace, IReadOnlyCollection<string>, CadView)

Describes the selected entities as Describe(CadDocument, CadSpace, IReadOnlyCollection<string>) does, the View group of no selection showing what the canvas shows: the centre, height and width of the view's visible box, in model space the model's view and in a layout the paper's, as AutoCAD's palette shows them. A canvas 1 000 by 500 pixels at 2 pixels to the unit about (100, 50) shows Center X 100.0000, Height 250.0000 and Width 500.0000.

Kinds(CadDocument, IReadOnlyCollection<string>)

The list the selection box of the Properties palette drops down, as AutoCAD's does: the whole selection first, then, where there are objects of several kinds, one row for each kind with its count, in the order of the kinds' names. Of seven objects, five MTEXTs and two OLE frames, the rows read "All (7)", "MText (5)" and "OLE Object (2)"; of three lines the one row reads "Line (3)", which is the whole selection. Describe(CadDocument, CadSpace, IReadOnlyCollection<string>) of a row's handles shows its properties as though only those objects were selected.