Hi Krispy,
Our engineering team confirmed the negative Id value meaning as follow.
"egative element id values in Revit are generally specially designated ids that are known internally to the system. Because they are an internal representation, the Revit team reserves the right to change them when needed, but in all probability they won’t be changed. The number definitely won’t change between flavors of Revit (e.g. Architecture, LT) on the same version."
Our mentioned to get the solid line pattern element. I tested and it shows that we cannot filter out the solid line pattern using FilteredElementCollector. However I don't think it is a problem.
When we want to assign the solid line pattern to a override, we can just create a ElementId object and set its IntegerValue to -3000010. And then assign this ElementId object to the override. This can successfully change the target element's or category's line pattern to solid line pattern.
Here is the ShartDevelop code I used.
public void ReadElementOverwriteLinePattern()
{
Document doc = this.ActiveUIDocument.Document;
Selection sel = this.ActiveUIDocument.Selection;
ElementId id = new ElementId(-3000010);
Reference ref2 = sel.PickObject(ObjectType.Element,"Please pick another element");
Element elem2 = doc.GetElement(ref2);
Transaction trans = new Transaction(doc);
trans.Start("change cut line pattern");
OverrideGraphicSettings override2 = doc.ActiveView.GetElementOverrides(elem2.Id);
override2.SetCutLinePatternId(id);
doc.ActiveView.SetElementOverrides(elem2.Id,override2);
trans.Commit();
}
Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network