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

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

Answers

  • Vishnu
    Vishnu Member, Employee Posts: 222
    100 Comments 100 Likes Second Anniversary Name Dropper
    ✭✭✭✭
    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)