Returns the iterator from the front object of the layer.


Return Value

A DlxIterator value that can be used for iteration or object retrieval; Invalid iterator if the layer is empty. Call the IsValid() method to determine if the iterator is valid.


  Copy codeCopy 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())
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
    if (layer.IsValid())
      layer.DrawText(new DlxPoint(90,100), "Hello, World.");
      layer.DrawLine(new DlxPoint(30, 30), new DlxPoint(80, 80));
      var pos = layer.GetFrontObjectIterator();
      while (pos.IsValid())
        var obj = layer.GetNextObject(pos);
        DlxApp.Printf("object type: %s", obj.GetTypeName());

See also