仅提供English版本
After Revit 2018, the method for obtaining Grid Reference has been modified. You need to use the following code to retrieve it:
1 | foreach (Grid grid in grids) |
Previously, you needed to get the Grid’s Curve.Reference to create dimensions:
1 | gridReferences.Append(grid.Curve.Reference); |
The change should be made to obtain Grid References more safely and conveniently. For details on the official response regarding this matter, please refer to the article below:
Invalid Number of References

Author: Broccoli
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles

2023-05-09
Creating Parts in Revit Secondary Development

2022-09-04
Revit二次开发 创建空心模型并与指定构件剪切

2023-05-16
Breaking an Arc into Multiple Segments

2023-06-16
Revit API Ray Method Returns Two Values for Same Element Analysis

2024-11-20
Implementing Multi-Category Tags in Revit

2022-10-24
Using MaterialDesignThemes.Wpf in Revit Secondary Development