sendcommand与-boundary取得的边界
请问怎么把这样取得的边界放到一个集合中呢?这样取得的边界有的线不是整条的呀! 是不是就成了一条线了?能不能还是一条一条的呀? 说具体点,你想干什么? 已经很具体了
可以用Explode炸开,下面是炸开MText的例子,可以借鉴一下Private function MToS(MText As Variant) As Variant
'炸开MText并返回一个Text数组
Dim i As Integer
Dim ss As AcadSelectionSet
Dim pTexts() As AcadObject
ThisDrawing.ActiveSelectionSet.Clear
ThisDrawing.SendCommand "Explode" & vbCr & "(handent " & Chr(34) _
& MText.Handle & Chr(34) & ")" & vbCr & vbCr
set ss = ThisDrawing.ActiveSelectionSet
ReDim pTexts(ss.Count - 1) As AcadObject
For i = 0 To ss.Count - 1
Set pTexts(i) = ss(i)
Next i
MToS = pTexts
End Function
呵呵 谢谢提示 找到了
' Explode the polyline
MsgBox "Explode the polyline?", , "Explode Example"
Dim explodedObjects As Variant
explodedObjects = plineObj.Explode
' Loop through the exploded objects
Dim I As Integer
For I = 0 To UBound(explodedObjects)
explodedObjects(I).Update
MsgBox "Exploded Object " & I & ": " & explodedObjects(I).ObjectName, , "Explode Example"
explodedObjects(I).Color = acByLayer
explodedObjects(I).Update
Next
用GetBoundingBox 能得到整个图形的边界吗? 怎样的图,把图贴上来 来拉,什么方法都行啊
http://www.mjtd.com/bbs/UploadFile/2004-5/200453155149661.jpg
不知你指的边界是什么,GetBoundingBox只能得到外矩形边框的尺寸
页:
[1]