Change hatch to region with Dynamo for Civil 3D


I am trying to convert some hatches to regions in Civil 3D.
We can do it with some commands (HATCHGENERATEBOUNDARY, REGION).
But I was wondering if there are any ways to do it with Dynamo.
Ideally, I want to create a Dynamo script which allows me to select the hatch area in the ModelSpace, then input the color (layer) of the region and convert the selected hatch boundary to a region.
I’ve found some references but they were for Revit.

Hope to get someone’s help.
Thank you.