Skip to content

RevitTest project to test workaround to create Detail Groups in Revit without ActiveView.

License

Notifications You must be signed in to change notification settings

ricaun-io/RevitTestPlaceGroup.Tests

Repository files navigation

RevitTestPlaceGroup.Tests

Revit 2021 Visual Studio 2022 License MIT

RevitTest project to test workaround to create Detail Groups in Revit without ActiveView.

This project use the ricaun.RevitTest test framework.

Problem Description

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.

Video

Videos in English about this project.

VideoIma1

License

This project is licensed under the MIT License.


Do you like this project? Please star this project on GitHub!

About

RevitTest project to test workaround to create Detail Groups in Revit without ActiveView.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages