Hello,
iam trying to use the sdk in Excel , but with the following Code i only receive "0". Thank you for your help
Private WithEvents Sensor1 As TDxInput.Sensor
Private WithEvents Keyboard1 As TDxInput.Keyboard
Private WithEvents Device1 As TDxInput.Device
Private Sub CommandButton1_Click()
Set Device1 = New TDxInput.Device
Set Sensor1 = Device1.Sensor
Set Keyboard1 = Device1.Keyboard
Device1.Connect
Dim Translation1 As TDxInput.Vector3D
Set Translation1 = Sensor1.translation
Dim Rotation1 As TDxInput.AngleAxis
Set Rotation1 = Sensor1.rotation
Label1.Caption = Translation1.X
End Sub
TDxInput in Excel VBA
Moderator: Moderators
Re: TDxInput in Excel VBA
I would agree with Nuno.Zire18 wrote:Hello,
Set Device1 = New TDxInput.Device
End Sub
The quoted code creates a new instance of the tdxinput for 3dxware. 3dxware only routes 3D Mouse data to a foreground app with a device instance. Invoking the subroutine creates a new device and querying it for already received data will draw a blank - it is new.
The correct practice would be to create the device once at startup/open and then only query the data in the subroutine.
Markus
-
- Posts: 1
- Joined: Wed Feb 04, 2015 2:52 pm
Re: TDxInput in Excel VBA
Is there an example of coordinates successfully being sent to excel?