Solid Edge Geometry Type Library
CreateSmartCollection Method
Specifies the object that is to be associatively linked to the topological elements included in the collection.
Member of the SmartCollectionTypeConstants constant set that specifies the type of topological elements to be included in the collection.
Specifies an optional second object to be used to associatively define the topological element set.
Description
Creates a collection of topological elements that are associatively linked to another object.
Syntax
Visual Basic
Public Function CreateSmartCollection( _
   ByVal SeedObject As Object, _
   ByVal CollectionType As SmartCollectionTypeConstants, _
   Optional ByVal AdditionalObject As Variant _
) As Object
Parameters
SeedObject
Specifies the object that is to be associatively linked to the topological elements included in the collection.
CollectionType
ValueDescription
seBendFacesOfBodySmart Collection Type - All The Bend Faces Of Body
seBendFacesOfBodyWithBendCenterLineAttributesSmart Collection Type - All The Bend Faces Of Body With Bend Center Line Attributes
seDraftableFacesOfALoopSmart Collection Type - Faces of a Loop for drafts
seDraftableFacesOfBodyNormalToFaceOrPlaneSmart Collection Type - Faces of a Body Normal to a Face or Plane
seDraftableSmoothFaceChainSmart Collection Type - Smooth Face Chain for drafts
seRoundableConcaveEdgesOfBodySmart Collection Type - Concave Edges of Body
seRoundableConvexEdgesOfBodySmart Collection Type - Convex Edges of Body
seRoundableEdgesAtVertexSmart Collection Type - Edges at Vertex
seRoundableEdgesOfFaceSmart Collection Type - Edges of Face
seRoundableEdgesOfFeatureSmart Collection Type - Edges of Feature
seRoundableEdgesOfLoopSmart Collection Type - Edges of Loop
seRoundableSmoothEdgeChainSmart Collection Type - Smooth Edge Chain
seThinwallableFacesOfFeatureSmart Collection Type - Faces of Feature for thinwalls
seThinwallableSmoothFaceChainSmart Collection Type - Smooth Face Chain for thinwalls
Member of the SmartCollectionTypeConstants constant set that specifies the type of topological elements to be included in the collection.
AdditionalObject
Specifies an optional second object to be used to associatively define the topological element set.
Remarks
This collection differs from the collection created by the CreateCollection method in that it creates an associative link between an object (a part or a face, for example) and the collection. That is, if a change in the geometry of the referenced object effects a change in the associated collection of topological elements, the collection is automatically updated.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objBody As SolidEdgeGeometry.Body
    Dim objEdgSmartCol As Object
    Dim bIsUserDefined As Boolean
    Const TESTFILE = "T:\vbtests\testcases\Cube.par"
    ' 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
    ' Closing active document if any
    Call objDoc.Close
    ' opening the testcase file
    Set objDoc = objApp.Documents.Open(TESTFILE)
    ' getting the body object of the model
    Set objBody = objDoc.Models(1).Body
    'create an userdefined EdgeSmartCollection object
    Set objEdgSmartCol = objBody.CreateSmartCollection(seedobject:= _
                                                       objBody.Faces(igQueryAll).Item(1), collectiontype:=seRoundableEdgesOfFace)
    'Capture the Boolean operator status
    bIsUserDefined = objEdgSmartCol.IsUserDefined
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objBody = Nothing
    Set objEdgSmartCol = Nothing
End Sub
See Also

Body Object  | Body Members

Send comments on this topic.