Solid Edge FrameworkSupport Type Library
SlotCalloutCounterbore Property
Description
Sets and returns text for Counterbore slots.
Property type
Read-write property
Syntax
Visual Basic
Public Property SlotCalloutCounterbore As String
Example
Imports System.Runtime.InteropServices

Public Class SlotCalloutCounterbore

    Private Sub btnSlotCalloutCounterBore_Click(sender As System.Object, e As System.EventArgs) Handles btnSlotCalloutCounterBore.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objDraftDoc As SolidEdgeDraft.DraftDocument = Nothing
        Dim objDimStyles As SolidEdgeFrameworkSupport.DimensionStyles = Nothing
        Dim objTempStyle As SolidEdgeFrameworkSupport.DimensionStyle = Nothing
        Dim objType As Type = Nothing
        Dim strCounterboreSlot As String

        Try
            ' Create/get the application with specific settings
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")

            If objApplication Is Nothing Then
                ' Get the type from the Solid Edge ProgID
                objType = Type.GetTypeFromProgID("SolidEdge.Application")
                ' Start Solid Edge
                objApplication = Activator.CreateInstance(objType)
                ' Make Solid Edge visible
                objApplication.Visible = True
            End If

            objDraftDoc = objApplication.ActiveDocument
            'Get the DimensionsStyles collection object
            objDimStyles = objDraftDoc.DimensionStyles

            'Get reference to first DimStyle.
            objTempStyle = objDimStyles(0)

            'Set the simple slot callout property
            objTempStyle.SlotCalloutCounterbore = "%HS X %SH %ZH"

            'Get the simple slot callout property
            strCounterboreSlot = objTempStyle.SlotCalloutCounterbore

            If strCounterboreSlot <> "%HS X %SH %ZH" Then
                MsgBox("Error in SlotCalloutCounterbore property for dimension style.")
            End If

        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
See Also

DimensionStyle Object  | DimensionStyle Members