Message 1 of 7
iLogic: Getting a parameter is incorrect error when I try to add a TitleBlockDefinition to a newly added sheet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dim oDoc As Document
For Each oDoc in oActiveDoc.AllReferencedDocuments
If oDoc.DocumentType = kAssemblyDocumentObject Then
' Add a new sheet
Dim newSheet As Sheet
newSheet = oDrgDoc.Sheets.Add()
' Apply the title block to the new sheet
Dim templateTitleBlock As TitleBlockDefinition = oDrgDoc.TitleBlockDefinitions.Item("CPT A3 REV")
Dim sPromptStrings(0 To 1) As String
sPromptStrings(0) = "String 1"
sPromptStrings(1) = "String 2"
Dim activeSheet As Sheet
activeSheet = oDrgDoc.ActiveSheet
activeSheet.AddTitleBlock(templateTitleBlock, , sPromptStrings)
newSheet.Name = oDoc.DisplayName
' Create the drawing for the assembly document on the new sheet
CreateDrawing(oDoc, newSheet)
iLogicVb.RunExternalRule("CreatePartsList")
End If
Next
For line 18, activeSheet.AddTitleBlock(templateTitleBlock, , sPromptStrings), I am getting the error "The parameter is incorrect". I don't understand why as the syntax and inputs are all as they should be. Please help!