{"action":"created","issue":{"url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/1451","repository_url":"https://api.github.com/repos/DynamoDS/DynamoRevit","labels_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/1451/labels{/name}","comments_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/1451/comments","events_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/1451/events","html_url":"https://github.com/DynamoDS/DynamoRevit/issues/1451","id":200572937,"number":1451,"title":"Elemement.GetCategory behavior","user":{"login":"DanielHurtubise","id":4299930,"avatar_url":"https://avatars.githubusercontent.com/u/4299930?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielHurtubise","html_url":"https://github.com/DanielHurtubise","followers_url":"https://api.github.com/users/DanielHurtubise/followers","following_url":"https://api.github.com/users/DanielHurtubise/following{/other_user}","gists_url":"https://api.github.com/users/DanielHurtubise/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielHurtubise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielHurtubise/subscriptions","organizations_url":"https://api.github.com/users/DanielHurtubise/orgs","repos_url":"https://api.github.com/users/DanielHurtubise/repos","events_url":"https://api.github.com/users/DanielHurtubise/events{/privacy}","received_events_url":"https://api.github.com/users/DanielHurtubise/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-13T08:26:46Z","updated_at":"2017-01-13T14:54:08Z","closed_at":null,"body":"## Dynamo version\r\n\r\n1.2.1.3083\r\n\r\n## Revit version\r\n\r\n2017.1.1\r\n\r\n## Operating system\r\n\r\nWindows 10 x64 \r\n\r\n## What did you do? \r\n\r\nI used Element.GetCategory before List.Group.ByKey and the uniques keys are not.. unique\r\n\r\n## What did you expect to see?\r\n\r\nTo see each Category as a single value \r\n![pasted image at 2017_01_13 08_46 am](https://cloud.githubusercontent.com/assets/4299930/21923106/65941396-d972-11e6-98a0-ceba4d49b778.png)\r\nfor Unique Keys\r\n\r\n## What did you see instead?\r\n\r\nEach Category as a separate value\r\n"},"comment":{"url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/comments/272461496","html_url":"https://github.com/DynamoDS/DynamoRevit/issues/1451#issuecomment-272461496","issue_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/1451","id":272461496,"user":{"login":"ksobon","id":529781,"avatar_url":"https://avatars.githubusercontent.com/u/529781?v=3","gravatar_id":"","url":"https://api.github.com/users/ksobon","html_url":"https://github.com/ksobon","followers_url":"https://api.github.com/users/ksobon/followers","following_url":"https://api.github.com/users/ksobon/following{/other_user}","gists_url":"https://api.github.com/users/ksobon/gists{/gist_id}","starred_url":"https://api.github.com/users/ksobon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksobon/subscriptions","organizations_url":"https://api.github.com/users/ksobon/orgs","repos_url":"https://api.github.com/users/ksobon/repos","events_url":"https://api.github.com/users/ksobon/events{/privacy}","received_events_url":"https://api.github.com/users/ksobon/received_events","type":"User","site_admin":false},"created_at":"2017-01-13T14:54:08Z","updated_at":"2017-01-13T14:54:08Z","body":"@DanielHurtubise That's happening because `Element.GetCategory` is always returning a `Category` object. Basically ALL objects on that list are `Category` and they only have a different name. To avoid confusion the Watch node is displaying `Category.Name` but the actual object is just `Category`. That makes the `GroupByKey` think that all keys are different object (each category has a different Id) and it does split them up like that. \r\n\r\nWhat you did is perfectly fine. When you extracted the name of category, and used those as keys. Now, each object on that list is a String but they are not different strings. They can be compared properly and hence you get a good result. \r\n\r\nI don't think there is anything to be fixed here. This is expected behavior (in my opinion at least). "}}
{"actor":{"display_login":"ksobon"}}