After a bunch of trail and error, I have developed some code that works for me. This code was created in Inventor 2022 and might not work in previous versions as it uses iLogic manage objects. I tried using Inventor's API but could not access the flat pattern features. Below is my code that I used to create an origin point and create two ordinate dimensions. To see how to get work points on flat pattern see: Solved: Placing origin indicator on a flat pattern - Autodesk Community - Inventor
'Sets the origin workpoint on the flat pattern view. Also creates two ordinate dimensions.
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
' Set a reference to the active sheet.
Dim oActiveSheet As Sheet
oActiveSheet = oDrawDoc.ActiveSheet
'Reference the View we want.
Dim oView As DrawingView = ActiveSheet.View("FlatPattern").View
Dim iSheet = ThisDrawing.Sheets.ItemByName(ThisApplication.ActiveDocument.ActiveSheet.Name)
Dim iView = iSheet.DrawingViews.ItemByName("FlatPattern")
Dim WorkPoint_Origin = iView.GetIntent("WorkPoint Origin")
' If origin indicator has not been already created, create it first.
If Not oView.HasOriginIndicator Then
oView.CreateOriginIndicator(WorkPoint_Origin)
oView.OriginIndicator.Visible = True
Else
oView.OriginIndicator.Intent = WorkPoint_Origin
End If
' Set a reference to the ordinate dimensions collection.
Dim oOrdinateDimensions As OrdinateDimensions
oOrdinateDimensions = oActiveSheet.DrawingDimensions.OrdinateDimensions
' Create point intents to anchor the dimension to.
Dim GI1 = iView.GetIntent("Dimension WP:3")
Dim GI2 = iView.GetIntent("Dimension WP:4")
'Create a point for the text
Dim TextPoint1 As Point2d
Dim XPos As Double
Dim YPos As Double
XPos = oView.Left + 1.25
YPos = oView.Top + 1.25
TextPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(XPos, YPos)
Dim TextPoint2 As Point2d
XPos = oView.Left + 5.25
YPos = oView.Top + 1.25
TextPoint2 = ThisApplication.TransientGeometry.CreatePoint2d(XPos, YPos)
' Create the first ordinate dimension.
Dim oOrdinateDimension1 As OrdinateDimension
oOrdinateDimension1 = oOrdinateDimensions.Add(GI1, TextPoint1, kVerticalDimensionType)
' Create the second ordinate dimension.
Dim oOrdinateDimension2 As OrdinateDimension
oOrdinateDimension2 = oOrdinateDimensions.Add(GI2, TextPoint2, kVerticalDimensionType)