Announcement

Collapse
No announcement yet.

Revit API: how to change group member?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Revit API: how to change group member?

    Hi.
    I wont to change some custom instance parameters for members of group from my addin.

    Command work, but after it successfully return in Revit message is raise
    "Changes to group "Group 1" are allowed only in group edit mode. Use the Edit Group command to make the change to all instances of the group. You may use the "Ungroup" option to proceed with this change by ungrouping the changed group instances."
    So I read documentation, then googling and found this blog post The Building Coder: Editing Elements inside Groups
    I guess, for Revit 2012 nothing changed and this recommendation is still relevant.

    Okay, but I don't know how to regroup multiple instance of groups,
    please, need your advice?

    #2
    We had a similar situation with our door factory for multisliders and multibifolds (which have arrayed groups in them so the user can change the number of panels) and it just got too hard! So we have made all the parameters that need changing Type based and then this isnt an issue
    Alex Page
    RevitWorks Ltd
    Check out our Door Factory, the door maker add-in for Revit

    Comment


      #3
      Not an issue for your add in, but thats not really a solution, either. It means a bunch of the tools out there (like the one that identifies families as mirroed, flipped, or rotated, or whatever) cant actually work, since it cant change instance parameters if anything is grouped.
      Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
      @Web | @Twitter | @LinkedIn | @Email

      Comment


        #4
        As with alot of things in the Revit API it just can't be done without jumping through hoops. Maybe Revit 2013 API
        Phillip Miller
        Kiwi Codes Solutions Ltd
        Makers of "Family Browser" and "Project Browser" for Revit.

        Comment


          #5
          I'll explain what I want to achieve, perhaps I'm wrong.

          Usually we do a project where is structural framing, column, truss, many etc.
          All this is in one album (file), scheme and detailed drawings.

          I made one column
          then unite all detail into group, made couple of copies of group.
          Select all detail of group one by one (actually I made addin for this operation), then made assembly, made views, schedule and sheet. For scheduling I add some custom project parameters to family which I calculate by my addin.
          When I change some elements inside Group Editor - all other groups changed to and new assemblies is not created, only existing changed.

          This algorithm work perfect for me, except I can't change all instance of group through API, can't enumerate, calculate mass for details of framing.

          Comment


            #6
            Now I understood what was wrong. I need to use family based on the generic model, instead of groups.
            From this I can easily do an assembly.
            Originally posted by Alex Page View Post
            We had a similar situation with our door factory for multisliders and multibifolds (which have arrayed groups in them so the user can change the number of panels) and it just got too hard! So we have made all the parameters that need changing Type based and then this isnt an issue
            It is also suitable for me, thanks.

            Comment


              #7
              Originally posted by YarUnderoaker View Post
              Now I understood what was wrong. I need to use family based on the generic model, instead of groups.
              Exactly.
              In the end, the API is only useful to automate some procedures or exposing properties currently hidden from the Revit UI, nothing more. All changes must comply with the normal revit way of organizing the model.
              If you select an element inside the group with tab, you will see that only the Mark parameter is accessible for change. Modifying all the other instance parameters will cause an exception and Revit will create another group for model stability sake.
              Gonçalo Feio
              "Ignorance, ignorance, sheer ignorance - you know there's no confidence to equal it. It's only when you know something about a profession, I think, that you're timid and careful." George Orson Welles

              Comment


                #8
                Yeah, this is sort of a dealbreaker. A ton of the API functions out there arent reliable because of this. The one that checks doors for Mirror/Flip/Handing cant be trusted because Doors go in groups, ones that export/import parameter values cant be used because of it. Its really disappointing.
                Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
                @Web | @Twitter | @LinkedIn | @Email

                Comment


                  #9
                  You are absolutely right. And mine is one of them :P
                  As I told Martijn this week, I will try to include a group filter in Fiub.
                  Gonçalo Feio
                  "Ignorance, ignorance, sheer ignorance - you know there's no confidence to equal it. It's only when you know something about a profession, I think, that you're timid and careful." George Orson Welles

                  Comment

                  Related Topics

                  Collapse

                  Working...
                  X