Constructs a DxlPoint object.
Syntax: |
---|
new DlxPoint() new DlxPoint(point) new DlxPoint(x, y) |
Parameters
Parameter | Description |
---|---|
point | DlxPoint object that is to be copied. |
x | Specifies the x-coordinate of the point. |
y | Specifies the y-coordinate of the point. |
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_TOPCOPPER);
if (layer.IsValid())
{
var padstyle = new DlxPadStyle("#0000000000000004S107ZZZZZZ");
layer.DrawPad(new DlxPoint(100,150), "1", 0, padstyle);
}
}
}
|