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: 

Autodesk.Revit.DB.UpdaterData.GetModifiedElementIds() Problem

8 REPLIES 8
Reply
Message 1 of 9
Sydra7
599 Views, 8 Replies

Autodesk.Revit.DB.UpdaterData.GetModifiedElementIds() Problem

I think the GetModifiedElementIds() function in Autodesk.Revit.DB.UpdaterData class in Revit API 2014 is not collect all of the changed elements.

For example:
If i change a floor's analytical model, the connecting walls' analytical models are changing too, but the GetModifiedElementIds() function only collect the floor as changed element. Is this a bug or it's willful? Is there a solution to get the changed environmental elements too?

David Schmidt

8 REPLIES 8
Message 2 of 9
jeremytammik
in reply to: Sydra7

Dear David,

 

I am pretty sure that the intention is to return all modified elements in that collection.

 

I have also heard repeatedly from the development team that this is sometimes quite hard to achieve.

 

Can you provide a simple, minimal, reproducible case, please?

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

Thank you!

 

Cheers,

 

Jeremy 



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

Message 3 of 9
Sydra7
in reply to: jeremytammik

Hi!

Thanks for the answer.

Sorry but it's pretty funny you always want reproductible case from the customers, even if it takes 5 minutes to make for any revit developer. I think the problem is really clear. Put a floor with connecting walls ... if you change the floor alignment and want to get the changed elements in a triggered api function, you only get the floor as changed element even if the walls are changed with that.

Have a nice day!

David Schmidt

Message 4 of 9
PhillipM
in reply to: Sydra7

I'm sorry David but I'm with Jeremy here.  How can we help if we can't see what youa re actually doing.  As you say it would only take 5 mins of your time to post this and you proabbaly would get an answer staright away.

 

I'm thinking that you are not creating the right filter when you are setting up your Updater class, and only watching floors being modified and not walls???  See without some code to see what youa re doing it is very hard to help.

 

Regards

 

Phillip

Message 5 of 9
arnostlobel
in reply to: PhillipM

A quick answer to David is: An updater should receive ALL the elements that got changed in a given regeneration round, directly or indirectly. That is assuming the updater has the its triggers set up accordingly.  It is how updaters work and we have not received a lot of complains. (Internally in the Revit engine, we do not make a lot of difference between elements that got changed directly and those which got modified as a result of change propagation.) However, that is not to say there cannot be any bugs. I have wanted to build a simple app to test what Davit reports as not working, but I have not found the time yet. Sorry. I'll try in the next few days, or, if you upload the code you've been using, David,  I'll try that instead.

 

Thank you

Arnošt Löbel
Message 6 of 9
Sydra7
in reply to: arnostlobel

I'll uploat that on monday!

Message 7 of 9
Sydra7
in reply to: arnostlobel

Hi!

I think found the problem in my progenitors code. The geometric change type at triggers is not valid for neighbour refitted analytical models. If i set the change type to "any" the function gives back the neighbour elements too.

Thanks for help!

David Schmidt

Message 8 of 9
arnostlobel
in reply to: Sydra7

Hello David!

 

I am glad you’ve found a solution. It actually makes sense, since elements of structural analytical model do not have geometry on their own, at least not in the normal Revit sense. It means that if you ask for an analytical model element’s geometry, you ought to get nothing.

Arnošt Löbel
Message 9 of 9
jeremy_tammik
in reply to: arnostlobel

Dear David,

 

Congratulations on solving this, and thank you for letting us know!

 

Best regards,

 

Jeremy

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community