1. let me get back to you on that, I need to go see why
2. Because it worked, and I have never used .Equals(), I guess I should try that.
On to where I am so far, Im so close, I just cant figure out what I should be looking for
XrefGraphNode XGN = XG.GetXrefNode(i) as XrefGraphNode;
if (string.Compare(XGN.Name.ToString(), "TEP", true) == 0 ||
string.Compare(XGN.Name.ToString(), "UES", true) == 0 ||
string.Compare(XGN.Name.ToString(), "VTEP", true) == 0 ||
string.Compare(XGN.Name.ToString(), "VUES", true) == 0)
{
BlockTableRecord BTR = Trans.GetObject(XGN.BlockTableRecordId, OpenMode.ForRead, false) as BlockTableRecord;
ObjectIdCollection OIC = new ObjectIdCollection();
if (BTR.XrefStatus.ToString() == "Resolved")
{
//ObjectIdCollection OIC = new ObjectIdCollection();
OIC.Add(BTR.Id);
Db.BindXrefs(OIC, true);
}
else
{
Db.DetachXref(BTR.Id);
}
}
If you erase an Xref, it still evals to Resolved in the code