*Brian Ekins \(Autodesk\) 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.
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.
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?
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
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.