Class CadLayerExpression
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
The expression of a property filter, as AutoCAD's FilterExpression keeps it (group 301 of the filter's XRECORD):
rules of the form NAME=="A*" joined by AND and OR, AND binding tighter, with brackets; read as a list of
alternatives (OR), each a list of rules all of which a layer has to pass (AND). NAME=="1_Arch*" AND OFF=="False" is one
alternative of two rules; NAME=="*dim" OR NAME=="*text" is two of one.
public sealed class CadLayerExpression
- Inheritance
-
CadLayerExpression
- Inherited Members
Constructors
- CadLayerExpression(IReadOnlyList<IReadOnlyList<CadLayerRule>>)
Makes an expression of alternatives.
Properties
- Alternatives
Gets the alternatives: a layer passes when it passes all the rules of one of them; none passes every layer.
- Variables
Gets the properties a filter can test, in the order of AutoCAD's columns.
Methods
- Matches(DxfLayerTableRecord, CadLayerFilterContext)
Whether a layer passes: one alternative whose rules it passes all. Where the expression has no rule every layer passes; a rule of a property the library does not know passes none, as AutoCAD answers one.
- ToString()
Gives the expression as AutoCAD's filter dialog writes it: rules joined by AND, alternatives by OR, no brackets.
- TryParse(string, out CadLayerExpression)
Reads an expression:
NAME=="A*" AND COLOR=="1",OFF == "FALSE" and FROZEN == "FALSE",( NAME== "A*" ), letters of either case, spaces round the signs or none.