Community
@Anonymous wrote:
ShowName wasn't removed but has been hidden, along with ShowScale. Even
though they're hidden they can still be used and now have the same effect as
calling the new ShowLabel property. This is in reaction to a change in
Inventor. Previously to Inventor 2009 the scale and name were seperate and
you could control the display of them independently. Inventor 2009 now
supports a general and more powerful view labeling mechanism. The view
label is text that can contain fields for the view name and scale, plus
other values just like you can use in other text notes (iProperties, etc.).
The API had to react to this change in Inventor.
Earlier code that used these properties will still work but you might not
get quite the results you expected. For example, if you program turns off
the scale but expects the name to still be there, since the name will get
turned off when you turn the scale off since they're both part of the new
single view label.
As you suspected the problem must be from something else.
--
Brian Ekins
Autodesk Inventor API
Can you show me an example of how to do this?
I want to leave the View Name shown, but turn the Scale off.
Thanks!
Mike
I have already adjusted the View Annotation style, but it would be nice to be able to do this with a click of a button instead of having to right-click the label and delete the scale on every view.
Anyone have any idea on this?
Thanks!
Mike
If there is no exceptional view that you can use below VBA to do this:
Sub ShowViewName() Dim oDoc As DrawingDocument Set oDoc = ThisApplication.ActiveDocument Dim oView As DrawingView For Each oView In Me.Sheets(1).DrawingViews oView.Label.FormattedText = "<DrawingViewName/>" oView.ShowLabel = True Next End Sub
Thanks Rocky, but I've altready been able to do what you have shown.
I want to turn off the View Scale.
Thanks!
Mike