and this one creates a thread note. Again, it assumes the thread is selected.

Dim oApp As Inventor.Application = ThisApplication
Dim oDoc As DrawingDocument = oApp.ActiveDocument
If oDoc.SelectSet.Count <> 1 Then
MsgBox ("A single thread edge must be selected.")
Exit Sub
End If
If Not TypeOf oDoc.SelectSet(1) Is DrawingCurveSegment Then
MsgBox ("A thread edge must be selected.")
Exit Sub
End If
Dim oThreadEdge As DrawingCurve = oDoc.SelectSet(1).Parent
If Not (oThreadEdge.EdgeType = kThreadEdge) Then
MsgBox ("A thread edge must be selected.")
Exit Sub
End If
Dim oPosition As Point2d = oApp.TransientGeometry.CreatePoint2d(22, 21)
Dim oThreadNote As HoleThreadNote = oDoc.ActiveSheet.DrawingNotes.HoleThreadNotes.Add(oPosition, oThreadEdge)
Nacho
Automation & Design Engineer
Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.