Solid Edge Part 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 SolidEdgePart.PartDocument
    Dim objProfile As SolidEdgePart.Profile
    Dim objLine As SolidEdgeFrameworkSupport.Line2d
    Dim objRefAxis As SolidEdgePart.RefAxis
    Dim objRefAxis1 As SolidEdgePart.RefAxis
    Dim objAttributeSets As Object
    Dim lngStatus As Long
    Dim bIsAttribPresent As Boolean
    ' 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
    On Error GoTo 0
    'Create a Profile object
    Set objProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(3))
    'Create a Line Object
    Set objLine = objProfile.Lines2d.AddBy2Points(x1:=0, y1:=-0.05, x2:=0, y2:=0.05)
    ' Check the validation criteria of the profile
    lngStatus = objProfile.End(ValidationCriteria:=igProfileSingle)
    If (lngStatus <> 0) Then
        MsgBox "Profile for the reference axis is not open"
    End If
    ' Create a reference axis using the line.
    Set objRefAxis = objProfile.SetAxisOfRevolution(lineforaxis:=objLine)
    'Create a RefAxis object
    Set objRefAxis1 = objDoc.RefAxes(1)
    'Set an Attibute Set "MyAttrib""
    Set objAttributeSets = objRefAxis.AttributeSets.Add("MyAttrib Set")
    'Check the Attribute Set presence "MyAttrib Set"
    bIsAttribPresent = objRefAxis.IsAttributeSetPresent("MyAttrib Set")
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objProfile = Nothing
    Set objLine = Nothing
    Set objRefAxis = Nothing
    Set objRefAxis1 = Nothing
    Set objAttributeSets = Nothing
End Sub
See Also

RefAxis Object  | RefAxis Members