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