Method SetProperty
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
SetProperty(CadDocument, IReadOnlyCollection<string>, string, string)
Sets a property of the Custom group of the dynamic INSERTs among entities, as AutoCAD's palette sets it: a distance typed as a number, an angle in degrees, a flip's state by its name or as 0 or 1, a visibility state or a lookup's label by its name, a table's row by its index, a text as typed. The value is taken to the parameter's value set by the library, as AutoCAD takes it: a Width of a list of 800, 900 and 1 000 typed 870 is 900. One undo step.
public static CadEditResult SetProperty(CadDocument document, IReadOnlyCollection<string> handles, string name, string text)
Parameters
documentCadDocumentThe document.
handlesIReadOnlyCollection<string>The handles of the entities selected; those that are not INSERTs of a dynamic block with the property are passed over.
namestringThe name of the property, as the row's label: Width.
textstringThe text typed or chosen.
Returns
- CadEditResult
What came of it: refused, nothing written, where no INSERT has the property, an INSERT is on a locked layer or the text is not a value of the property; failed, the drawing as it was, where the library does not work the block out (its message said).
Exceptions
- ArgumentNullException
Thrown when the document, the handles, the name or the text is null.