AnsweredAssumed Answered

VBA: Setting drawing view position with "swView.Position" not working for certain configurations

Question asked by Kevin Davet on Aug 26, 2020
Latest reply on Aug 27, 2020 by Kevin Davet

Would there be any reason that some of the different configurations do not position themselves on the correct coordinates? 

It seems like it gets the X value correct every time but the Y value is almost random. This is the code I used:

 

If swView.GetName2 = "Drawing View1" Then
   dArr(0) = 0.11
   dArr(1) = 0.1525
   vPos = dArr
   swView.Position = vPos

   swDraw.EditRebuild3
End If
If swView.GetName2 = "Drawing View2" Then
   dArr(0) = 0.195
   dArr(1) = 0.0975
   vPos = dArr
   swView.Position = vPos

   swDraw.EditRebuild3
End If

 

The drawing views are named correctly and I've stepped through the program to confirm that it sets the position. I even used the debugging print to make sure it sets the correct coordinates, which it does but it does not change the drawing. There is no alignment on the parts.

 

PS: Sorry, I cannot share my full macro file/ drawing.

Outcomes