It looks like your using prompted entry in the title block. I would advise you to change that to iproperty entries as it gets difficult to handle the prompted entry by code.
If you cannot remove the prompted entry you will need to add the prompted entry contents at the same time as you are adding the titleblock. Here is the link to the API sample.
This is where the prompts are added. It starts at 0 and ends at the number you need.
Dim sPromptStrings(1) As String
sPromptStrings(0) = "String 1"
sPromptStrings(1) = "String 2"
The below code is an extract of the InsertTitleBlockOnSheet sub routine and is converted from VBA to ilogic/vb.net . I have added in the border addition as well.
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
' Obtain a reference to the desired border defintion.
Dim oTitleBlockDef As TitleBlockDefinition
oTitleBlockDef = oDrawDoc.TitleBlockDefinitions.Item("DANNYBOY")
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet
' Check to see if the sheet already has a title block and delete it if it does.
If Not oSheet.TitleBlock Is Nothing Then
oSheet.TitleBlock.Delete
End If
' This title block definition contains one prompted string input. An array
' must be input that contains the strings for the prompted strings.
Dim sPromptStrings(1) As String
sPromptStrings(0) = "String 1"
sPromptStrings(1) = "String 2"
' Add an instance of the title block definition to the sheet.
Dim oTitleBlock As TitleBlock
oTitleBlock = oSheet.AddTitleBlock(oTitleBlockDef, , sPromptStrings)
' Check to see if the sheet already has a border and delete it if it does.
If Not oSheet.Border Is Nothing Then
oSheet.Border.Delete
End If
'Obtain a reference to the desired border defintion.
Dim oBorderDef As BorderDefinition
oBorderDef = oDrawDoc.BorderDefinitions.Item("11x17")
' Add the border to the sheet.
Dim oBorder As Border
oBorder = oSheet.AddBorder(oBorderDef,)
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan