Returns the iterator from the back child object.
![]() |
---|
DlxObject.GetBackObjectIterator() |
Return Value
A DlxIterator value that can be used for iteration or object retrieval. The iterator is not valid if the object does not include other objects. Call the IsValid() method to determine if the iterator is valid.
Example
![]() |
|
---|---|
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())
{
// create objects
var pen = new DlxPenStyle(0.5, new DlxColor("orangered"), "SOLID");
doc.SetStyle(pen);
var obj1 = layer.DrawLine(new DlxPoint(30, 30), new DlxPoint(80, 80));
var obj2 = layer.DrawEllipse(new DlxPoint(80, 80), 10);
// group the objects
var selection = page.GetSelection();
selection.Empty();
selection.AddObject(obj1);
selection.AddObject(obj2);
var g = selection.Group("Line and Circle");
// list childs
var i = g.GetBackObjectIterator();
while (i.IsValid())
{
DlxApp.Printf("%s", g.GetPrevObject(i).GetTypeName());
}
}
}
}
|