Imports System.IO
Imports System.Runtime.InteropServices
Module Example
<STAThread()> _
Sub Main()
Dim objApplication As SolidEdgeFramework.Application = Nothing
Dim objDocuments As SolidEdgeFramework.Documents = Nothing
Dim objDraftDocument As SolidEdgeDraft.DraftDocument = Nothing
Dim objSheets As SolidEdgeDraft.Sheets = Nothing
Dim objSheet As SolidEdgeDraft.Sheet = Nothing
Dim objGostWelds As SolidEdgeFrameworkSupport.GostWeldSymbols = Nothing
Dim objGostWeld As SolidEdgeFrameworkSupport.GostWeldSymbol = Nothing
Dim objLines As SolidEdgeFrameworkSupport.Lines2d = Nothing
Dim objLine1 As SolidEdgeFrameworkSupport.Line2d = Nothing
Try
OleMessageFilter.Register()
objApplication = Activator.CreateInstance(Type.GetTypeFromProgID("SolidEdge.Application"))
objApplication.Visible = True
objDocuments = objApplication.Documents
objDraftDocument = objDocuments.Add("SolidEdge.DraftDocument")
objSheet = objDraftDocument.ActiveSheet
objLines = objSheet.Lines2d
objGostWelds = objSheet.GostWeldSymbols
'Add a horizontal line
objLine1 = objLines.AddBy2Points(0.1, 0.1, 0.3, 0.1)
'Create GOST weld
objGostWeld = objGostWelds.AddByTerminator(objLine1, 0.125, 0.1, 0.0, True)
objGostWeld.AddVertex(0.2, 0.05, 0)
'Set the properties for GOST weld symbol.
objGostWeld.TextScale = 10
objGostWeld.Leader = True
objGostWeld.BreakLine = True
objGostWeld.PermanentJoint = True
objGostWeld.PermanentJointType = SolidEdgeFrameworkSupport.DimGostWeldPermanentJointTypeConstants.igDimGostWeldPermJointStitch
objGostWeld.AboveBreakLineText = "Text Above"
objGostWeld.BelowBreakLineText = "Below"
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
OleMessageFilter.Revoke()
End Try
End Sub
End Module