I made an app in Inventor that draws some skecthes and makes extrusions, bends and so on in an IPT file.
I put some of "interest" points on a list: i.e. the center of sketch circles, axes and so on
Then my app create an IDW with a sheet and a view.
I need to create drawing dimensions from the list of 3D points recorded while model the part.
I made several attempts, even looking at the code in other posts, but I always get the same "general" error.
this is one of the attempts bu I tried also to use objs instead of points and I had the same error
Dim oShtPt1 As Point2d = oView.ModelToSheetSpace(p1)
Dim oShtPt2 As Point2d = oView.ModelToSheetSpace(p2)
Dim oGeomIntent1 As GeometryIntent = oSheet.CreateGeometryIntent(oShtPt1, IntentTypeEnum.kPoint2dIntent)
Dim oGeomIntent2 As GeometryIntent = oSheet.CreateGeometryIntent(oShtPt2, IntentTypeEnum.kPoint2dIntent)
Dim oDimX As Double = (oGeomIntent1.PointOnSheet.X + oGeomIntent2.PointOnSheet.X) / 2
Dim oDimY As Double = oGeomIntent1.PointOnSheet.Y + 2
Dim oPtText As Point2d = oTransGeom.CreatePoint2d(oDimX, oDimY)
Dim oDimension As DrawingDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2)