Thanks for that Bryce,
that made it work.
I had played around with InputSettings.RunningSnaps as well, but only looked for changes in the menu.
In fact, if you only want to change the snap modes and don't care about having the menu UpToDate then you only need to set InputSettings.RunningSnaps.
But if you want both to match then you'll have to set
InputSettings.SaveSnapModes
- which requires a 13-element array of unsigned Int16; Array[UInt16]([UInt16()] * 13)
- 0 = point
1 = end
2 = mid
3 = near
4 = center
5 = insertion
7 = perp
8 = tangent
9 = node
11 = intersection
12 = free
19 = quad
20 = image
- if you add 4096 to the integer it's being ticked in the menu
- if you change the order, it changes the priority
InputSettings.RunningSnaps
- requires an Array with the size of ticked snapmodes
- means first you need to know how many snaps will be ticked; i.e. self.snapstickedarray = Array[SnapMode]([SnapMode(13)] * snapsticked.Count)
- setting all the snap modes to None and then loop through again and set the snap mode based on an integer; self.snapstickedarray[i] = SnapMode(snapsticked[i])
That simple idea turned into a very cumbersome ordeal again.
When will we finally get a decent SDK documentation. The macro language came out and is being advertised since 2018. After 6 years we still have basically no documentation.
------------------------------
Ronny Schneider
------------------------------
Original Message:
Sent: 10-07-2024 14:18
From: Bryce Haire
Subject: correct use of Trimble.Vce.UI.Controls.InputSettings ?
Also, if all are disabled, please set the value:
new Trimble.Vce.Interfaces.SnapIn.SnapMode[] { Trimble.Vce.Interfaces.SnapIn.SnapMode.None }
and not an empty array.
------------------------------
Bryce Haire
------------------------------