Test if a dimension connect to male\female thread


I'm trying to find if a dimension in a draft in connected to a male of female thread.

I have a "draft standard" macro that scans all the dimensions in a draft and change the round off and colors according to the internal standard in the site.

I wish to use this macro to add "-2A" to a male thread text and "-2B" to a female (add to the "4-40 UNC" text that gets from the "%TS"), but I could not find how to get from the dimension object to the information of it's source feature in the part file.

Can this be done using API?
attached a small portion of my code that scans the dimensions.



Option Explicit On

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim objApp As SolidEdgeFramework.Application
        Dim objDocD As SolidEdgeDraft.DraftDocument
        Dim ObjActiveSheet As SolidEdgeDraft.Sheet
        Dim dima As SolidEdgeFrameworkSupport.Dimension

        On Error Resume Next 'connect to SE
        objApp = GetObject(, "SolidEdge.Application")
        If Err.Number Then
            MsgBox("Solid Edge in not open" & vbNewLine & "Macro aborting.")
        End If
        On Error Resume Next 'against no active doc
        If objApp.ActiveDocumentType <> SolidEdgeFramework.DocumentTypeConstants.igDraftDocument Then
            MsgBox("current sheet must be a draft view." & vbNewLine & "Macro Aborting.")
            objDocD = objApp.ActiveDocument
        End If
        On Error GoTo 0
        ObjActiveSheet = objDocD.ActiveSheet

        For Each dima In ObjActiveSheet.Dimensions

            'test if this is an angular dimension
            If dima.PrefixString = "%TS" Then
                MsgBox("how can I connect to the model and find if this a male or female thread")
                ' i wish to add "-2A" to a male thread or "-2B" to a feamale
            End If
    End Sub
End Class




Re: Test if a dimension connect to male\female thread

Very few or almost no methods exist that map graphics members from the model into the Draft Document.