vba炸开cad-mtext字体
<p>Sub xmtext()<br/>Dim tsel As AcadSelectionSet<br/>Dim entry As AcadEntity<br/>Dim tpic As Variant<br/>Dim layerstr As String<br/>On Error Resume Next<br/>Set tsel = ThisDrawing.SelectionSets("topirolss")<br/>If Err Then<br/>Err.Clear<br/>Set tsel = ThisDrawing.SelectionSets.Add("topirolss")<br/>tsel.Clear<br/>End If<br/>tsel.Clear<br/>'ThisDrawing.Utility.GetEntity entry, tpic<br/>Err.Clear</p><p>layerstr = entry.Layer<br/> Dim FilterType(0) As Integer<br/> Dim FilterData(0) As Variant<br/> FilterType(0) = 0<br/> FilterData(0) = "Mtext"<br/> tsel.Select acSelectionSetAll, , , FilterType, FilterData<br/> tsel.Highlight (True)<br/> If tsel.Count = 0 Then<br/> tsel.Delete<br/> Else<br/> ThisDrawing.Utility.InitializeUserInput 1, "Move Copy Erase"<br/> ThisDrawing.SendCommand "x" & vbCr & "p" & vbCr & vbCr<br/> End If<br/> tsel.delete<br/>End Sub</p> <p>另还想请教</p><p> 我用选择集得到如下的范围</p><p></p><p>而用天正电气的到得是如下</p><p> </p><p></p><p></p><p>我知道是由于当前选择集不是自己定义的那个选择集</p><p>请教高手怎样设置当前选择集为自己定义的那个呢????</p> <p>学习了,谢谢</p><p></p>
页:
[1]