Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I'm struggling a bit with a fairly simple issue. I'm trying to write a function that goes throught all views on a drawing. If that drawing has a active label I want the code to change the text.
This is just to quickly switch between languages.
I have tried using these as templates
Solved: ilogic code to change View Label Text - Autodesk Community - Inventor
Solved: ilogic code to change View Label Text - Autodesk Community - Inventor
I kinda get stuck when I need the Scale to come from the active view.
Could anyone help?
My code:
'start of ilogic codeDim oDoc As DrawingDocument: oDoc = ThisDoc.Document oModel = ThisDoc.ModelDocument Dim oSheets As Sheets Dim oSheet As Sheet Dim oViews As DrawingViews Dim oView As DrawingView oSheets = oDoc.Sheets For Each oSheet In oSheets oViews = oSheet.DrawingViews For Each oView In oViews oView.ShowLabel = True Try 'add the custom iproperties to the view label oView.Label.FormattedText = "TEXT" & ActiveSheet.View("VIEW1").ScaleString Catch 'do nothing if error End Try Next Next 'end of ilogic code
Solved! Go to Solution.