How to create the shaft geometry in Ansys Motion using scripting?

Vishnu
Vishnu Member, Employee Posts: 221
100 Comments 100 Likes Name Dropper First Anniversary
✭✭✭✭
edited September 2023 in Structures

Answers

  • Vishnu
    Vishnu Member, Employee Posts: 221
    100 Comments 100 Likes Name Dropper First Anniversary
    ✭✭✭✭
    import os
    ansys_motion_objects = Model.Analyses[0].GetUserObjects("ANSYSMotion")
    shaft_obj = filter(lambda x: x.Name == "Shaft", ansys_motion_objects)[0]
    extension_path = ExtAPI.ExtensionManager.GetExtensionByName('ANSYSMotion').InstallDir
    dll_path = os.path.join(extension_path,"dll","ANSYSMotion.dll")
    clr.AddReferenceToFileAndPath(dll_path)
    import ANSYSMotionHelper
    ANSYSMotionHelper.DrivetrainCallbackClass.ImportDTGeometry(shaft_obj)