谁能帮我改改
<p>我不会用intersectwith这个函数</p><p>谁知道的给我改改下面的代码</p><p>Dim db As Database = HostApplicationServices.WorkingDatabase<br/> Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor<br/> '对话<br/> Dim values As TypedValue() = New TypedValue() {New TypedValue(DxfCode.Start, "POLYLINE")}<br/> Dim sfilter As New SelectionFilter(values)<br/> '选择多段线</p><p> Dim optsel As New PromptSelectionOptions<br/> optsel.MessageForAdding = " 请选择多段线"<br/> Dim relsel As PromptSelectionResult = ed.GetSelection(optsel, sfilter)<br/> Dim sest As SelectionSet = relsel.Value<br/> Dim line1ids As ObjectId() = sest.GetObjectIds</p><p> '选择图层多段线<br/> Dim ft As TypedValue() = New TypedValue() {New TypedValue(DxfCode.Start, "POLYLINE"), New TypedValue(DxfCode.LayerName, "DGX")}<br/> Dim sr As PromptSelectionResult = ed.SelectAll(New SelectionFilter(ft))</p><p> Dim ssest As SelectionSet = relsel.Value<br/> Dim line2ids As ObjectId() = ssest.GetObjectIds</p><p><br/> Using trans As Transaction = db.TransactionManager.StartTransaction()<br/> Dim pointlist As List(Of Point3dCollection)<br/> For Each _polyline As Polyline In sest<br/> For Each _polyline2 As Polyline In ssest<br/> If _polyline.IntersectWith(_polyline2) = True Then<br/> pointlist.Add(_polyline.IntersectWith(_polyline2))<br/> End If</p><p> Next<br/> Next<br/> End Using<br/></p> PolyLine有IntersectWith 方法吗?
页:
[1]