Shows the specified view.
Syntax: |
---|
DlxPage.SelectView(view) DlxPage.SelectView(name) |
Parameters
Parameter | Description |
---|---|
view | The view to show. |
name | The name of the view to show. |
Return Value
If the operation ends correctly, it returns true otherwise it returns false.
Example
Copy 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_TOPCOURTYARD);
if (layer.IsValid())
{
var points1 = new Array();
points1[0] = new DlxPoint(90, 120);
points1[1] = new DlxPoint(100, 130);
points1[2] = new DlxPoint(110, 120);
layer.DrawCourtyard(points1);
layer.DrawCourtyard("V80,160,0;V95,180,0;V110,160,0;V80,160,-120;");
layer.DrawCourtyard(new DlxRect(40,120,70,160), 0);
layer.DrawCourtyard(new DlxPoint(140,140), 20);
page.SelectView("Top Courtyard");
}
}
}
|