Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am writing a program that allows the user to select the following objects: MTEXT, TEXT, and MLEADER, and iteratively go through them and edit the text. The problem arises when I try to put all three object types in the selection filter. Below is what I have currently:
Dim peo As New PromptSelectionOptions With {
.MessageForAdding = vbLf & "Select Text, Mtext, or MLeader to adjust text: ",
.MessageForRemoval = vbLf & "Select to Remove: "
}
Dim filterList As New List(Of TypedValue)
filterList.Add(New TypedValue(DxfCode.Operator, "<OR"))
filterList.Add(New TypedValue(DxfCode.Start, "MTEXT"))
filterList.Add(New TypedValue(DxfCode.Operator, "<OR"))
filterList.Add(New TypedValue(DxfCode.Start, "TEXT"))
filterList.Add(New TypedValue(DxfCode.Start, "MLEADER"))
Dim acSelFtr As SelectionFilter = New SelectionFilter(filterList.ToArray())
Dim selectedResult As PromptSelectionResult = acEd.GetSelection(peo, acSelFtr)
If selectedResult.Status <> PromptStatus.OK Then Exit Sub
When I run it in the current configuration is the program stops before it actually gets the selection, making me think that my filter is set up incorrectly. I could not find any examples online of a filter containing three objects or more.
Much help would be appreciated! Thanks!
Solved! Go to Solution.