3DxWare SDK

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

Moderator: Moderators

Post Reply
Sergiy
Posts: 6
Joined: Mon May 27, 2013 7:37 am

3DxWare SDK

Post by Sergiy »

Hi all,

Sory if there is not correct thread for my question. I'm just novice at this forum and have a very important question to clarify.

The problems is the next:
We have 3D mouse control with analogue control and two buttons (LB & RB)
How can we detect what hardware button has been pressed with 3dXWare SDK. We get an event object (SIwEvent) that contains a great number of members (fields). One of them is HWButtonNuber, but this value really depends on assigned with 3D ware panel (for example LB - Button 1, we get hwButtonNumber = 2, if LB - Button 12, we get hwButton number = 1 << 12 = 4096, etc). It seems to be not HW, rather SW button. Also this structure contains message (char*) but it isn't value that was read by driver from device (i think so, because driver reads 7 bytes, first byte = 3 - indicates button pressing, and 4th byte at this case indicates HW button ID. But message field seems not to have these bytes, and it has software button number (probably button's mask) again. Future SIwEvent structure investigation leads to the next conclusion: all fields that have to mean button number depends on assigned with 3DWare panel button, so we can detect which physical button has been pressed (left button or right button).
Direct reading from USB is walkaround, but it's low programming level and I really hope that we can get HW button number through SDK functions.

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

Re: 3DxWare SDK

Post by jwick »

You should make a profile for your application that maps all the buttons to be sent directly through to your application (App_PassToApplication).

Users can always remap the buttons using the 3DxWare driver, but if you provide no options in your profile, it is exceedingly difficult for them to do it :)

OTOH, we don't suggest that you limit your users so strictly. You should respond to messages from the driver regardless of which button generated them. If you don't you will lockup your software too tightly and new devices won't work with your software. It is rare that you can guarantee which 3D mouse your users purchase.
Sergiy
Posts: 6
Joined: Mon May 27, 2013 7:37 am

Re: 3DxWare SDK

Post by Sergiy »

Thnaks a lot for our reply.

Could you please clarify if we can to change configuretion through API similar to SolidWorks.
If we bind some action to button with SolidWorks panel, it's look like scg file was changed and title of the binded button contains command name, so when we open 3DxWare panel we can se which Solidworks' command is binded to button instead default button title.
jwick
Moderator
Moderator
Posts: 3340
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: 3DxWare SDK

Post by jwick »

There is an API for synchronizing with the driver in the 3DxWare SDK. It is a lot of work to use correctly.
sayala
Posts: 3
Joined: Wed Jul 24, 2013 11:50 am

Re: 3DxWare SDK

Post by sayala »

I just integrated space navigator into my application. I see that when right button is clicked, it displays pop-up menu to configure the mouse. How do i detect pop-up menu up state programatically? Is there an event sent when pop-up menu is shown/closed? Also, How do i close the pop-up menu programatically? I want to use pop-up menu like a Modal dialog in my application, i.e. suspend the interaction with my application while the popup menu is up.

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

Re: 3DxWare SDK

Post by jwick »

sayala wrote:I just integrated space navigator into my application. I see that when right button is clicked, it displays pop-up menu to configure the mouse. How do i detect pop-up menu up state programatically? Is there an event sent when pop-up menu is shown/closed? Also, How do i close the pop-up menu programatically? I want to use pop-up menu like a Modal dialog in my application, i.e. suspend the interaction with my application while the popup menu is up.

thanks
By default, the popupmenu is handled internally by the driver. Your application does not know it is happening and it just toggles driver settings. If you want to display your own popupmenu, with settings specific to your application (which we highly recommend), then reassign that button to a function to be sent directly to your application. When you get the button event, display your own popupmenu/dialog box/modal dialog/whatever.
veeresh.moodi
Posts: 2
Joined: Wed Sep 25, 2013 1:54 am

Re: 3DxWare SDK

Post by veeresh.moodi »

it works.. :)
Post Reply