Gets the layer identified by the iterator, then sets the iterator to the next layer in the view.
Syntax: |
DlxView.GetNextLayer(iterator)
|
Parameters
Parameter |
Description |
iterator |
A DlxIterator value returned by a previous GetNextLayer, GetLayerIterator, or other function call. |
Return Value
Returns the DlxLayer corresponding to the iterator. Call the IsValid() method to determine if the layer is valid.
Example
|
Copy code
|
var prj = DlxApp.GetJob().GetProject("Example Sch");
if (!prj.IsValid())
prj = DlxApp.GetJob().NewProject("Example Sch");
var doc = prj.GetDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
if (!doc.IsValid())
{
doc = prj.NewDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
doc.SetPageFormat("A4", false);
}
if (doc.IsValid() && doc.Activate())
{
var page = doc.GetActivePage();
if (page.IsValid())
{
DlxApp.Printf("The page %s consists of %i layers.", page.GetName(), page.GetLayerCount());
var i = page.GetLayerIterator();
while (i.IsValid())
{
var layer = page.GetNextLayer(i);
DlxApp.Printf("layer: %s", layer.GetName());
}
}
}
|
See also