Pass all button events to my application
Moderator: Moderators
Pass all button events to my application
Hello everybody.
Currently I'm working on an small application which should be able to use 3DConnexion 3D device.
I want to pass all button events directly to my application. That should be the standard configuration. My intent to do this is because the user should be able to set the buttons in my application.
Is there a handy shortcut for the cfg files to pass all buttons of all existing devices to my application? If not - what is an alternative?
Thanks in advance
Rikaan
Currently I'm working on an small application which should be able to use 3DConnexion 3D device.
I want to pass all button events directly to my application. That should be the standard configuration. My intent to do this is because the user should be able to set the buttons in my application.
Is there a handy shortcut for the cfg files to pass all buttons of all existing devices to my application? If not - what is an alternative?
Thanks in advance
Rikaan
Re: Pass all button events to my application
You should be using 3DxWare 10 for your development.
You can create a Cfg for your application. We don't make that so easy any longer. You have to make a copy of another Cfg, say 3DxTest.xml, and change the names (filename, Name, ExecutableName).
In that file, all buttons are assigned to App_PassToApplication.
We would prefer that you leave the SpaceMouse Wireless buttons assigned to the Radial Menus. You can populate the Radial Menus with your commands.
To distribute that Cfg, install it into %programdata%/3dconnexion/3dxware/cfg.
You can create a Cfg for your application. We don't make that so easy any longer. You have to make a copy of another Cfg, say 3DxTest.xml, and change the names (filename, Name, ExecutableName).
In that file, all buttons are assigned to App_PassToApplication.
We would prefer that you leave the SpaceMouse Wireless buttons assigned to the Radial Menus. You can populate the Radial Menus with your commands.
To distribute that Cfg, install it into %programdata%/3dconnexion/3dxware/cfg.
Re: Pass all button events to my application
Hi jwick,
thanks for your reply. The 3DxTest.xml is a good starting point. Thanks for that.
Best regards
Rikaan
thanks for your reply. The 3DxTest.xml is a good starting point. Thanks for that.
Okay. I will respect this convention in my programm.We would prefer that you leave the SpaceMouse Wireless buttons assigned to the Radial Menus. You can populate the Radial Menus with your commands.
Best regards
Rikaan
Re: Pass all button events to my application
I suppose I hit this problem too.
I exported Cfg file from 3DxWare 10 menu ("Manage profiles").
But, how I can load this cfg file on other computer from my programm? (c#).
Currently, I'm using example with TDx input:
this.device.LoadPreferences("CfgFileName");
But it doesnt work, because in my cfg i turned off 3 of 7 Axis and they are turned again on other computer with this code..
I exported Cfg file from 3DxWare 10 menu ("Manage profiles").
But, how I can load this cfg file on other computer from my programm? (c#).
Currently, I'm using example with TDx input:
this.device.LoadPreferences("CfgFileName");
But it doesnt work, because in my cfg i turned off 3 of 7 Axis and they are turned again on other computer with this code..
Re: Pass all button events to my application
I don't think that LoadPreferences function does anything anymore.
You just need to get the executable name correct.
You must be using a very old instance of 3DxConfig. That functionality was removed quite a while ago. The Cfg file format has moved on since that time. Those files are probably not compatible with current releases.
You just need to get the executable name correct.
You must be using a very old instance of 3DxConfig. That functionality was removed quite a while ago. The Cfg file format has moved on since that time. Those files are probably not compatible with current releases.
Re: Pass all button events to my application
So, I'm pretty confused.jwick wrote:I don't think that LoadPreferences function does anything anymore.
You just need to get the executable name correct.
You must be using a very old instance of 3DxConfig. That functionality was removed quite a while ago. The Cfg file format has moved on since that time. Those files are probably not compatible with current releases.
I will rephrase my question, then.
Is there any way to setup "3Dconnexion Properties" after fresh install of 3DxWare without user intervention? Some way of automated profile loading?
Or this is possible only with C++ SDK?
Re: Pass all button events to my application
You can distribute your Cfg file by installing it into %PROGRAMDATA%/3dconnexion/3dxware/Cfg.
The driver will pick it up from there.
Make sure the name and ExecutableName is set for your executable.
Make sure the Default attribute in the AppCfg element is "true".
Use the current release (CfgFormatVersion=1.1").
E.g., if your app is MyApp.exe:
1) Start by copying the AppCfgDef_S80.xml into %APPDATA%/3Dconnexion/3DxWare/Cfg.
2) Rename it to MyApp.xml.
3) Change to <AppCfg Default="false"... (because it is now in APPDATA not PROGRAMDATA)
4) Change the AppInfo/Name: <Name>My Application</Name>
5) Change the AppInfo/ExecutableName: <ExecutableName>MyApp.exe</ExecutableName>
6) Save the file, start your app, use 3DxSmartUI to make any changes you want. E.g., change all buttons to My Application->Application Use (if you want the button to be sent directly to the application). We suggest you only do this for the "programmable buttons" (1-10). If possible, you should respond correctly to the buttons with specific labels, e.g., Top View, Fit, etc.
7) Move the file to %PROGRAMDATA%... (delete from APPDATA)
8) Change to <AppCfg Default="true"... (because it is now your new default file)
9) (You may have to bounce 3DxService at this time if it doesn't recognize the new file - I didn't have to while testing this procedure)
10) If you are having problems, turn on the driver log file (systray icon). The file is %appdata%/3Dconnexion/3DxWare/3DxService.log. It will tell you what the driver is doing with your file/app.
The driver will pick it up from there.
Make sure the name and ExecutableName is set for your executable.
Make sure the Default attribute in the AppCfg element is "true".
Use the current release (CfgFormatVersion=1.1").
E.g., if your app is MyApp.exe:
1) Start by copying the AppCfgDef_S80.xml into %APPDATA%/3Dconnexion/3DxWare/Cfg.
2) Rename it to MyApp.xml.
3) Change to <AppCfg Default="false"... (because it is now in APPDATA not PROGRAMDATA)
4) Change the AppInfo/Name: <Name>My Application</Name>
5) Change the AppInfo/ExecutableName: <ExecutableName>MyApp.exe</ExecutableName>
6) Save the file, start your app, use 3DxSmartUI to make any changes you want. E.g., change all buttons to My Application->Application Use (if you want the button to be sent directly to the application). We suggest you only do this for the "programmable buttons" (1-10). If possible, you should respond correctly to the buttons with specific labels, e.g., Top View, Fit, etc.
7) Move the file to %PROGRAMDATA%... (delete from APPDATA)
8) Change to <AppCfg Default="true"... (because it is now your new default file)
9) (You may have to bounce 3DxService at this time if it doesn't recognize the new file - I didn't have to while testing this procedure)
10) If you are having problems, turn on the driver log file (systray icon). The file is %appdata%/3Dconnexion/3DxWare/3DxService.log. It will tell you what the driver is doing with your file/app.
Re: Pass all button events to my application
"It's alive! It's alive!!"jwick wrote:You can distribute your Cfg file by installing it into %PROGRAMDATA%/3dconnexion/3dxware/Cfg.
The driver will pick it up from there.
Make sure the name and ExecutableName is set for your executable.
Make sure the Default attribute in the AppCfg element is "true".
Use the current release (CfgFormatVersion=1.1").
Thank you so much for such detailed response. I just checked this solution and it works perfectly!
Oh, this must be the most helpfull answer I ever gor from official's.
Re: Pass all button events to my application
Woohoo bonus points for Jim!
Re: Pass all button events to my application
How comes some application I use (Like the CATIA cam system from Dassault) have the buttons all overridden without providing an external CFG file?
Is it because they use an older SDK which was allowing it?
Is it because they use an older SDK which was allowing it?
Re: Pass all button events to my application
Ok, I see the CATIA.xml being created when i launch CATIA.
Now, since i see that one has been automatically created for my application, it means this is done by the 3dsWare driver.
Is there any SDK functions to configure it or does it haved to be done by hand (or by my application opening it with a XML parser and modify it)
I would really appreciate any comments on this.
Thanks.
Now, since i see that one has been automatically created for my application, it means this is done by the 3dsWare driver.
Is there any SDK functions to configure it or does it haved to be done by hand (or by my application opening it with a XML parser and modify it)
I would really appreciate any comments on this.
Thanks.
Re: Pass all button events to my application
Alright. I just figured out the 3Dx driver comes with application profiles. That answers my questions.
Re: Pass all button events to my application
jwick,
Not sure if this is the exact forum for this, but I think you are the right person to ask this too.
I design using CATIA V5 and have used a 3Dconnexion spaceExplorer for many, many years.
I think a designer is more efficient the spaceexplorer especially if the buttons are mapped to commonly used functions or actions.
Until I logged on this year and had to reinstall the current drive Version 10 I was able to map buttons for copy and paste that copied spec tree items, property values, dimensions, etc.....
I can not copy and paste using my space ball now. Also I created a few functions like divide by 2, enter, etc..... This function of actually creating from key strokes also isn't available.
I think I saw a post to go back to an earlier version, version 3 something, but at my company I can not use drivers that they don't have in a library and they only have the latest.
Am I missing something or have I now lost functionality using your spaceexplorer USB space ball? Very, very frustrated. I hate when functionality is taken away.
Sincerely,
Rick
Not sure if this is the exact forum for this, but I think you are the right person to ask this too.
I design using CATIA V5 and have used a 3Dconnexion spaceExplorer for many, many years.
I think a designer is more efficient the spaceexplorer especially if the buttons are mapped to commonly used functions or actions.
Until I logged on this year and had to reinstall the current drive Version 10 I was able to map buttons for copy and paste that copied spec tree items, property values, dimensions, etc.....
I can not copy and paste using my space ball now. Also I created a few functions like divide by 2, enter, etc..... This function of actually creating from key strokes also isn't available.
I think I saw a post to go back to an earlier version, version 3 something, but at my company I can not use drivers that they don't have in a library and they only have the latest.
Am I missing something or have I now lost functionality using your spaceexplorer USB space ball? Very, very frustrated. I hate when functionality is taken away.
Sincerely,
Rick
Re: Pass all button events to my application
Hello Rick,
We try not to remove functionality. Sometimes we move it, trying to make devices work consistently.
How were you assigning the commands? From the list of CATIA commands in CATIA or by creating kb macros for these command in the 3Dx GUI?
We try not to remove functionality. Sometimes we move it, trying to make devices work consistently.
How were you assigning the commands? From the list of CATIA commands in CATIA or by creating kb macros for these command in the 3Dx GUI?
-
- Posts: 4
- Joined: Sat Jan 30, 2016 7:19 am
Re: Pass all button events to my application
Do you mean pass it though the OS ?Rikaan wrote:Hello everybody.
Currently I'm working on an small application which should be able to use 3DConnexion 3D device.
I want to pass all button events directly to my application. That should be the standard configuration. My intent to do this is because the user should be able to set the buttons in my application.
Is there a handy shortcut for the cfg files to pass all buttons of all existing devices to my application? If not - what is an alternative?
Thanks in advance
Rikaan