Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
dustinbagley
261 Views, 1 Reply

Enumerator Container Modifications

I want to modify the following rule (which pulls the drawing curves from a document) so that the enumerator only contains kLineSegmentCurves instead of all curve types by either only adding kLineSegmentCurves or removing everything but after the fact. It currently contains a loop that successfully finds the curves by type. But I'm not sure how to remove them from the collection.

 

Dim oCurves As DrawingCurvesEnumerator
Dim oCurve As DrawingCurve 

oCurves = oView.DrawingCurves(oModel)
	For Each oCurve In oView.DrawingCurves(oModel)
		If oCurve.CurveType.ToString = "kLineSegmentCurve"
		Else
			'Remove oCurve from oCurves
		End If
	Next
curveMax = oCurves.Count
If curveIndex > curveMax Then
	curveIndex = curveMax
End If
oCurve = oView.DrawingCurves(oModel).Item(curveIndex)