代码如下: Dim BlkRef As AcadBlockReference Dim SelSet As AcadSelectionSet Set SelSet = AcadDoc.SelectionSets.Add("SelSet1") Dim aaa(0) As Integer 'Select 条件1:选择类型 Dim aaa1(0) As Variant 'select 条件2:选择图元 Dim maxPoint As Variant Dim minPoint As Variant aaa(0) = 0 '图元类型 aaa1(0) = "INSERT" '图块 SelSet.Select acSelectionSetAll, , , aaa, aaa1 '选择所有图块 For Each BlkRef In SelSet Debug.Print BlkRef.Name BlkRef.GetBoundingBox minPoint, maxPoint Next
这段程序用来得到所有块的BoundingBox的,但是,得到的minPoint和maxPoint 都是Empty。 怎么回事呢? 程序确确实实能够选择所有的块,而且名字也都是正常的,但是只要调用getboundingbox方法,要么为空,要么 就直接退出当前函数了, 请大侠们指教
|