Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ModelItem.InstanceHashCode

1 REPLY 1
Reply
Message 1 of 2
PauliL
494 Views, 1 Reply

ModelItem.InstanceHashCode

How stable InstanceHashCode is? It seems that if open same file on different machine then it is changed.

 

Pauli

1 REPLY 1
Message 2 of 2
xiaodong_liang
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.

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

Post to forums  

Rail Community


Autodesk Design & Make Report