Remove an axis from a group
To remove a single axis from a group, use RemoveAxisFromGroup. If there's no axis left, the group state is changed to GroupDisabled. An axis can be removed only when the group is in the GroupDisabled state.
In GroupConfiguration.cpp
, add the following code:
Copy
RemoveAxisFromGroup
VOID RemoveAxis(int Group, int IndexInGroup)
{
//Get the original index of an axis in a group.
int AxisIndex = 0;
KsError nRet = GetGroupConfiguration(Group, IndexInGroup, mcAxisCoordSystem, &AxisIndex);
if (nRet != errNoError)
RtPrintf("GetGroupConfiguration failed: %x\n", nRet);
//RemoveAxisFromGroup can be used only in the GroupDisabled state.
nRet = RemoveAxisFromGroup(Group, AxisIndex);
if (nRet != errNoError)
RtPrintf("RemoveAxisFromGroup failed: %x\n\n", nRet);
RtPrintf("Remove Axis %d from Group %d.\n\n", AxisIndex, Group);
}