RevitTest project to test workaround to create Detail Groups in Revit without ActiveView.
This project use the ricaun.RevitTest test framework.
Project is based on the problem described in the Revit API Forum.
The method PlaceGroup
place the Group detail in the ActiveView
, but the ActiveView
is not available the Group
is created in an invalid view (OwnerViewId
is ElementId.InvalidElementId
).
A workaround is to use a Group
in the document and copy to the view you want, and change the type of the Group
, than change the location.
The method below does this workaround:
public Group CreateGroupDetail(GroupType groupType, View view, XYZ location);
If there is not detail Group
in the document, the method CreateGroupDetail
throws an Exception
.
Could be possible to open a document copy a view with a detail Group
and paste in the main document, to make the method to work without a Group
created. This is not implemented in this project.
Videos in English about this project.
This project is licensed under the MIT License.
Do you like this project? Please star this project on GitHub!