Modifying XML disappears after save

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
ReneRabbitt
Posts: 4
Joined: Thu Apr 01, 2021 5:31 pm

Modifying XML disappears after save

Post by ReneRabbitt »

Newb here, hello all,
After modifying the default joystick template to use with Twinmotion and saving in my C:\Users\rener\AppData\Roaming\3Dconnexion\3DxWare\Cfg folder, the file disappears upon save and the driver reverts back to the AppDefCfg_KMJ driver
What am I doing wrong?
Thanks for any help. I've been digging through the forums and just can't seem to wrap my head around this.

Here is the modified Joystick config:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
(c) Copyright 3Dconnexion. All rights reserved.
$Revision: 17343 $
-->
<AppCfg xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Default="true" CfgFormatVersion="1.3" ThisFileVersion="1.7">
<CfgProperties>
<ID>Twinmotion</ID>
<Name>Twinmotion</Name>
<InheritsFromID>ID_Base_Cfg</InheritsFromID>
</CfgProperties>
<AppInfo>
<Signature>
<Name>Twinmotion/Name>
<ExecutableName>Twinmotion-Win64-Shipping.exe</ExecutableName>
<Transport>KMJ</Transport>
</Signature>
<Options>
<IgnoreMouseWheelInertia>true</IgnoreMouseWheelInertia>
</Options>
</AppInfo>
<AuthorInfo>
<DriverVersion>17.6.1</DriverVersion>
<Created>
<Tool>3DxService.exe</Tool>
<Version>17.5.5</Version>
<Date>2017:11:2:28:10:58:11:745</Date>
<User>3DxCfgAdmin</User>
</Created>
<LastChange>
<Tool>XMLCfgEditor.exe</Tool>
<Version>17.6.1</Version>
<Date>6/27/2019 10:04:51 AM UTC</Date>
<User>jwick</User>
</LastChange>
</AuthorInfo>
<Settings>
<ResponseCurve>1.00</ResponseCurve>
</Settings>
<ButtonActions>
<!-- App Handled Actions -->
<ButtonAction Type="App" xsi:type="ButtonAction_App">
<ID>App_ResetYourView</ID>
<Name>STR_APP_RESETYOURVIEW</Name>
</ButtonAction>
<!-- Keyboard Functions -->
<ButtonAction Type="Joystick" xsi:type="ButtonAction_Joystick">
<ID>HIDJoystick_1</ID>
<Name>STR_JOYSTICK_1</Name>
</ButtonAction>
<ButtonAction Type="Joystick" xsi:type="ButtonAction_Joystick">
<ID>HIDJoystick_2</ID>
<Name>STR_JOYSTICK_2</Name>
</ButtonAction>
<ButtonAction Type="Joystick" xsi:type="ButtonAction_Joystick">
<ID>HIDJoystick_3</ID>
<Name>STR_JOYSTICK_3</Name>
</ButtonAction>
<ButtonAction Type="Joystick" xsi:type="ButtonAction_Joystick">
<ID>HIDJoystick_4</ID>
<Name>STR_JOYSTICK_4</Name>
</ButtonAction>
<ButtonAction Type="Joystick" xsi:type="ButtonAction_Joystick">
<ID>HIDJoystick_Hat_N</ID>
<Name>STR_JOYSTICK_HAT_N</Name>
</ButtonAction>
<ButtonAction Type="Joystick" xsi:type="ButtonAction_Joystick">
<ID>HIDJoystick_Hat_E</ID>
<Name>STR_JOYSTICK_HAT_E</Name>
</ButtonAction>
<ButtonAction Type="Joystick" xsi:type="ButtonAction_Joystick">
<ID>HIDJoystick_Hat_S</ID>
<Name>STR_JOYSTICK_HAT_S</Name>
</ButtonAction>
<ButtonAction Type="Joystick" xsi:type="ButtonAction_Joystick">
<ID>HIDJoystick_Hat_W</ID>
<Name>STR_JOYSTICK_HAT_W</Name>
</ButtonAction>
</ButtonActions>
<Devices>
<Device>
<ID>ID_Standard_3D_Mouse</ID>
<Name>Standard 3D Mouse</Name>
<AxisFilter>None</AxisFilter>
<CurrentAxisBank>Default</CurrentAxisBank>
<CurrentButtonBank>Default</CurrentButtonBank>
<AxisBank Default="true">
<ID>Default</ID>
<Name>STR_DEFAULT_BANK</Name>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_X</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDJoystick_X</ActionID>
</Output>
</Axis>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_Y</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDJoystick_Y</ActionID>
</Output>
</Axis>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_Z</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDJoystick_Z</ActionID>
</Output>
</Axis>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_Rx</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDJoystick_Rx</ActionID>
</Output>
</Axis>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_Ry</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDJoystick_Ry</ActionID>
</Output>
</Axis>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_Rz</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDJoystick_Rz</ActionID>
</Output>
</Axis>
</AxisBank>
<ButtonBank Default="true">
<ID>Default</ID>
<Name>STR_DEFAULT_BUTTONBANK</Name>
<Button>
<Input>
<ActionID>V3DK_MENU</ActionID>
</Input>
<Output>
<ActionID>Driver_ShowDriverGUI</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_FIT</ActionID>
</Input>
<Output>
<ActionID>Driver_ShowDriverGUI</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_TOP</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_Hat_N</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_LEFT</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_Hat_W</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_RIGHT</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_Hat_E</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_FRONT</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_Hat_S</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_1</ActionID>
</Input>
<Output>
<ActionID>Driver_Toggle_3DxNumPad</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_2</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_2</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_3</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_3</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_4</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_4</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_ESC</ActionID>
</Input>
<Output>
<ActionID>KB_Esc</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_ALT</ActionID>
</Input>
<Output>
<ActionID>KB_Alt</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_SHIFT</ActionID>
</Input>
<Output>
<ActionID>KB_Shift</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_CTRL</ActionID>
</Input>
<Output>
<ActionID>KB_Ctrl</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_ROTATE</ActionID>
</Input>
<Output>
<ActionID>Driver_ToggleTranslations</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_DOMINANT</ActionID>
</Input>
<Output>
<ActionID>Driver_ToggleDominantFilter</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_PLUS</ActionID>
</Input>
<Output>
<ActionID>Driver_IncreaseAppScale</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_MINUS</ActionID>
</Input>
<Output>
<ActionID>Driver_DecreaseAppScale</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_USER</ActionID>
</Input>
<Output>
<ActionID>Driver_ToggleRotations</ActionID>
</Output>
</Button>
</ButtonBank>
</Device>
<Device>
<ID>ID_ProductID_C62E</ID>
<Name>SpaceMouse Wireless</Name>
<CurrentAxisBank>Default</CurrentAxisBank>
<CurrentButtonBank>Default</CurrentButtonBank>
<ButtonBank Default="true">
<ID>Default</ID>
<Name>STR_DEFAULT_BUTTONBANK</Name>
<Button>
<Input>
<ActionID>HIDButton_1</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_1</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>HIDButton_2</ActionID>
</Input>
<Output>
<ActionID>HIDJoystick_2</ActionID>
</Output>
</Button>
</ButtonBank>
</Device>
</Devices>
</AppCfg>
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Modifying XML disappears after save

