Call this function to specify the name of the view.

syntaxSyntax:
DlxView.SetName(name)

Parameters

Parameter Description
name The name of the view.

Return Value

If the view name is set correctly 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.GetActivePage();
  if (page.IsValid())
  {
    var view = page.GetView(0);
    if (view.IsValid())
    {
      DlxApp.Printf("First view name is %s", view.GetName());
      view.SetName(view.GetName() + " First view");
      DlxApp.Printf("First view new name is %s", view.GetName());
    }
  }
}

See also