- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey all! I'm developing a tool that will renumber views on a sheet based on their location in relationship to our title block. I'm super close, but when I go to set the value nothing happens. Anyone know why the SetValueString() method wouldn't work?
FilteredElementCollector viewportCollector = new FilteredElementCollector(doc.ActiveView.Document)
.OfCategory(BuiltInCategory.OST_Viewports)
.WhereElementIsNotElementType();
int arbitrarySet = 1000;
Transaction t2 = new Transaction(doc);
t2.Start("Reset Detail Numbers");
foreach (Element vp in viewportCollector)
{
arbitrarySet++;
vp.get_Parameter(BuiltInParameter.VIEWPORT_DETAIL_NUMBER).SetValueString(arbitrarySet.ToString());
}
t2.Commit();
(This portion is designed to renumber them to something arbitrary to avoid duplicate errors)
Solved! Go to Solution.
Link copied