Gets the name of the specified item.

syntaxSyntax:
DlxSort.GetString(index)

Parameters

Parameter Description
index Item index. The value must be between 0 and GetCount()-1.

Return Value

Returns the name of the specified item.

Example

  Copy codeCopy code
var project = DlxApp.GetJob().GetProject();
if (!project.IsValid())
{
  throw new Error("Project not found.");
}

var netlist = project.GetNetlist();
if (!netlist.IsValid())
{
  throw new Error("Invalid netlist.");
}

var devicesort = new DlxSort(DlxApp.SORT_TEXTFIRSTINT, false);
for (var i = 0; i < netlist.GetDeviceCount(); i++)
{
  var device = netlist.GetDevice(i);
  devicesort.AddString(device.GetReference(), i);
}
devicesort.Sort();

DlxApp.Printf("*** Component List ***");
for (i = 0; i < devicesort.GetCount(); i++)
{
  device = netlist.GetDevice(devicesort.GetData(i));
  DlxApp.Printf(DlxApp.Format("%s (%s)", devicesort.GetString(i), device.GetValue()));
}

See also