Starting a transaction from an external application running outside of API context is not allowed. cannot start transaction.
相关问题
- How to include MaterialDesignXamlToolkit to WPF cl
- Forge Viewer loading multiple Revit models with sh
- Obtaining room/area information from Forge api
- Coding with Revit API: tips to reduce memory use?
- Revit Python Pick Object / Select Object
相关文章
- Coding with Revit API: tips to reduce memory use?
- Revit Python Pick Object / Select Object
- Deserialize Json XYZ Point
- Revit: Modifying is forbidden because the document
- Python Code-While loop never end
- Specify the specific heat of a material with Revit
- Starting a transaction from an external applicatio
- Same code to create parameters in Revit 2015 + 201
Using my magic psychic crystal ball to guess you are asking how to avoid getting this error message in your Revit / RPS plugins, here is a short bit of extra information:
Form
and call into the API from one of the events (Button.OnClick
)What you want to do is figure out how to get back into the API context to execute your code. There are two main methods for doing this (assuming you have already left the
IExternalCommand.Execute
context):Idling
eventExternalEvent
Since you mentioned RevitPythonShell in the tags, why don't you check out how I used external events in my web server example.
IExternalEventHandler
Execute
methodExecute
method runs in the Revit API context)ExternalEvent
(using the event handler just created)my_external_event.Raise()
)