Solid Edge Framework Type Library
Caption Property
Description
Sets and returns the caption of the referenced object.
Property type
Read-write property
Syntax
Visual Basic
Public Property Caption As String
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objEnvironments As SolidEdgeFramework.Environments
    Dim objEnvironment As SolidEdgeFramework.Environment
    Dim strCaption As String
    ' 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.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    'Get the Environments collection
    Set objEnvironments = objApp.Environments
    'Get the Part environment i.e., 9th item in the Environments collection
    Set objEnvironment = objEnvironments(9)
    'Capture the Caption of the environment
    strCaption = objEnvironment.Caption
    'Set Caption for environment
    objEnvironment.Caption = "PartEnvironment"
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objEnvironment = Nothing
    Set objEnvironments = Nothing
End Sub
See Also

Environment Object  | Environment Members

Send comments on this topic.