We have written a plugin for SketchUp.
Here’s the basic code we use to initialize a spacemouse device:
SiInitialize(); SiOpenData oData; SiOpenWinInit(&oData, m_hwnd); SiSetUiMode(SI_ALL_HANDLES, SI_UI_NO_CONTROLS); m_siHdlDevice = SiOpen("OurApp", SI_ANY_DEVICE, SI_NO_MASK, SI_EVENT, &oData); SiSyncAxesState axesState; axesState.state = SI_SYNC_AXES_STATE_TX | SI_SYNC_AXES_STATE_TY | SI_SYNC_AXES_STATE_TZ | SI_SYNC_AXES_STATE_RX | SI_SYNC_AXES_STATE_RY | SI_SYNC_AXES_STATE_RZ; SiSyncSetAxesState(m_siHdlDevice, axesState);
As soon as our hWnd gets the focus once, the SpaceMouse ceases to work in SketchUp.
In Revit, it works fine.
Would it be possible for you to share the code you use in order to communicate with the device, or do you have anymore hints / best practices for us?