Hi @Anonymous,
Here is a quick iLogic rule to do this:
Dim oSSet As SelectSet = ThisDoc.Document.SelectSet
If oSSet.count = 0 Then
MessageBox.Show("You must select a drawing view first", "iLogic")
Exit Sub
End If
'Reference to the drawing view from the 1st selected object
Dim oView As DrawingView = trycast(oSSet.item(1), DrawingView)
If oView IsNot Nothing Then
oView.ShowLabel = True
'get the part number from the model in the view
oPN = "<Property Document='model' PropertySet='Design Tracking Properties' Property='Part Number' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='5'>PART NUMBER</Property>"
oPartNumber = "<StyleOverride Underline='True'>" & oPN & "</StyleOverride>"
'set temp view label
oView.Label.FormattedText = oPartNumber
'add ITEM and get last 2 digits
oPN2 = "ITEM " & Right(oView.Label.Text,2)
'format text for view label
oPartNumber = "<StyleOverride Underline='True'>" & oPN2 & "</StyleOverride>"
oStringScale = "<Br/><StyleOverride Underline='False'>" & "SCALE <DrawingViewScale/>" & "</StyleOverride>"
oDescription = "<Br/><StyleOverride Underline='False'>" & _
"<Property Document='model' PropertySet='Design Tracking Properties' Property='Description' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='29'>DESCRIPTION</Property></StyleOverride>"
'add to the view label
oView.Label.FormattedText = oPartNumber & oDescription & oStringScale
Else
MessageBox.Show("The selected object is not a drawing view", "iLogic")
End If
Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
related link:
https://forums.autodesk.com/t5/inventor-customization/ilogic-code-to-change-view-label-text/td-p/3625130
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com