Check that the object is a valid DlxSort.

syntaxSyntax:
DlxSort.IsValid()

Return Value

Returns true if the object is a valid DlxSort otherwise returns false.

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