Corrupted Revisions from Entity Data

Anonymous

Corrupted Revisions from Entity Data

Anonymous
Not applicable

I'm creating an Add-In, and I wanted to store some data in the model related to issuance.  For this Add-In I need to map parameter names to revisions.  To implement this I created a schema for my add-In with a Map field, which I was using to store a Dictionary of string keys and values.  Then I created Entities for this data, and set those entities to each revision in the model. 

 

We started noticing that models would get corrupted after the Add-In stored entity data in model.  Based on the element ID's the revisions themselves were becoming corrupted.  Some users were unable to open the model even by Auditing the file.  Eventually we were able to open the models, and use a dynamo script to delete all entity data for the revisions in the project.  That seemed to resolve the problem.  This issue has occurred on several projects.  

 

I was thinking about changing the Add-In to use a DataStorage class instead using revisions, but just to be safe I have since modified the Add-In to use an external XML file to store this data.  I was wondering if you have any idea why the project revisions would become corrupted after storing entity data in them?  I was only using it to store strings.  Is there a limitation on the type of characters accepted even though I didn't get an error?  I was storing non-alphanumeric characters such as %, &, and -.

 

0 Likes
Reply
294 Views
3 Replies
Replies (3)

JimJia
Alumni
Alumni

Dear Dennis Eldridge,

 

Here is the blog about extensible storage API, it's worth reading in case you didn't yet:

http://thebuildingcoder.typepad.com/blog/2011/04/extensible-storage.html

 

Regarding the corrupt, can you provide a reproducible case for it?


In order to explore this matter further, we will need to provide a minimal reproducible case for the development team to analyse in depth.


In order to understand exactly what you mean and be able to research possible reasons for the discrepancy between the observed and expected behaviour, they require:
· A short exact description of what you are trying to achieve.
· The behavior you observe versus what you expect, and why this is a problem.
· A complete yet minimal Revit sample model to run a test in.
· A complete yet minimal macro embedded in the sample model or Visual Studio solution with add-in manifest that can be compiled, loaded, run and debugged with a single click to analyse its behavior live in the sample model.
· Detailed step-by-step instructions for reproducing the issue, e.g. which element to pick, what command to launch etc.
· http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

 


Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
0 Likes

Anonymous
Not applicable

I did log over Jeremy's blog post, and was building my code based on that.  I can try to put together some files that can reproduce the error, but it'll take me a little time to gather everything.  I could send it all in a support ticket.

0 Likes

Anonymous
Not applicable

Sorry, that previous message was coming from me.  I had forgotten I had a coworker logged in on my machine to troubleshoot a separate issue.  

0 Likes