Here is a short but important question that has come up repeatedly concerning the performance of parameter bindings.
Question: There is a big problem in the early versions of Revit 2009 with the performance of the Document ParameterBindings property, for example in the last line of the following code:
Application app = commandData.Application; Document doc = app.ActiveDocument; BindingMap bindingMap = doc.ParameterBindings;
The last statement takes a huge amount of time to execute, in the order of minutes. Are there any known solutions for this?
Answer: Good news: this performance delay was analysed and reported by Saikat Bhattacharya and fixed in the Revit 2009 Web Update 3. The issue is mentioned in the associated PDF file containing the list of enhancements:
API Enhancements
- Parameter binding performance has been improved.
- The JoinType method has been implemented for the LocationCurve of structural members.
- Mullion LocationCurves are now accessible through the API.
- External programs may now suppress VSTA startup warning messages.
- The built-in parameter MATERIAL_PARAM_TRANSPARENCY now returns the correct set value.
So all you need to do is install the updated version of Revit 2009 and the problem disappears. Many thanks to Saikat for pointing this out.
No comments:
Post a Comment