In the code, I've added command actions, and I have seen the actions in the 3dconnexion config UI. However, the ordering of the actions is not what I was expecting.
Here is the JavaScript code I am using:
Code: Select all
const actionTree = new TDx._3Dconnexion.ActionTree();
actionSet = actionTree.push(new TDx._3Dconnexion.ActionSet('Default', 'My Actions'));
cat1 = actionSet.push(new TDx._3Dconnexion.Category('CAT_ID_A', 'CAT A'));
cat2 = actionSet.push(new TDx._3Dconnexion.Category('CAT_ID_B', 'CAT B'));
cat3 = actionSet.push(new TDx._3Dconnexion.Category('CAT_ID_C', 'CAT C'));
cat4 = actionSet.push(new TDx._3Dconnexion.Category('CAT_ID_D', 'CAT D'));
cat1.push(new TDx._3Dconnexion.Action('ACT_ID_A_1', 'Action A-1', 'Some Action'));
cat1.push(new TDx._3Dconnexion.Action('ACT_ID_A_2', 'Action A-2', 'Some Action2'));
cat1.push(new TDx._3Dconnexion.Action('ACT_ID_A_3', 'Action A-3', 'Some Action3'));
cat2.push(new TDx._3Dconnexion.Action('ACT_ID_B_1', 'Action B-1', 'Some Action'));
cat2.push(new TDx._3Dconnexion.Action('ACT_ID_B_2', 'Action B-2', 'Some Action2'));
cat2.push(new TDx._3Dconnexion.Action('ACT_ID_B_3', 'Action B-3', 'Some Action3'));
cat3.push(new TDx._3Dconnexion.Action('ACT_ID_C_1', 'Action C-1', 'Some Action'));
cat3.push(new TDx._3Dconnexion.Action('ACT_ID_C_2', 'Action C-2', 'Some Action2'));
cat3.push(new TDx._3Dconnexion.Action('ACT_ID_C_3', 'Action C-3', 'Some Action3'));
cat4.push(new TDx._3Dconnexion.Action('ACT_ID_D_1', 'Action D-1', 'Some Action'));
cat4.push(new TDx._3Dconnexion.Action('ACT_ID_D_2', 'Action D-2', 'Some Action2'));
cat4.push(new TDx._3Dconnexion.Action('ACT_ID_D_3', 'Action D-3', 'Some Action3'));
this.#spaceMouseConnection.update3dcontroller({
commands: { activeSet: 'Default', tree: actionTree },
});
But that is not the case. In the Exported Commands in the config UI, the ordering looks almost random:
Code: Select all
CAT C
Action C-3
Action C-2
Action C-1
CAT B
Action B-1
Action B-3
Action B-2
CAT A
Action A-3
Action A-2
Action A-1
CAT D
Action D-2
Action D-1
Action D-3
Any assistance would be greatly appreciated.