Solid Edge Draft Type Library
IsAttributeSetPresent Property
Description
Returns True if a specified Attribute Set exists on the referenced object.
Property type
Read-only property
Syntax
Visual Basic
Public Property IsAttributeSetPresent( _
   ByVal Name As String _
) As Boolean
Parameters
Name
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objModelLink As SolidEdgeDraft.ModelLink
    Dim objAttributeSets As Object
    ' Local variables to be declared here
    Const TESTFILE = "T:\vbtests\testcases\chead.par"
    Dim bAttribSetPresent As Boolean
    ' 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
    On Error GoTo 0
    'Get the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    'Add a model to the Document
    Set objModelLink = objDoc.ModelLinks.Add(Filename:=TESTFILE)
    'Get the AttributeSets of line2d
    Set objAttributeSets = objModelLink.AttributeSets
    'Create an AttributeSet
    Call objAttributeSets.Add("MyAttrib Set")
    'Get IsAttributeSetPresent property
    bAttribSetPresent = objModelLink.IsAttributeSetPresent("MyAttrib Set")
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objAttributeSets = Nothing
End Sub
See Also

ModelLink Object  | ModelLink Members