Private Sub Command1_Click()
On Error Resume Next
Dim objApplication As SolidEdgeFramework.Application
Dim objSolidEdgeInsightXT As SolidEdgeFramework.SolidEdgeInsightXT
Set objApplication = GetObject(, "SolidEdge.Application")
Set objSolidEdgeInsightXT = objApplication.SolidEdgeInsightXT
'Example takes two preference names
Dim PreferenceInfo(1, 1) As Object
PreferenceInfo(0, 0) = "TC_Allow_Longer_ID_Name"
PreferenceInfo(1, 0) = "InsightXT_BOM_Synchronize"
Call objSolidEdgeInsightXT.GetInsightXTOrTCPreferenceValues(PreferenceInfo)
Dim PreferenceValue As Object
'Boolean value true or false for preference TC_Allow_Longer_ID_Name
PreferenceValue = PreferenceInfo(0, 1)
'Boolean value true or false for preference InsightXT_BOM_Synchronize
PreferenceValue = PreferenceInfo(1, 1)
Set objSolidEdgeInsightXT = Nothing
Set objApplication = Nothing
End Sub