Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
While i run script to set value for walls (about ~300wall),
I have this problem and Revit close automatic.
Sometimes, it work correct if i run only ~50 walls.
I can't get Exception in try-catch.
What should i do ?
Thank in advanced !
foreach (Wall wall in runWalls)
{
if (transG.HasStarted())
{
try
{
//other codes run well
using (Transaction tran = new Transaction(doc, "Set Offset"))
{
tran.Start();
FailureHandlingOptions option = tran.GetFailureHandlingOptions();
option.SetFailuresPreprocessor(new DeleteWarningSuper());
tran.SetFailureHandlingOptions(option);
wall.LookupParameter("Top Constraint").Set(ElementId.InvalidElementId);
wall.LookupParameter("Unconnected Height").Set(h);
//doc.Regenerate();
tran.Commit();
}
}
catch (Exception exception)
{
MessageBox.Show(exception.ToString());
break;
}
}
else
{
break;
}
}
Solved! Go to Solution.