- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Sample code:
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
try
{
var document = commandData.Application.ActiveUIDocument.Document;
Transaction transaction = new Transaction(document, "Create Footing");
transaction.Start();
var wall = (new FilteredElementCollector(document).OfClass(typeof(Wall))).ToList()[0] as Wall; //I placed a wall with hand!
var foundationType = document.GetElements<ContFootingType>().ToList()[0];
var continuousFooting = document.Create.NewFoundationWall(foundationType, wall);
transaction.Commit();
}
catch
{
return Result.Failed;
}
return Result.Succeeded;
}
Exception:
"A first chance exception of type 'System.Runtime.InteropServices.SEHException' occurred in RevitAPI.dll
Additional information: External component has thrown an exception."
What is wrong with the footing creation?
(I use Revit 2013 API)
Regards
David Schmidt
Solved! Go to Solution.