Take a look at this example: Compare Model Views .
Macro will identify the changes and display the result if
- Views are the same
- Views are of different orientation (i.e. rotated)
- Views are of different translation (i.e. moved)
- Views are of different scale
If you only need orientation (i.e. normal vector) you can modify the macro to skip the translation and scale comparison.
Is keyword is used for comparing references. Array is not a reference type in VBA. So you need to compare values-wise to see if arrays are the same.
Thanks again, Artem Taturevich. I was able to successfully implement the modelview comparison. I did have to make a small change to how individual array values are compared. I added a TolerantEqual() function because "<>" was getting stuck on tiny floating point errors.
Private Function TolerantEqual(a As Variant, b As Variant, tol As Integer) As Boolean
If Abs(a - b) <= Abs(a / 10 ^ tol) Then
TolerantEqual = True
TolerantEqual = False