The previous posters are absolutely correct, that on the surface this seems like a huge challenge and at first glance it is.
BUT it is possible to do this relatively easily if you have the following information:
- Faces that are known to be datum edges are attributed as such - using the API
- Edges that require dimensions are attributed as such, again using the API
The best example of this I have seen (beyond my own work) is that of the Woodwork for Inventor team.
Their drawing system is frankly outstanding, but as magic as it may appear to be, if you know the general rules for how the dimensions are applied to arrive at the end goal drawing as per your example, actually getting there isn't that difficult.
Yes, there are caveats and pitfalls within the API itself- some of the documentation isn't great, some of the method descriptions within the API frankly could have been better written in crayon.
Here is a (partial) drawing view I created entirely using the API:

FWIW: I don't need to use Attributes for these hole positions as there is a repeating pattern, but I did use them for the underlying hole features themselves.
Once you get your head around adding and retrieving said attributes it's a lot easier.
Here are a couple of methods I wrote, one that adds attributes to a collection of 2D sketch points, the other searches a known sketch and retrieves a set of information I had previously stored:
*** These were converted from c# to VB.NET using this converter: http://converter.telerik.com/ so apologies if this doesn't work out of the box ***
Private Shared Sub CreateSketchPointsFromList()
Try
Dim percentComplete As Double = 0
Dim i As Double = 0
Dim newAttSet As AttributeSet = Nothing
For Each holeDef As RadialHoleDefinition In radialHoles
percentComplete = i / radialHoles.Count
Reporter.UpdateStatusBar(percentComplete, "Creating Sketch Points from Excel Data.")
Dim transPoint As Point2d = TransGeom.CreatePoint2d(holeDef.XPosition, holeDef.YPosition)
Dim newPoint As SketchPoint = newSketch.SketchPoints.Add(transPoint, True)
Dim oAtt As Inventor.Attribute = Nothing
newAttSet = newPoint.AttributeSets.Add("RadialHole")
oAtt = newAttSet.Add("HoleDiaParamName", ValueTypeEnum.kStringType, holeDef.HoleDiaParameterName)
oAtt = newAttSet.Add("HoleSize", ValueTypeEnum.kStringType, holeDef.HoleDia)
oAtt = newAttSet.Add("HoleDepth", ValueTypeEnum.kStringType, holeDef.HoleDepth)
oAtt = newAttSet.Add("HoleName", ValueTypeEnum.kStringType, holeDef.HoleDisplayName)
oAtt = newAttSet.Add("HolePositionX", ValueTypeEnum.kDoubleType, holeDef.XPosition)
oAtt = newAttSet.Add("HolePositionY", ValueTypeEnum.kDoubleType, holeDef.YPosition)
Dim newTextPoint As Point2d = TransGeom.CreatePoint2d((holeDef.XPosition / 2), holeDef.YPosition)
Dim pointConstraint As TwoPointDistanceDimConstraint = newSketch.DimensionConstraints.AddTwoPointDistance(OriginSketchPoint, newPoint, DimensionOrientationEnum.kHorizontalDim, newTextPoint, False)
pointConstraint.Parameter.Name = "HoleX" & holeDef.HoleDiaParameterName + holeDef.HoleName
newTextPoint = TransGeom.CreatePoint2d((holeDef.XPosition / 2), (holeDef.YPosition / 2))
pointConstraint = newSketch.DimensionConstraints.AddTwoPointDistance(OriginSketchPoint, newPoint, DimensionOrientationEnum.kVerticalDim, newTextPoint, False)
pointConstraint.Parameter.Name = "HoleY" & holeDef.HoleDiaParameterName + holeDef.HoleName
holeDef.SketchPnt = newPoint
i += 1
Next
newSketch.Edit()
newSketch.ExitEdit()
Catch ex As Exception
log.[Error](ex.Message)
Finally
RadialHoles.m_InventorApp.ActiveView.Update()
End Try
End Sub
Here's the bit that searches a known sketch:
private static void CreateGeomForHolePositionComparisons()
{
try
{
DrawingDebuggingGraphics();
ObjectCollection objCollection = PartDoc.AttributeManager.FindObjects("RadialHole", "HolePositionX");
originWP = partCompDef.WorkPoints[1];
double[] endfaceParams = new double[2];
double[] endFaceNormals = new double[3];
endfaceParams[0] = 0;
endfaceParams[1] = 0;
selectedEndFace.Evaluator.GetNormal(endfaceParams, endFaceNormals);
Plane selectedFacePlane = selectedEndFace.Geometry;
selectedFacePlane.Evaluator.GetNormal(endfaceParams, endFaceNormals);
selectedWorkPlane.GetPosition(out Inventor.Point tmpWPPoint, out UnitVector tmpXAxis, out UnitVector tmpYAxis);
double percent = 0;
double progress = 0;
for (int i = 1; i < objCollection.Count + 1; i++)
{
if (objCollection[i] is SketchPoint skpoint)
{
percent = (progress / objCollection.Count);
Reporter.UpdateStatusBar(percent, "Creating 3D Points for comparison with Sketch Points.");
AttributeSet AttSet = skpoint.AttributeSets[1];
Inventor.Attribute xPosAtt = null;
double xPosition = 0;
Inventor.Attribute yPosAtt = null;
double yPosition = 0;
xPosAtt = AttSet["HolePositionX"];
xPosition = Convert.ToDouble(xPosAtt.Value);
yPosAtt = AttSet["HolePositionY"];
yPosition = Convert.ToDouble(yPosAtt.Value);
Inventor.Attribute holeName = AttSet["HoleName"];
string ThisHoleName = holeName.Value.ToString();
//creates a basic point for translation.
Inventor.Point tmpOriginPoint = TransGeom.CreatePoint(0, yPosition, 0); // datumWorkPoint.Point.Z);
Matrix originMatrix = TransGeom.CreateMatrix();
Matrix destinationMatrix = TransGeom.CreateMatrix();
originMatrix.SetTranslation(originWP.Point.VectorTo(datumWorkPoint.Point));
Vector originYVector = TransGeom.CreateVector(0, 1, 0);
originMatrix.SetToRotateTo(originYVector, cylinderNormal.AsVector());
tmpOriginPoint.TransformBy(originMatrix);
tmpOriginPoint.TranslateBy(originWP.Point.VectorTo(datumWorkPoint.Point));
//Inventor.Point tmpOriginPoint = TransGeom.CreatePoint(datumWorkPoint.Point.X, yPosition, datumWorkPoint.Point.Z);
double radius = selectedFace.Geometry.Radius;
double pi = Math.PI;
double circumference = ((2 * pi) * radius);
double arcLength = xPosition;
double arcAngle = (arcLength / ((2 * radius) * pi)) * 360;
Arc3d tmpArc = null;
tmpArc = TransGeom.CreateArc3d(tmpOriginPoint, cylinderNormal, selectedWorkPlane.Plane.Normal, radius, 0, (arcAngle * (pi / 180)));
DrawDebuggingGraphics(tmpArc);
RadialHoleDefinition holeDef = (from RadialHoleDefinition hole in radialHoles
where hole.HoleDisplayName == ThisHoleName
select hole).FirstOrDefault();
if (holeDef?.HoleName.Length > 0)
{
holeDef.ComparisonPoint = tmpArc.EndPoint;
}
else
{
log.Error("One of the HoleDefinitions is incomplete.");
Reporter.UpdateStatusBar("One of the HoleDefinitions is incomplete, check the spreadsheet and run again!");
}
RadialHoles.m_InventorApp.ActiveView.Update();
progress++;
}
}
}
catch (Exception ex)
{
log.Error(ex.Message);
}
//new3DSketch.curves
}
Hope this helps.
Alex.