乐筑天下

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

关于块的坐标的问题

[复制链接]

15

主题

53

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
113
发表于 2006-6-23 23:28:00 | 显示全部楼层 |阅读模式
在一张图上,有若干块,如何获得这些块中心点所在的坐标?不能用鼠标选取的方式,只能直接用程序得到某个块的坐标??
回复

使用道具 举报

13

主题

396

帖子

5

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
448
发表于 2006-6-24 08:22:00 | 显示全部楼层
用鼠标只能获得块插入点,属性点的坐标,要获得中心点的坐标只能用程序处理了,除非把插入点定为中心点就不用了
回复

使用道具 举报

7

主题

51

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
79
发表于 2006-6-24 08:37:00 | 显示全部楼层
GetBoundingBox
回复

使用道具 举报

15

主题

53

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
113
发表于 2006-6-24 17:37:00 | 显示全部楼层
那如何获得块大致在什么地方呢?大致坐标就可以了
回复

使用道具 举报

15

主题

53

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
113
发表于 2006-6-25 15:49:00 | 显示全部楼层
我想能不能在块中设置一个点,然后在外面通过程序获得这个点的坐标,那大致也是这个块的坐标了,可我怎么搞坐标都是0,0,大家帮我想想怎么处理这个问题。有没有其他什么好办法。
回复

使用道具 举报

7

主题

51

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
79
发表于 2006-6-26 01:14:00 | 显示全部楼层
&ltRE class=Code>Sub Example_GetBoundingBox()
    ' This example creates a line in model space. It then finds the
    ' bounding box for the line and displays the corners of the box.
   
    Dim startPoint(0 To 2) As Double
    Dim endPoint(0 To 2) As Double
    Dim lineObj As AcadLine
    ' Create the Line object in model space
    startPoint(0) = 2#: startPoint(1) = 2#: startPoint(2) = 0#
    endPoint(0) = 4#: endPoint(1) = 4#: endPoint(2) = 0#
    Set lineObj = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint)
    ZoomAll
   
    Dim minExt As Variant
    Dim maxExt As Variant
   
    ' Return the bounding box for the line and return the minimum
    ' and maximum extents of the box in the minExt and maxExt variables.
    lineObj.GetBoundingBox minExt, maxExt
   
    ' Print the min and max extents
    MsgBox "The extents of the bounding box for the line are:" & vbCrLf _
         & "Min Extent: " & minExt(0) & "," & minExt(1) & "," & minExt(2) _
         & vbCrLf & "Max Extent: " & maxExt(0) & "," & maxExt(1) & "," & maxExt(2), vbInformation, "GetBoundingBox Example"
         
End Sub
回复

使用道具 举报

15

主题

53

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
113
发表于 2006-6-26 21:22:00 | 显示全部楼层
我用insertpoint方法搞定了,谢谢了
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-6 00:00 , Processed in 0.700562 second(s), 76 queries .

© 2020-2025 乐筑天下

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