To set the view property flags.

syntaxSyntax:
DlxView.SetFlags(flags, mask)

Parameters

Parameter Description
flags Specifies values for view property flags. Specify a combination of the values in the following table.
mask Specifies which flags are to be set. Specify a combination of the values in the following table.
Value Meaning
DlxApp.VIEWFLAGS_MIRROREDX The view is mirrored horizontally.
DlxApp.VIEWFLAGS_MULTILAYER This option determines whether drawing operations (object selection, copying, editing, etc.) will be active on all objects of all layers included in the view or only on the objects of the current layer. You can set this option to No to work only on the active layer. Objects added to the drawing are always placed on the active layer.

Return Value

If the view flags have been changed it returns true otherwise it returns false.

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.FindPage("PCB");
  if (page.IsValid() && doc.SelectPage(page))
  {
    DlxApp.Printf("The %s page has %i views.", page.GetName(), page.GetViewCount());
    var i = page.GetViewIterator();
    while (i.IsValid())
    {
      var view = page.GetNextView(i);
      if (view.GetFlags() & DlxApp.VIEWFLAGS_MIRROREDX)
      {
        view.SetFlags(0, DlxApp.VIEWFLAGS_MIRROREDX);
        DlxApp.Printf("The view %s is mirrored", view.GetName());
      }
      else DlxApp.Printf("The view %s not is mirrored", view.GetName());
    }
  }
}

See also