How to get the connected parent system name from project page, using automation scripting.

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 715
First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member

How to get the connected parent system name from project page, using automation scripting.

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 715
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    systems = GetAllSystems()
    for system in systems:
        if system.DisplayText == 'Static Structural':
        #index=0; specify the correct index
            component1 = system.Components[0]
            coordinate = ACT.InitializeAndGenerateTaskCoordinates(component1)
            parent = ExtAPI.DataModel.GetTaskByCoordinate(coordinate).RealTask.TaskGroup.Caption
            print(parent)
        #If parent system is connected to setup, use below changes'
        #ExtAPI.DataModel.GetTaskByCoordinate(coordinate).SourceTasks[1].TaskGroup.Caption