I'm writing a program to list specific survey related data of Lines, Arcs, and Polylines.
i use the GetEntity function of the Editor.
I want to filter the types of objects that the user is allowed to pick.
I have seen code in C# using the AddAllowedClass of the PromptEntityOptions object. However i cannot seem to get it to work.
Here is my code thus far.....
Public Sub ListSurveyData()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim prEntOpt As PromptEntityOptions = New PromptEntityOptions("Select an Arc or Line: ")
'''''''''''''''''''''''''''''''''''''''''''''''''''
''''Cant figure this part out. !!!!
prEntOpt.AddAllowedClass(Type.GetType(Line), True)
prEntOpt.AddAllowedClass(Type.GetType(Polyline), True)
prEntOpt.AddAllowedClass(Type.GetType(Arc), True)
'''''''''''''''''''''''''''''''''''''''''''''''''''
prEntOpt.AllowNone = False
Dim prEntRes As PromptEntityResult = ed.GetEntity(prEntOpt)
If prEntRes.Status PromptStatus.OK Then Exit Sub
End Sub