List.CountOccurences Replacement

List.CountOccurences seems to be missing from Revit 2022 Dynamo in Clockwork. Here is a replacement:

import sys
import clr
import collections
from collections import Counter

a = IN[0]

OUT = dict((i, a.count(i)) for i in a)

Should I share as Node?

1 Like

@truevis it is, did you install the latest package?

I had to delete Clockwork for Dynamo 2.x and Bakery from my Package folder, then install Clockwork for Dynamo 2.x from Package Search and it came back. Thanks for the advice.

Now re-install Bakery, or copy the old folder back, or just do without? This seems bad:
image
@Luke_Johnson – advice?

1 Like

note, I mean the below comment as nice as I can

I think you answered your own question. The dependency nightmare that bakery has is hard to manage and not worth the effort IMO.

Additionally, the last update is from 2 years ago? As far as I know, that isn’t even guaranteed compatibility with any 2.x version.


If, (big if) you need to install bakery, I advise you do this manually by downloading the files from DynamoPackages.com manually and extracting. This eliminates the package manager trying to resolve the dependencies and downloading old versions of several other packages, (that have been updated way more recently than 2 years).

1 Like

also, I just noticed that bakery is in a state of not being able to be updated.

In my opinion, as someone managing package deployments for several clients, Bakery is a hard no for being deployed at scale at any firm.

Once again, I don’t mean this in a “mean” way or anything like that. But if I can avoid additional headaches (with the already headache-prone package management of Dynamo), I am going to do it.


Note: I marked @Elie.Trad 's response as the solution to this, because installing the latest clockwork (not what bakery forces) is the real solution here.

3 Likes