Dear friends,
Good morning! I would like to drop a complexStringElement. This is my code.
Sub element()
Dim oEnumeration As ElementEnumeratorDim scanCriteria As New ElementScanCriteriaDim counter As IntegerDim element As element
scanCriteria.ExcludeAllTypes'scanCriteria.IncludeType msdElementTypeLinescanCriteria.IncludeType msdElementTypeBsplineCurvescanCriteria.IncludeType msdElementTypeComplexString
Set oEnumeration = ActiveModelReference.Scan(scanCriteria)
Do While oEnumeration.MoveNext If oEnumeration.Current.IsComplexStringElement Then counter = counter + 1 oEnumeration.Current.IsHighlighted = True oEnumeration.Current.AsComplexStringElement.Drop Else oEnumeration.Current.IsHighlighted = False End IfLoopMsgBox "ELEMENT: " & counter
End Sub
what can I do?
Thanks!
rodrigo.teodoro said:oEnumeration.Current.AsComplexStringElement.Drop
From VBA help:
Drop does not alter the element that is dropped. Instead, it creates an ElementEnumerator that has elements that are equivalent to the original element. To replace the original element, first call Drop. Then call RemoveElement for the element being dropped. Finally, call AddElement for each element in the enumeration.
Dim oComponents As ElementEnumerator
Set oComponents = oEnumeration.Current.AsComplexStringElement.Drop
... iterate oComponents
Regards, Jon Summers LA Solutions
Thanks Jon! Now I understood how I can do it!