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

Public Class SlotCalloutSimple

    Private Sub btnGetSetDimStyleProps_Click(sender As System.Object, e As System.EventArgs) Handles btnGetSetDimStyleProps.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 strSimpleSlot 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.SlotCalloutSimple = "%HS X %SH %ZH"

            'Get the simple slot callout property
            strSimpleSlot = objTempStyle.SlotCalloutSimple

            If strSimpleSlot <> "%HS X %SH %ZH" Then
                MsgBox("Error in SlotCalloutSimple 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

Send comments on this topic.