@HermJan.Otterman
Hi guys,
I stumbled on this thread while searching for a solution to this EXACT problem I'm working with right now. We are a company that has worked in autocad for years and are slowly working inventor into the mix. One of the big issues is that Inventors drawing labeling isn't that great looking.
I've piece together the attached code from snippets found online, and it works but theres one big bug. When you run the code, if you have anything typed into the prompted text field "DESCRIPTION" (i.e. "Front Elevation") it overwrites the existing text with the default.
My VB and ilogic skills are extremely rudimentary, so I'm really at a loss how to make this work.
Here's how the code runs right now:
an IF statement looks at the sketch symbols and if its called View_Label, it deletes it (grumble grumble...)
The code then goes through the drawing, places a new sketch symbol, pulls the scale from the view, and fills out the prompted text fields "NAME" and "SCALE".
Heres how I would like it to run... in theory:
-The first time the code is run, the view labels are placed and the text is pulled from the view .
-During drawing, I change some of the prompted entries (i.e. fill out description to read "Front Elevation")
-When the code is run again, it checks to see if there is text different from the default in the "description" field. IF there is, it doesn't delete the label AND does not place one there. If there isn't (i.e. I havent touched the label), it just runs normally
At one point I had successfully gotten the code to not delete the prompted text I put in but it also was putting that text in all the labels. I think my variable was declared public which was probably the source of the issue.... unfortunately during my screwing around the code I managed to delete the snippet that did that. 
SyntaxEditor Code Snippet
Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheets As Sheets
oSheets = oDoc.Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
Dim oSymbol As SketchedSymbol
Dim oSymbols As SketchedSymbols
'iterate through all of the sheets
For Each oSheet In oSheets
'remove existing sketched symbols named View Label
For Each oSymbol In oSheet.SketchedSymbols
If oSymbol.Definition.Name = "View_Label" Then
oSymbol.Delete
Else
End If
Next
'set sheet active
oSheet.Activate
'set a refernce to the drawing views collection
oViews = oDoc.ActiveSheet.DrawingViews
' Iterate through all of the views
For Each oView In oViews
'This places a sketched symbol with the name "View_Label"
Dim oSymDef As SketchedSymbolDefinition
'defind the sketch symbol to be inserted
oSymDef = oDoc.SketchedSymbolDefinitions.Item("View_Label")
'set a string array with values for the prompted entries found in the symbol
Dim sPromptStrings(2) As String
sPromptStrings(0) = "" & oView.ScaleString 'set to view scale
sPromptStrings(1) = oView.Name 'set to view name
sPromptStrings(2) = "DESCRIPTION"
'set the position for the sketched symbol to be inserted
' and spaced off of the selected view center
Dim oPosition As Point2d: oPosition = oView.Center
oPosition.y = oPosition.y - (oView.Height / 2 + 2)
'insert the sketched symbol and set the prompted entries
oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition,0,1,sPromptStrings)
Next
Next
'activate sheet1
oDoc.Sheets.Item(1).Activate