乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 26|回复: 1

谁能帮我改改

[复制链接]

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
7
发表于 2010-4-26 17:30:00 | 显示全部楼层 |阅读模式
我不会用intersectwith这个函数
谁知道的给我改改下面的代码
Dim db As Database = HostApplicationServices.WorkingDatabase
        Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
        '对话
        Dim values As TypedValue() = New TypedValue() {New TypedValue(DxfCode.Start, "POLYLINE")}
        Dim sfilter As New SelectionFilter(values)
        '选择多段线
        Dim optsel As New PromptSelectionOptions
        optsel.MessageForAdding = " 请选择多段线"
        Dim relsel As PromptSelectionResult = ed.GetSelection(optsel, sfilter)
        Dim sest As SelectionSet = relsel.Value
        Dim line1ids As ObjectId() = sest.GetObjectIds
        '选择图层多段线
        Dim ft As TypedValue() = New TypedValue() {New TypedValue(DxfCode.Start, "POLYLINE"), New TypedValue(DxfCode.LayerName, "DGX")}
        Dim sr As PromptSelectionResult = ed.SelectAll(New SelectionFilter(ft))
        Dim ssest As SelectionSet = relsel.Value
        Dim line2ids As ObjectId() = ssest.GetObjectIds
        Using trans As Transaction = db.TransactionManager.StartTransaction()
            Dim pointlist As List(Of Point3dCollection)
            For Each _polyline As Polyline In sest
                For Each _polyline2 As Polyline In ssest
                    If _polyline.IntersectWith(_polyline2) = True Then
                        pointlist.Add(_polyline.IntersectWith(_polyline2))
                    End If
                Next
            Next
        End Using
回复

使用道具 举报

0

主题

3

帖子

1

银币

初来乍到

Rank: 1

铜币
3
发表于 2010-4-29 16:28:00 | 显示全部楼层
PolyLine有IntersectWith 方法吗?
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-2-5 20:57 , Processed in 0.162227 second(s), 56 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表