- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
Can someone confirm what the equality methods of GeometryObject are based upon i.e.
Memory reference
Geometric configuration and/or properties of the class
Id assigned to the class alone (GeometryObject.Id)
etc.
I'm specifically interesting in the equality/inequality operators and the overridden Object.Equals:
I guess the simple yes / no answer (if it exists) would be: are the equality methods noted above based on memory reference alone? However isn't Object.Equals based on memory reference to begin with? If it is overridden then how is it overridden?
I tend to create a lot of class objects whose purpose is to wrap an API object and attach an id due to uncertainty about the equality of the API objects. Some clarification here or in the documentation above would probably be quite helpful in reducing this aspect.
Here is a bit more information I should have read beforehand in RevitAPI.chm under GeometryObject.equals (Remarks section):
"This compares the internal identifiers of the geometry, and doesn't compare them geometrically"
Now that we've ruled out the geometric configuration we just need to know what the 'internal identifiers' are exactly. Is it the GeometryObject.Id or something else?
What kind of operations affected these identifiers?
Do they exist for every API object created or just the items coming directly from element geometry?
Solved! Go to Solution.
Developer Advocacy and Support +