Is it possible to Select the Convert mesh Method using the API?

Is it possible to Select the Convert mesh Method using the API?

nfernandezV9ZRM
Explorer Explorer
425 Views
1 Reply
Message 1 of 2

Is it possible to Select the Convert mesh Method using the API?

nfernandezV9ZRM
Explorer
Explorer

Curious if anyone has encountered a similar situation and found a solution.
I'm trying to run the convert mesh command, but I also want to dictate which method is used for the conversion.

nfernandezV9ZRM_0-1722367170348.png

 

_app.executeTextCommand(u'Commands.Start ParaMeshConvertCommand') # Unsure how to change the parameters for this operation
                                                                              # ¯\_(ツ)_/¯
            # push "OK" button
            _app.executeTextCommand(u'NuCommands.CommitCmd')

 

0 Likes
Accepted solutions (1)
426 Views
1 Reply
Reply (1)
Message 2 of 2

kandennti
Mentor
Mentor
Accepted solution

Hi @nfernandezV9ZRM -San.

 

I think you can switch in this way.

        # show dialog
        _app.executeTextCommand(u"Commands.Start ParaMeshConvertCommand")

        # set operation
        _app.executeTextCommand(u"Commands.SetString ConvertMeshInfoOperation {}".format("infoOperationParametricFeature")) # Parametric
        # _app.executeTextCommand(u"Commands.SetString ConvertMeshInfoOperation {}".format("infoOperationNewBaseFeature")) # Base Feature

        # set method
        # _app.executeTextCommand(u"Commands.SetString MeshToBREPAlgorithmInput {}".format("infoMethodTriangleBased")) # Faceted
        _app.executeTextCommand(u"Commands.SetString MeshToBREPAlgorithmInput {}".format("infoMethodPrismatic")) # Prismatic
        # _app.executeTextCommand(u"Commands.SetString MeshToBREPAlgorithmInput {}".format("infoMethodOrganic")) # Organic

        # push "OK" button
        _app.executeTextCommand(u"NuCommands.CommitCmd")