Axis ranges of the SpaceNavigator

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

Moderator: Moderators

Post Reply
mliebig
Posts: 9
Joined: Mon Oct 20, 2014 10:00 pm

Axis ranges of the SpaceNavigator

Post by mliebig »

Hello,
when developing the integration with the 3dConnextio SDK, I had a profile file on my computer (derived from a template) yielding in an axis range of -350..+350 for each axis. Trying the software later on another computer which did not have the this profile (I just installed the driver package) I noticed that the range changed to something aroung +/- 2200.

The same thing happens when erasing the 3DxTest.xml file from the configuration folder. The axis then also seem to connected somehow. How to deliver a software to another computer, am I forced to deliver the XML profile or is there a way to normalize the axes without a profile?

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

Re: Axis ranges of the SpaceNavigator

Post by jwick »

The default Cfg multiplies everything by 4 to be compatible with the previous driver. It is better to use the raw data.

It is best for you to create a Cfg for your application. That is the only way you can display the name of your choice and have application-appropriate button assignments shown on the LCDs and in the GUI.
mliebig
Posts: 9
Joined: Mon Oct 20, 2014 10:00 pm

Re: Axis ranges of the SpaceNavigator

Post by mliebig »

Thanks for your reply.

Does the transport S80 define the range of +/- 350 or dies HID (like suggested in viewtopic.php?f=19&t=8196&p=34408&hilit ... ort#p34629)

Sadly I did not find information about creating a profile (like I asked in the other post: viewtopic.php?f=19&t=8443).

Another thing is the delivery of the provile along with the software -is there a way to know the default installation path for the configuration XMLs. Does it depend on 32/64 bis system, is there a registry key to evaluate?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Axis ranges of the SpaceNavigator

Post by jwick »

The hardware determines the range of the data. We try to pass it through unchanged.

To create a profile for your app, make a copy of AppDefCfg_S80.xml (under ProgramFiles/...). Rename it for your app. Change the Name and ExecutableName fields for your app and save it into %PROGRAMDATA%\3Dconnexion\3DxWare\Cfg. The driver will find it there when your ExecutableName is seen.

To distribute it, have your installer put it in this dir. Installers have access to that dir. Note this is a different place than ProgramFiles.
You don't have to know where 3DxWinCore is installed for this to work. It is the same on x86 and x64.
mliebig
Posts: 9
Joined: Mon Oct 20, 2014 10:00 pm

Re: Axis ranges of the SpaceNavigator

Post by mliebig »

Thanks for your answer. That clears the axis range, that rises other questions and I'm still not able to define a profile for my application. There is so little information to find on how to setup a XML profile. It's really sad and frustrating.

I'd like to configure the SpaceNavigator as follows:
In a certain part of my software, the message events of the SpaceNavigator shall be evaluated. When the part of the software is opened, the device is initialized and a message loop looks for messages from the device.
I guess that S80 means that the message loop is used? I would use the AppDefCfg_S80.xml as a template.

In all other parts of the software, the SpaceNavigator shall emulate keyboard shortcuts. I want to write a profile that defines keystrokes for certain axis movements and buttons. I guess I should use KMJ profile for that. I would use the profile suggested here for notepad.exe viewtopic.php?f=25&t=8210&p=34464&hilit ... xe+#p34464 as a template.

My questions:

1. What does the profile setting say about the handling of the device. KMJ, S80, HID

2. Is it possible to catch the messages in one part of a program and emulate keyboard events on other parts of the program? I'm wondering since the driver seems to fokus on the executable filename, which would be the same for my application.

3. What is the right template for defining keyboard shortcuts from axis movement and button events?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Axis ranges of the SpaceNavigator

Post by jwick »

Sitting on the outside, the driver can't do anything that sophisticated unless it could know what part of the program you were in. At this time, it only uses the executable name.

The best approach is to get the events yourself in a consistent place (the message loop) and dispatch them to the appropriate part of your code. Presumably you know everything there is to know about what mode the application is in. In the keyboard mode, if you really must, you can use SendInput to send keystrokes to yourself. This won't be anywhere near as smooth as if you accessed whatever those keystrokes do directly in your code.

To make a profile for your application, make a copy of AppDefCfg_s80.xml, rename it, change the Name and ExecutableName and save it into %PROGRAMDATA%\3Dconnexion\3DxWare\Cfg.
Post Reply