class ansys.motorcad.core.motorcad_methods.MotorCAD(port=-1, open_new_instance=True, enable_exceptions=True, enable_success_variable=False, reuse_parallel_instances=False, url='')#

Connect to an existing Motor-CAD instance or open a new instance.

portint, default: -1

Port to use for communication.

open_new_instanceBoolean, default: True

Open a new instance or try to connect to an existing instance.

enable_exceptionsBoolean, default: True

Whether to show Motor-CAD communication errors as Python exceptions.

enable_success_variableBoolean, default: False

Whether Motor-CAD methods return a success variable (first object in tuple).

reuse_parallel_instancesBoolean, default: False

Whether to reuse MotorCAD instances when running in parallel. You must free instances after use.

url: string, default = “”

Full url for Motor-CAD connection. Assumes we are connecting to existing instance.

MotorCAD object.