Hi Eric,
[quote user="Eric Milberger"]
I did find an error in the documentation though.
for Metric Accuracy it starts with 1 not zero
1 = 1
2 = 1.2
3 = 1.23, etc
[/quote]
There is no error in the documentation, because the values are not important ... never. The only important are the names of constants (exactly they are members of MsdCoordinateAccuracy enumerator, which is a construction used in SW development) . It's not required the corresponding values are defined in any logic system:. Imagine a situation after few versions of ('any) software, you will realize you have to add a new option in your list. In the discussed case it can be e.g. accuracy of tens of units (so a readout of 8 will be 10). You will add a new constant name msdAccuracyTensOfUnits and will add a next free value (e. 1000). The result: Names are easy to understand, the code is easily readable, but the new value looks like accidental ;-)
[quote user="Eric Milberger"]
Also = is required in the statements
[/quote]
Yes, because key-in vba execute means "Interpret the rest of the key-in as VBA code. And the code is ActiveSettings.CoordinateAccuracy = msdAccuracyHalf. The explanation is:
- ActiveSetting is an object, as is deduced from its name, which in MicroStation VBA API contains all MicroStation active settings.
- .CoordinateAccuracy is setting of (suprise, isn't it? :-)) the coordinate accuracy settings.
- The last part = msdAccuracyHalf is assignment, which set the new value of Coordinate Accuracy.
[quote user="Eric Milberger"]
Then things don't work with the limited knowlege I have:
vba execute ActiveSettings.CoordinateAccuracy=Half This works fine
...
vba execute ActiveSettings.CoordinateAccuracy eighth does not work
[/quote]
You have to use names, exactly as defined in MicroStation VBA documentation:
vba execute ActiveSettings.CoordinateAccuracy = msdAccuracyHalf
vba execute ActiveSettings.CoordinateAccuracy = msdAccuracy0
vba execute ActiveSettings.CoordinateAccuracy = msdAccuracy8th
If you are familiar with VBA and VBA editor, you can try to type code there. It's easier, because the editor offers the possible values automatically.
With regards,
Jan