Solved! Go to solution

Use Revision Manager to read file properties

I am writing a C# app to crawl users' save directory and retrieve certain custom properties, such as "CustomTitle" from Solid Edge files. For performance reasons, I'd like to do this "offline" (not open each file in Solid Edge). It appears that using the Revision Manager to get file properties should work better according to this answer (is there a better way?).


However, I am running into an issue that I can't figure out and I'd like a nudge in the right direction.


Here is my code:


RevisionManager.Application RM = new RevisionManager.Application();

RevisionManager.PropertySets propertySets = null;

RevisionManager.Properties properties = null;

RevisionManager.Property property = null;


RM = new RevisionManager.Application();

propertySets = RM.PropertySets;


properties = propertySets.Item["Custom"]; // error here

property = properties.get_PropertyByID(72);

print(property.Value); // never get here. Is this right?


Even though I haven't gotten there yet, I know for a fact that there is an item at index 72. I use Solid Edge Spy to verify. This is the error I get:


The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))


How can I fix this? What am I doing wrong? Thanks.





Re: Use Revision Manager to read file properties

Or use the SolidEdge.FileProperties API...? The old SE programmers guide used to cover both revision manager and fileproperties API in some detail with some C# examples. I can't seem to see the examples in the new online guide.

Accepted by topic author Natedogg
‎08-26-2015 04:32 AM

Re: Use Revision Manager to read file properties

If I were only wanting to read file properties, I would not use Revision Manager. I would either use:


Jason Newell
Applications Architect

Re: Use Revision Manager to read file properties

I'm using those now Jason, but forgot to mention it! Also emailed Nate the old programmers guide. Was always my first point of reference for a while. Old habits die hard!

Re: Use Revision Manager to read file properties

Dave, you were right about the Solid Edge Properties API. And Jason I took a look at the Samples on Github. The one in particular you linked to works fine and I now know exactly what I was hoping to learn. I've already abandoned the code in my original post, but I believe the issue was that "Custom" should be an int rather than a string.


Thanks for the help.