Post by jwick »

It's probably moving it into the bak dir because it is invalid in %appdata%.
Save it into %programdata%\3Dconnexion\3DxWare\Cfg instead.
ReneRabbitt
Posts: 4
Joined: Thu Apr 01, 2021 5:31 pm

Re: Modifying XML disappears after save

Post by ReneRabbitt »

@jwick
Thank you for the response. I must have something wrong in the script because as soon as I save it there it gets kicked to /bak.
Sending you a DM
ReneRabbitt
Posts: 4
Joined: Thu Apr 01, 2021 5:31 pm

Re: Modifying XML disappears after save

Post by ReneRabbitt »

Nevermind, I can't figure out how to DM. I would pay for someones time to create a script to work in twinmotion. Navigation is 4-axis WASD with Q and E being up and down respectively and then rx and rz(i think) being a right joystick....or the entire 6 axis correlating with a right joystick with Q and E being mapped to Z.
I've been trying to figure this out for some time now and simply don't know what I am doing :?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Modifying XML disappears after save

Post by jwick »

Thank you for the response. I must have something wrong in the script because as soon as I save it there it gets kicked to /bak.
The log file may tell you what is wrong about the file. Turn it on with RMB on the 3Dx systray icon.

You are missing part of the <Name> line:
<Signature>
<Name>Twinmotion/Name>
needs to be
<Name>Twinmotion</Name>

Don't spend too much time trying to get this to work this way. I've seen some other traffic that implies there may be something better coming.
Post Reply