You can use only C language for writing UDF. As UDF is an add on customization of Fluent, you have to use C language. Because all APIs are exposed in C language only.
For automating ANSYS Fluent you can use scheme language.
In future ANSYS may provide multi language support, but as of now (ANSYS 19.2) there is support of only C language for writing UDFs.
I found the issue addressed in Fluent user guide:
Parts are groups or collections of bodies. Parts can include multiple
bodies and are then referred to as multibody parts. If your
geometry contains multiple parts then each part will be meshed with
separate meshes with no connection between them, even if they
apparently share faces.
You can convert a ...