Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I go into Group Edit mode with the API? & then return to the main model?

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
6098 Views, 10 Replies

How do I go into Group Edit mode with the API? & then return to the main model?

I'm trying to go into Group Edit mode so I can add some parameters to some objects in a group.  How can I trigger the Group Edit mode using the API's?

10 REPLIES 10
Message 3 of 11
Anonymous
in reply to: jeremytammik

I've read all of those articles in the past, and I have some concerns.

 

 

Regarding this article:  http://thebuildingcoder.typepad.com/blog/2010/08/editing-elements-inside-groups.html

I have tried to use the Ungroup-Regroup method for multi-instanced groups, but I get an error when I try to reuse the same name.  I can't save it as a different name, because it will break the link to the other groups, that I want to continue to have its associativity.  Also, when I ungroup a multi-instanced group, it only ungroups that one group, and leaves the other groups linked together.  As I cycle through those linked groups, they all become independent of each other, and once again, lose their inherent associativity.  

 

So unless there is a way to ungroup all the associated groups at once, then regroup them after the changes have been made, i"m not sure how that workaround actually works in practice.

 

To explain better...  Let's say i have one group (named "A") in my Revit file that is instanced 3 times.  Each group has three walls.  I want to change the Mark on the first wall from "" to "Z."  I use the API to ungroup the first instance of Group "A."  I ungroup the first instance and change the Mark.  Then I regroup.  I cannot call it Group "A," so I name it "B."  Now "B" does not have the associativity with the other two groups named "A."  

 

I have the parameter modification working for objects in a single instance of a group, by using the failures transaction catch described in your blog post, but my main problems lie in the inability to go into Group Edit mode for instanced groups.  

 

 

http://thebuildingcoder.typepad.com/blog/2011/11/editing-a-group-take-two.html

This article raises the same questions as the previous post.  I can ungroup and regroup all fine, but then the groups become unassociative.  

 

 

http://thebuildingcoder.typepad.com/blog/2012/07/view-of-newgroup-duplicated-elements.html

This article was a bummer, because I was thinking of a work around where I could do this:

1.) read the contents of each instance.

2.) if they are identical, but with a different location and orientation, save all locations and orientations of the instances of the group.

3.) Delete all but one group.

4.) ungroup the lone group.

5.) Modify the parameters.

6.) Regroup using the old name.

7.) Retranslate and reorient the new group to the locations of the other groups.

 

That way i could theoretically maintain the associativity of the group and even keep the old name, but I wasn't able to get this copying to work, as stated in the article.  😞  

 

 

 

So that's where I'm at.  I'm going to keep pluggin away and see if I can find a solution.  Thanks for you help.

 

 

 

 

Message 4 of 11
jeremytammik
in reply to: Anonymous

Dear Genscripter,

 

Thank you for your clarification and very clear description of the problem.

 

I logged the issue REVIT-99372 [API: impossible to edit groups because ungroup breaks all associations -- 12181732] with our development team for this on your behalf as it requires further exploration and possibly a modification to our software. Please make a note of this number for future reference.

 

You are welcome to request an update on the status of this issue or to provide additional information on it at any time quoting this change request number.

 

This issue is important to me. What can I do to help?

 

This issue needs to be assessed by our engineering team, and prioritised against all of the other outstanding change requests. Any information that you can provide to influence this assessment will help. Please provide the following where possible:

 

  • Impact on your application and/or your development.
  • The number of users affected.
  • The potential revenue impact to you.
  • The potential revenue impact to Autodesk.
  • Realistic timescale over which a fix would help you.
  • In the case of a request for a new feature or a feature enhancement, please also provide detailed Use cases for the workflows that this change would address.

 

This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact items. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 11

Is there any updates on this item?

i am currently facing similar issues when facing groups.

We are assigning parameter values in bulk, but once we hit groups it is getting very tedious to get it all working.

 

Does one of the newer api's (as the post is from 2016) offer some new options for assigning project parameter values (instance/vary per group)?

Message 6 of 11
0001des
in reply to: dante.van.wettum

I am still interested in how to this can be resolved.  Currently, I just skip elements in Groups, which many clients have not been too thrilled about.

Message 7 of 11
Anonymous
in reply to: Anonymous

This is interresting as it can be done manually.

It does remind me of the "TopographyEditScope : EditScope" interface. (dont know why) 
Where in order to edit the points inside a toposurface you have this ekstra transaction-like interface.
Something similar to this perhaps for groups.....a "GroupEditScope : EditScope" 
So that if the parameters you are changing does NOT "vary by group" you could still set the same value for all.

But Revit tends to want to ungroup it automatically in that case.

Because without a sense of "scope" Revit thinks we only want to change one instance of the group type.

Which is not the case, we just want to Edit Group -> change a value -> Exit Group.
And then let Revit propagate the changes to the other groups as it normally would do.

Revit can do this manually its just not exposed in the API yet...i think.

Tags (1)
Message 8 of 11
zhuliyi0
in reply to: jeremytammik

Allow API access to group editing mode would be extremely helpful. We are an architecture firm, we use model groups heavily so lots of our work flow depends on it. (We used to work with lots of links but that didn't work well) Whenever there is a automation demand from users, it probably involves model group, and quite often I am hesitant to promise them anything because I know the ungroup-regroup workround is cumbersome and, sometimes, unstable. For us, this is one of the few pain points within Revit API that is really discouraging. I understand that getting API inside group editing mode might not be an easy task for the API team, since other "editing" modes are also missing from Revit API, but still, this is one of the most used functions in the whole software (needn't say an AutoCAD block analogy..), so lots of eager eyes are on it.

 

About the "unstableness" of ungroup-regroup approach: the model behaves not exactly in the way as when editing a group from within. One example is that some child element on a host could trigger the "ungoup or create new group" dialog during ungroup-regroup, while editing group from UI won't.

Message 9 of 11
jeremytammik
in reply to: zhuliyi0

Please search for the appropriate entry for this in the Revit Idea Station, or add a new entry, and add your comments there:

  

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

   

Tag it as an API wish:

  

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

  

Ensure it gets as many votes as possible to underline its importance to you and the rest of the developer community.

  

The Revit Idea Station is currently one of the main driving input sources for Revit API enhancements.

  

The Revit development team look there. Your comment here in the discussion forum might be overlooked.

 

Thank you!

 

 

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 10 of 11
stefanome
in reply to: jeremytammik

I upvoted this idea, and I added a comment about my (hopefully temporary) workaround

Message 11 of 11
danail.momchilov
in reply to: Anonymous

There is actually a simple workaround for that (of course, depending on your goal this might not make sense). If you introduce an Instance shared parameter, you can actually load it, using this option:

 

danailmomchilov_0-1688546558708.png

 

That way, you can modify its value for each element in a group, outside of group editing mode. I tried modifying that parameter through the API and it worked:

 

danailmomchilov_1-1688546816172.png

 

I hope this post helps someone 🙂 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report