Hey,
I looked at something similar a while ago and found the Dynamo node wasn’t doing everything I needed, perhaps there is something useful for you here…
Hope that helps,
Mark