Persistent ID's in API

Anyone know the most appropriate way to use the persistent ID's to re- find a component, entity or mate when re-loading saved data into an add-in? The problem is that the add-in may not be active when the model is loaded, and the "persistent" ID's are not conserved across rebuilds, so may be useless by the time the add-in gets to see them. I have to match up my own data with particular components etc.

Thanks in advance, JC

Reply to
heyheyjc
Loading thread data ...

Do you mean the persistent ID's returnet by ModelDocExtension.GetPersistReference3 method, or something else? Those references are persistent across rebuilds and whatever (since otherwise they would not be... persistent!). I use the persistent references in my application and they work just great I.M.O.

-h-

Reply to
Heikki Leivo

... Or do you really mean that the persistent references may change somehow? Why and when? If it is true, I am quite shocked, since that does not sound quite persistent to me.

The persistent reference API is I.M.H.O one of the most useful API's ever exposed, but if the references are not persistent it is just ridiculously unuseful... I use the PRef API to store and restore selected entities, and if it fails, my product will not quite work and in the long run my customers will simply kill me if they lose data and/or productivity. It has worked so far in my case, fortunately. Gotta keep my eyes open...

Interesting scenario, indeed.

-h-

Reply to
Heikki Leivo

Thanks for that. I'm running 2005 and even the API-Help disclaims their persistence past rebuilds; I've certainly seen inconsistencies. Hopefully it's changed, if you are running more up to date, but I would still have liked my app to work well on '05. What's your app? Does it need to re-find Mates and Components, as well as entities?

JC

Reply to
heyheyjc

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.