Sub Main() Dim oDrawingDoc As DrawingDocument = ThisApplication.ActiveDocument Dim baseScale As Double = oDrawingDoc.ActiveSheet.DrawingViews.Item(1).Scale For Each oView As DrawingView In oDrawingDoc.ActiveSheet.DrawingViews oView.Scale = baseScale Next End Sub
Solved! Go to Solution.
Solved by vpeuvion. Go to Solution.
Solved by FINET_Laurent. Go to Solution.
Hi,
Make sure the view you are chaning the scale is a main view and not an projected view, section views, etc. since those views scale are linked to the main ones :
Sub Main()
Dim oDrawingDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim baseScale As Double = oDrawingDoc.ActiveSheet.DrawingViews.Item(1).Scale
For Each oView As DrawingView In oDrawingDoc.ActiveSheet.DrawingViews
If oView.Type <> DrawingViewTypeEnum.kStandardDrawingViewType Then Continue For
oView.Scale = baseScale
Next
End Sub
Kind regards,
FINET L.
If this post solved your question, please kindly mark it as "Solution"
If this post helped out in any way to solve your question, please drop a "Like"Hi, you can try this:
Sub Main() Dim oDrawingDoc As DrawingDocument = ThisApplication.ActiveDocument Dim baseScale As Double = oDrawingDoc.ActiveSheet.DrawingViews.Item(1).Scale For Each oView As DrawingView In oDrawingDoc.ActiveSheet.DrawingViews If oView.ViewType = 10501 Then oView.Scale = baseScale Next End Sub
Vincent.
Can't find what you're looking for? Ask the community or share your knowledge.