Set XYZ point for Model Group

Set XYZ point for Model Group

Anonymous
Not applicable
1,805 Views
4 Replies
Message 1 of 5

Set XYZ point for Model Group

Anonymous
Not applicable

Since we dont have a clean way of changing elements in a model group, i use the ungroup and re-group method. But when i re-group the XYZ point is placed in the center of the Model group. How could i change the XYZ point of a element? 

0 Likes
Accepted solutions (1)
1,806 Views
4 Replies
Replies (4)
Message 2 of 5

mikako_harada
Community Manager
Community Manager

Hi Michal, 

 

I think you are hitting a limitation of current API. 

 

Here is the link to previous post: 

http://forums.autodesk.com/t5/revit-api/group-origin-please-add-api-to-get-amp-set/m-p/5966829

 

Wish logged to the product team:  

CF-3797
API ability to set origin point of group but not change location of the group itself

 

We recently started Idea Station for Revit: 

https://forums.autodesk.com/t5/revit-ideas/idb-p/302/tab/most-recent 

 

You may want to vote/post the wish.  Exposing API for Group will be a good one; It will add more flexibility, I think.  


Mikako Harada
Developer Technical Services
Message 3 of 5

Anonymous
Not applicable
0 Likes
Message 4 of 5

Anonymous
Not applicable
Accepted solution
Here's the fix:

- Assign the new Group Type to the Group g.
- Call gtDup = g.GroupType.Duplicate("new group / group type name")
- Now assign the gtDup to the g Group and you have the correct XYZ, a new and fresh group. Without the need to ungroup and regroup.
Message 5 of 5

renee.puusepp
Community Visitor
Community Visitor

Assigning a new GroupType to the group simply swaps the group, the original geometry is lost and the problem is not solved, in my opinion. But I may be missing something. Can anyone confirm that this solves the issue?

0 Likes