@wtriplett
Looking at the code you posted I don't believe there is an ilogic way to position the titleblock. You need to use the API and reference the Titleblockdefinitions contained in the sheet and then pick one definition by name to add to the active sheet.
I found the information in the below links. I found the API online help very useful when you look at the samples. The snippets can be a bit tricky if they have not been used in a context.
Title Block Definitions
https://adndevblog.typepad.com/manufacturing/2013/01/deleting-the-titleblockdefinition-from-a-sheet....
https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-389C7661-CA66-437B-95A4-28F2A11A7A57
TitleBlock Positioning
https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-0D142B83-F651-409E-8299-BC9D5BB0BF4C
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
'reference to Active Sheet
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet
'reference to existing title block
Dim oTitleBlock As TitleBlock
oTitleBlock = oSheet.TitleBlock
'reference to adefinitions of Sheet title blocks by Name
Dim oTitleBlockDefs As TitleBlockDefinitions
oTitleBlockDefs = oDrawDoc.TitleBlockDefinitions
' Obtain a reference to the desired border defintion.
Dim oTitleBlockDef As TitleBlockDefinition
' Check to see if the sheet already has a title block and delete it if it does.
If Not oTitleBlock Is Nothing Then
oTitleBlock.Delete
End If
'----------------------------------------------------------------------------------------------------
'i need this title block to be bottom right
If Parameter.Value("SheetSize") = "D" And Parameter.Value("TBStyle") = "VERTICAL" Then
ActiveSheet.ChangeSize("D")
ActiveSheet.Border = "ITI DE VERTICAL"
'ActiveSheet.TitleBlock = "ITI TB VERTICAL"
'Set Titleblock definition by name
oTitleBlockDef = oTitleBlockDefs.Item("ITI TB VERTICAL")
'insert title block To a New location: kBottomLeftPosition, kBottomRightPosition, kTopLeftPosition, kTopRightPosition
oSheet.AddTitleBlock(oTitleBlockDef, TitleBlockLocationEnum.kBottomRightPosition)
'----------------------------------------------------------------------------------------------------
'i need this title block to be bottom left
ElseIf Parameter.Value("SheetSize") = "D" And Parameter.Value("TBStyle") = "HORIZONTAL" Then
ActiveSheet.ChangeSize("D")
ActiveSheet.Border = "ITI DE HORIZONTAL"
'ActiveSheet.TitleBlock = "ITI TB HORIZONTAL"
'Set Titleblock definition by name
oTitleBlockDef = oTitleBlockDefs.Item("ITI TB HORIZONTAL")
'insert title block To a New location: kBottomLeftPosition, kBottomRightPosition, kTopLeftPosition, kTopRightPosition
oSheet.AddTitleBlock(oTitleBlockDef, TitleBlockLocationEnum.kBottomLeftPosition)
End If
Any questions let me know.
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan