Pass all button events to my application

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Rikaan
Posts: 3
Joined: Thu Apr 03, 2014 1:42 am
Location: Germany

Pass all button events to my application

Post by Rikaan » Thu Apr 03, 2014 1:57 am

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

jwick
Moderator
Moderator
Posts: 2504
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Pass all button events to my application

Post by jwick » Thu Apr 03, 2014 4:20 am

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.

Rikaan
Posts: 3
Joined: Thu Apr 03, 2014 1:42 am
Location: Germany

Re: Pass all button events to my application

Post by Rikaan » Thu Apr 03, 2014 4:45 am

Hi jwick,

thanks for your reply. The 3DxTest.xml is a good starting point. Thanks for that.
We would prefer that you leave the SpaceMouse Wireless buttons assigned to the Radial Menus. You can populate the Radial Menus with your commands.
Okay. I will respect this convention in my programm.

Best regards
Rikaan

Mernion
Posts: 3
Joined: Tue Jun 17, 2014 10:11 am

Re: Pass all button events to my application

Post by Mernion » Tue Jun 17, 2014 10:15 am

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..

jwick
Moderator
Moderator
Posts: 2504
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Pass all button events to my application

Post by jwick » Wed Jun 18, 2014 12:53 am

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.

Mernion
Posts: 3
Joined: Tue Jun 17, 2014 10:11 am

Re: Pass all button events to my application

Post by Mernion » Wed Jun 18, 2014 9:13 am

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.
So, I'm pretty confused.

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?

jwick
Moderator
Moderator
Posts: 2504
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Pass all button events to my application

Post by jwick » Thu Jun 19, 2014 12:41 am

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.

Mernion
Posts: 3
Joined: Tue Jun 17, 2014 10:11 am

Re: Pass all button events to my application

Post by Mernion » Thu Jun 19, 2014 7:23 am

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").
"It's alive! It's alive!!" :D

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.

jwick
Moderator
Moderator
Posts: 2504
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Pass all button events to my application

Post by jwick » Thu Jun 19, 2014 7:38 am

Woohoo bonus points for Jim!

Zarlox
Posts: 11
Joined: Fri Jul 11, 2014 11:37 am

Re: Pass all button events to my application

Post by Zarlox » Fri Jul 11, 2014 11:40 am

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?

Zarlox
Posts: 11
Joined: Fri Jul 11, 2014 11:37 am

Re: Pass all button events to my application

Post by Zarlox » Fri Jul 11, 2014 12:02 pm

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.

Zarlox
Posts: 11
Joined: Fri Jul 11, 2014 11:37 am

Re: Pass all button events to my application

Post by Zarlox » Fri Jul 11, 2014 2:47 pm

Alright. I just figured out the 3Dx driver comes with application profiles. That answers my questions.

psutex
Posts: 1
Joined: Fri Jan 08, 2016 8:58 am

Re: Pass all button events to my application

Post by psutex » Fri Jan 08, 2016 12:03 pm

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

jwick
Moderator
Moderator
Posts: 2504
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Pass all button events to my application

Post by jwick » Mon Jan 11, 2016 2:01 am

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?

Derek Zoolander
Posts: 3
Joined: Sat Jan 30, 2016 7:19 am

Re: Pass all button events to my application

Post by Derek Zoolander » Sat Jan 30, 2016 7:34 am

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
Do you mean pass it though the OS ?

Post Reply