RemoveItems Method

IntelliCAD 11.1 Object Library
RemoveItems Method
See Also 
Entities
The entities to remove from the selection set.
SelectionSet Collection : RemoveItems Method

Description

Removes one or more entities from the selection set.

Syntax

Visual Basic
Public Sub RemoveItems( _
   ByVal Entities As Variant _
) 

Parameters

Entities
The entities to remove from the selection set.

Example

Private Sub RemoveItemsExample()

' This example creates a selection set, and a line and circle objects.

' It then adds the objects to the selection set and removes them.

     

     Dim ssetObj As IntelliCAD.SelectionSet

     Dim I As Integer

     Dim lineObj As IntelliCAD.Line

     Dim startPoint As IntelliCAD.Point

     Dim endPoint As IntelliCAD.Point

     Dim circObj As IntelliCAD.Circle

     Dim centerPt As IntelliCAD.Point

     Dim radius As Double

     Dim ssetName

     ssetName = InputBox("Type a name for the selection set:")

     Set ssetObj = ThisDocument.SelectionSets.Add(ssetName)

          

     ' Create a line object in model space

     Set startPoint = Library.CreatePoint(3, 1, 0)

     Set endPoint = Library.CreatePoint(5, 5, 0)

     Set lineObj = ThisDocument.ModelSpace.AddLine(startPoint, endPoint)

     

     ' Create a circle object in model space

     Set centerPt = Library.CreatePoint(3, 1, 0)

     radius = 5

     Set circObj = ThisDocument.ModelSpace.AddCircle(centerPt, radius)

     ' Collect the objects into an array of objects

     ' to be added to the selection set.

     ReDim ssobjs(0 To ThisDocument.ModelSpace.Count - 1) As IntelliCAD.Entity

For I = 0 To ThisDocument.ModelSpace.Count - 1

          Set ssobjs(I) = ThisDocument.ModelSpace.Item(I)

Next I

 

     ' Add the array of objects to the selection set

     ssetObj.AddItems ssobjs

     MsgBox "No. of items in sel. set = " & ssetObj.Count

     ssetObj.RemoveItems ssobjs

End Sub

See Also

© 2022 IntelliCAD Technology Consortium. All Rights Reserved.