Message 1 of 9
call revit's API from external thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello I'am in the revit's test project, When i create transaction , since evenement 'ComponentManager_UIElementActivated' from button of ComponentManager.Ribbon, i have exception 'Starting a transaction from an external application running outside of API context is not allowed'. Have you a solution ? void ComponentManager_UIElementActivated( object sender, adWin.UIElementActivatedEventArgs e) { Transaction trans = new Transaction(uidoc.Document); //Work good. trans.Start("ReTraceWall"); //It don't work, because i have exception "Starting a transaction from an external application running outside of API context is not allowed." CommandRetraceWall.retracewall(uidoc); //function not called because there is exception before trans.Commit(); } Thank you for help . Have you sample which solve this problem ?