Reading properties

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

Moderator: Moderators

Post Reply
tomas.koza
Posts: 3
Joined: Wed Apr 27, 2022 1:14 am

Reading properties

Post by tomas.koza »

Hi,

I finally managed to make the new SDK work for my APP. What I have issues with is: detecting wether there is any 3d connexion mouse connected at all.

In documentation I found that I can querry navlib properties for that, using:

Code: Select all

NavigationModel.Read("device.present", lDevicePresent);
result of this call in my case is 0, i.e. success. String property value is empty. And the result doesn't change based on wether the mouse is or isn't connected.

Any help is appreciated.
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Reading properties

Post by ngomes »

tomas.koza wrote: Wed Apr 27, 2022 1:20 am In documentation I found that I can querry navlib properties for that
That does not seem right.

Can you tell us where exactly in the documentation did you find the reference to the "device.present" property?

Currently, the property always returns "true" (it is only a placeholder, effectively). Client applications aren't expected, by design, to behave differently if a device happens to be connected or not. Perhaps you can give us some context on why this appears to be necessary in your case.
Nuno Gomes
tomas.koza
Posts: 3
Joined: Wed Apr 27, 2022 1:14 am

Re: Reading properties

Post by tomas.koza »

In Documentation.chm that is part of your SDK package there is topic 'PropertyNames Fields' which defines "DevicePresent Property that the program can query to determine if an input device is attached.". There is nothing mentioned in 'navlib.pdf' or 'quick_guide.pdf'. But asking for a 'DevicePresent' property will result in an error. So I looked into the source code and found 'navlib.h' which defines "static const property_t device_present_k = "device.present";" Using string 'device.present' will not result in an error, but it does not work (as you mentioned).

"Perhaps you can give us some context on why this appears to be necessary in your case." Because my employer asked for it. With your old SDK we used to test and detect wether there is any device, if not, we won't be catching any events or try to process it. Which had its use for the old SDK. But the thing is, in configuration of our APP you can enable/disable the function of 3d mouse, which is not available if there is no mouse.

And as it goes in most companies, I just received a task "there is a new SDK, implement it, it has to be exactly the same as before in every aspect" ...
based on your answer I surmised that it is not possible.
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Reading properties

Post by ngomes »

tomas.koza wrote: Mon May 02, 2022 12:28 am based on your answer I surmised that it is not possible.
It is not, no, and that's by design (the property "present" notwithstanding).

I suggest have your employer contacting our Product team. They are probably the people to reach at this point.
tomas.koza
Posts: 3
Joined: Wed Apr 27, 2022 1:14 am

Re: Reading properties

Post by tomas.koza »

That is fine, I will deal with it. Thanks for your answers.
Post Reply