Q:
I changed the scale of a Drawing view, but the referenced dimensions are not up-to-date afterwards. How do I update these dimensions?
If you are looking for changing the dimension values as well (to be scaled), you may try the following code. If you are looking only for maintaining the dependency between the drawing and the dimension header lines (and not the dimension values), you may not multiply by oScale in the line:
oDimension.OverrideModelValue = oDoc.ActiveSheet.DrawingDimensions.Item(i).ModelValue * oScale
Sub changeScale(ByVal app As Inventor.Application)
Dim oDoc As DrawingDocument = m_inventorApp.ActiveDocument
Dim oDrawingView As DrawingView = oDoc.ActiveSheet.DrawingViews.Item(1)
Dim oScale As Double = 0.5
oDrawingView.Scale = oScale
Dim i As Long
For i = 1 To oDoc.ActiveSheet.DrawingDimensions.Count
Dim oDimension As DrawingDimension
oDimension = oDoc.ActiveSheet.DrawingDimensions.Item(i)
oDimension.OverrideModelValue =
oDoc.ActiveSheet.DrawingDimensions.Item(i).ModelValue * oScale
Next i
oDoc.Update()
End Sub