Autodesk Navisworks API
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
ModelItem. InstanceHa shCode
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
57 Views, 1 Replies
09-24-2012 02:24 AM
How stable InstanceHashCode is? It seems that if open same file on different machine then it is changed.
Pauli
Re: ModelItem. InstanceHa shCode
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-10-2012 03:36 AM in reply to:
PauliL
Hi,
From our engineer team:
InstanceHashCode is not really stable, it is just a hash code. It will only really be stable for the lifetime of the .NET object. You should only really use it for things such as inserting the object into a dictionary, etc…
The InstanceGuid is a better stable ID. Some files might not contain GUIDs though (it depends on the source of the file), although they might contain some other form of stable ID (such as Element ID or Entity Handle). And for some formats, it’s almost impossible to work out a stable ID in the first place.
Hope this helps.
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

