07-04-2023
07:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-04-2023
07:04 AM
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.
07-04-2023
07:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-04-2023
07:17 AM
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"
07-04-2023
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-04-2023
07:24 AM
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.
07-04-2023
07:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report