根据范围选择对象
各位大侠:我知道思路就是不会写,请帮帮忙啊。思路:1,获取Polyline对象;2,获取Polyline线上的每个节点;3,根据获得的节点坐标设置选择集范围 小弟,真的急用。这里还有个问题就是给多段线赋高程值。 <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 ywlm 发表于 2011-8-17 11:57 static/image/common/back.gif
这里没有写获取节点坐标吧?我是新手,没看懂
页:
[1]