This topic should help:
And while it’s meant for GHPython users, this might help too:
Also these methods are available. I’ve never used them, but they might be relevant: