Closed andydandy74 closed 10 years ago
And Revit components...
In the 0.6.2 release notes it says:
Equal can now compare all data types
Strangely enough, I am running 0.6.2 ... ;-)
Seems bug on the line: | [Container(o1); Container(o2)] when o1 = o1 || o1.Equals(o2) -> Number(1.) in FScheme.fs. o1 is always o1, should be o2? Thanks a lot for pointing the issue! After fix XYZ object comparison should return false unless comparison is done to the same object even if numbers are same (to the best of my understanding).
fixed in 20b0b8aceed03690cc0c41233a50b0d62ece8de3
This is not working yet - at least not for Revit elements: Build 0.6.3.5262
Please reopen this one - I'm still having this issue.
@LevL is the problem here that the RevitAPI does not supply an Equals() implementation for Elements?
I looked for XYZ class "Equals" override (actually, lack of it). No one for the Element class either. There is one for GeometryObject class, but it just compares references.
There are useful methods in Revit API: Element Id comparison, element's guid access, "is_almost_equal" (not 100% sure about the name) method for XYZ and UV classes, etc. To me it looks like Dynamo needs to have its own manual implementation.
One more thing to consider: if the same element is changed by different portions of the graph the order of changes to the element is not assured (and hence which one wins). Read-only access seems ok, but changes applied to same element in different places could easily get problematic. Say, family instance could be moved to different locations by different nodes in the graph. Is there way to flag this as an error or a warning?
HI there, any news on this? I have a problem of the same kind when I want to filter out element from lists based on the ID. One list contains all IDs, let say 5, one list only 2 IDs, I need the result list containing 3 remaining items. I tried with equal node with no luck. error says: Key mapper result Autodesk.Revit.DB.Wall is not Comparable, and thus cannot be sorted. same when using Element's IDs.
Julien, I had the same issue a while back. As long as this is not resolved you can use the following nodes to get this workflow done:
yep I tried with those great nodes. Just need some time to set this correctly in my test case.
Julien BENOIT
Le 27 févr. 2014 à 09:30, Andreas Dieckmann notifications@github.com a écrit :
Julien, I had the same issue a while back. As long as this is not resolved you can use the following nodes to get this workflow done:
Element to IDs List Contains Filter By Boolean Mask IDs to Elements — Reply to this email directly or view it on GitHub.
I know I could just check if there's a distance between these two XYZs, but I think it would make sense if the Equal node were able to compare elements of this data type as well. Also, I think it would be better if the Equal node actually went into an error state once it encounters data types it's not designed to deal with.