- <CommandMethod("qjxz")> _
- Public Sub 圈交范围内选择()
- Dim optEntity As New PromptEntityOptions("选择多段线:")
- With optEntity
- .AllowNone = True
- .AllowObjectOnLockedLayer = False
- .SetRejectMessage("所选对象不是多段线")
- .AddAllowedClass(GetType(Polyline), True)
- End With
- Dim resEntity As PromptEntityResult = ed.GetEntity(optEntity)
- If resEntity.Status <> PromptStatus.OK Then Return
- Dim ent As Polyline = GetEntity(resEntity.ObjectId)
- Dim Pts As New Point3dCollection
- ent.GetStretchPoints(Pts)
- If Pts.Count = 0 Then Return
- Dim resSelect As PromptSelectionResult = ed.SelectCrossingPolygon(Pts)
- ed.SetImpliedSelection(resSelect.Value.GetObjectIds)
- End Sub
|