Private Sub Form_Load()
Dim objApp As SolidEdgeFramework.Application
Dim objDoc As SolidEdgeDraft.DraftDocument
Dim objDimStyles As SolidEdgeFrameworkSupport.DimensionStyles
Dim objANSImmDimStyle As SolidEdgeFrameworkSupport.DimensionStyle
Dim objANSIDimStyle As SolidEdgeFrameworkSupport.DimensionStyle
Dim objISODimStyle As SolidEdgeFrameworkSupport.DimensionStyle
Dim objBSIDimStyle As SolidEdgeFrameworkSupport.DimensionStyle
Dim objDINDimStyle As SolidEdgeFrameworkSupport.DimensionStyle
Dim objJISDimStyle As SolidEdgeFrameworkSupport.DimensionStyle
Dim objUNIDimStyle As SolidEdgeFrameworkSupport.DimensionStyle
' Report errors
Const PI = 3.14159265358979
' Create/get the application with specific settings
On Error Resume Next
Set objApp = GetObject(, "SolidEdge.Application")
If Err Then
Err.Clear
Set objApp = CreateObject("SolidEdge.Application")
Set objDoc = objApp.Documents.Add("SolidEdge.DraftDocument")
objApp.Visible = True
Else
Set objDoc = objApp.ActiveDocument
End If
'Get the DimensionsStyles collection object
Set objDimStyles = objDoc.DimensionStyles
'Add a New DimStyle
Set objANSImmDimStyle = objDimStyles.Add(Name:="DimStyle1", Parent:="ANSImm")
' USER DISPLAY
' Release objects
Set objApp = Nothing
Set objDoc = Nothing
Set objDimStyles = Nothing
Set objANSImmDimStyle = Nothing
Set objANSIDimStyle = Nothing
Set objISODimStyle = Nothing
Set objBSIDimStyle = Nothing
Set objDINDimStyle = Nothing
Set objJISDimStyle = Nothing
Set objUNIDimStyle = Nothing
End Sub