如何抑制附图中的"命令:"提示行的出现
<p>'附图为以下程序的结果。附图中出现3个无意义的"命令:"提示行,</p><p>'很不好看,如何抑制它们的出现?</p><p>Public Sub test()<br/> Dim Obj As AcadObject<br/> Dim sset As AcadSelectionSet<br/> Dim ssetObj As AcadSelectionSet<br/> On Error Resume Next<br/> ThisDrawing.SelectionSets.Item("SsetObjects").Delete<br/> ThisDrawing.SelectionSets.Item("SSETASSOC").Delete<br/> On Error GoTo 0<br/> Set sset = ThisDrawing.SelectionSets.Add("SsetObjects")<br/> Set ssetObj = ThisDrawing.SelectionSets.Add("SSETASSOC")<br/> sset.SelectOnScreen<br/> For Each Obj In sset<br/> Call SelectObject(Obj, ssetObj)<br/> 'MsgBox "Number of objects = " & ssetObj.Count<br/> Next<br/>End Sub<br/>Private Sub SelectObject(Obj As Variant, ssetObj As Variant)<br/> Dim pt As Variant<br/> Dim sp(0 To 2) As Double<br/> Dim ep(0 To 2) As Double<br/> Dim mode As Integer<br/> ssetObj.Clear<br/> pt = Obj.StartPoint<br/> sp(0) = pt(0)<br/> sp(1) = pt(1)<br/> sp(2) = pt(2)<br/> pt = Obj.EndPoint<br/> ep(0) = pt(0)<br/> ep(1) = pt(1)<br/> ep(2) = pt(2)<br/> mode = acSelectionSetCrossing<br/> ssetObj.Select mode, sp, ep '附图的命令提示由此方法产生<br/> '其他处理<br/>End Sub</p> <p>没能上传图片。</p> 附图 <p>这个好像无所谓吧:)</p> <p>谢谢回帖。</p><p>虽然没有什么错误,但当选择的直线很多时,会产生大量的空行,看着很不舒服。</p><p>难道就没有解决的办法吗?</p> 在前面加上: ThisDrawing.SetVariable "NOMUTT", 1<br/>结束时把它恢复为0 <p>还是大师高.</p><p>谢谢啦.</p>
页:
[1]