Solid Edge FrameworkSupport 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 objCurves As solidedgeframeworksupport.Curves2d
    Dim objCurve As solidedgeframeworksupport.Curve2d
    Dim dblPoint(1 To 8) As Double
    Dim objCurveAttribSets As Object
    Dim objCurveAttribSet As Object
    Dim boolIsAttribPresent 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.DraftDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    'getting the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    'Curves collection
    Set objCurves = objSheet.Curves2d
    'Defining points.
    dblPoint(1) = 0.15
    dblPoint(2) = 0.15
    dblPoint(3) = 0.25
    dblPoint(4) = 0.15
    dblPoint(5) = 0.25
    dblPoint(6) = 0.25
    dblPoint(7) = 0.15
    dblPoint(8) = 0.25
    'Creating a curve on the defined points
    Set objCurve = objCurves.AddByPoints(Pointcount:=4, Points:=dblPoint, FitType:=igDirectFit, Closed:=True)
    'Get Attributesets
    Set objCurveAttribSets = objCurve.AttributeSets
    'add a new attribute set
    Set objCurveAttribSet = objCurveAttribSets.Add("New Attribute Set")
    'Get IsAttributePresent true or false
    boolIsAttribPresent = objCurve.IsAttributeSetPresent("New Attribute Set")
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objCurves = Nothing
    Set objCurve = Nothing
End Sub
See Also

Curve2d Object  | Curve2d Members

Send comments on this topic.