To get the Layer property flags.

syntaxSyntax:
DlxLayer.GetFlags()

Return Value

Returns a combination of the following values:

Value Meaning
DlxApp.LAYERFLAGS_VISIBLE The layer is visible.
DlxApp.LAYERFLAGS_SELECTABLE Objects on the layer can be selected.
DlxApp.LAYERFLAGS_SNAPPABLE The mouse cursor can be snapped to the notable points of objects on the layer.
DlxApp.LAYERFLAGS_EDITABLE Objects on the layer can be edited.
DlxApp.LAYERFLAGS_PRINTABLE The layer is printable.
DlxApp.LAYERFLAGS_FULLPLANE The layer constitutes a full power plane.
DlxApp.LAYERFLAGS_SPLITPLANE The layer constitutes a splitted power plane.
DlxApp.LAYERFLAGS_MIXEDPLANE The layer constitutes a mixed power plane.
DlxApp.LAYERFLAGS_IGNORE The layer and any objects it contains should be ignored.

Example

  Copy codeCopy code
var prj = DlxApp.GetJob().GetProject("Example PCB");
if (!prj.IsValid())
  prj = DlxApp.GetJob().NewProject("Example PCB");
var doc = prj.GetDocument("Examples PCB", DlxApp.DOCTYPE_PCB);
if (!doc.IsValid())
{
  doc = prj.NewDocument("Examples Pcb", DlxApp.DOCTYPE_PCB);
  doc.SetPageFormat("A4", false);
  var page = doc.NewPage("PCB", 0, true);
  page.LoadLayerStack("2 layer pcb stackup.clxlys");
  page.DrawBoard(new DlxRect(10, 10, 290, 200));
  page.SelectView("Draw Copper From Top");
}
if (doc.IsValid() && doc.Activate())
{
  var page = doc.GetActivePage();
  if (page.IsValid())
  {
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_TOPCOPPER);
    if (layer.IsValid() && ((layer.GetFlags() & DlxApp.LAYERFLAGS_EDITABLE)!=0))
      DlxApp.Printf("Layer %s can be modified.", layer.GetName());
    else DlxApp.Printf("Layer %s cannot be modified.", layer.GetName());
  }
}

See also