Accessing modifier commands with python in 3ds max

How do I tell Python script to execute the function of a button within a modifier? For reference, I’m using the MassFX Rigid Body and I want the script to “Convert to Custom Shape” (for building convex hulls).

Hi,

Has anyone managed to figure it out?
Also have the same problem in clicking a modifier button in a Hair and Fur modifier.

I found the maxscript equivalent is
$.modifiers[#Hair_and_Fur].ConvertToMesh

but the Python does not seem to recognize it.

Not the mod.ConvertToMesh or mod.convertToMesh

Hi,

Just want to update. u/Swordslayer from Reddit responded the query.
The correct implementation would be something like this mod.ConvertToMesh(instance=obj_node)

Works as expected.