Check which axes are added to a group

After you add axes to a group or groups, you may want to check which axes are added to which group later, because one axis can be added to several groups. We use GetGroupConfiguration to check an axis from a group, and then we display its original index.

Copy
CheckAxisInGroup
VOID CheckAxisInGroup(int Group, int AxisInGroup)
{
    //Group: the index of a group.
    /*AxisInGroup: the index of an axis in the group. For example, if Axis 3 is the
      first axis in a group, its AxisInGroup is zero.*/
    //AxisIndex: the original index of an axis.

    int AxisIndex = 0;
    KsError nRet = GetGroupConfiguration(Group, AxisInGroup, mcAxisCoordSystem, &AxisIndex);
    if (nRet != errNoError)
        RtPrintf("GetGroupConfiguration failed: %x\n", nRet);

    RtPrintf("Axis %d is in Group %d.\n\n", AxisIndex, Group);
}