Modifying is forbidden because the document has no open transaction. The document has no open transaction. In Revit Document.
相关问题
- 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
You have 2 options:
change the TransactionMode to Automatic at the class attribute
[Transaction(TransactionMode.Automatic)]
open a transaction within your command
Transaction tr = new Transaction(commandData.Application.ActiveUIDocument.Document); tr.Start("Command name here");
// your code
tr.Commit();
close streamreader function
Since you tagged this as
revitpythonshell
: