Solid Edge Framework Type Library
Description Property
Description
Returns a user-specified description of the referenced object.
Property type
Read-write property
Syntax
Visual Basic
Public Property Description As String
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objLayer As SolidEdgeFramework.Layer
    Dim objLayers As SolidEdgeFramework.Layers
    Dim strDesc 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.DraftDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    'getting the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    ' Create a new Layer
    Set objLayers = objSheet.Layers
    Set objLayer = objLayers.Add(Name:="Test1")
    ' Get the Description property
    strDesc = objLayer.Description
    ' Set the Description for Layer object
    objLayer.Description = "Layer1 Description"
    ' USER DISPLAY
    If strDesc <> Null Or objLayer.Description <> "Layer1 Description" Then
        MsgBox ("Error in the Description property")
    End If
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objLayer = Nothing
    Set objLayers = Nothing
End Sub
See Also

Layer Object  | Layer Members

Send comments on this topic.