jkbanana 发表于 2007-2-8 17:12:00

如何抑制附图中的"命令:"提示行的出现

<p>'附图为以下程序的结果。附图中出现3个无意义的"命令:"提示行,</p><p>'很不好看,如何抑制它们的出现?</p><p>Public Sub test()<br/>&nbsp;&nbsp; Dim Obj As AcadObject<br/>&nbsp;&nbsp; Dim sset As AcadSelectionSet<br/>&nbsp;&nbsp; Dim ssetObj As AcadSelectionSet<br/>&nbsp;&nbsp; On Error Resume Next<br/>&nbsp;&nbsp; ThisDrawing.SelectionSets.Item("SsetObjects").Delete<br/>&nbsp;&nbsp; ThisDrawing.SelectionSets.Item("SSETASSOC").Delete<br/>&nbsp;&nbsp; On Error GoTo 0<br/>&nbsp;&nbsp; Set sset = ThisDrawing.SelectionSets.Add("SsetObjects")<br/>&nbsp;&nbsp; Set ssetObj = ThisDrawing.SelectionSets.Add("SSETASSOC")<br/>&nbsp;&nbsp; sset.SelectOnScreen<br/>&nbsp;&nbsp; For Each Obj In sset<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call SelectObject(Obj, ssetObj)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'MsgBox "Number of objects = " &amp; ssetObj.Count<br/>&nbsp;&nbsp; Next<br/>End Sub<br/>Private Sub SelectObject(Obj As Variant, ssetObj As Variant)<br/>&nbsp;&nbsp; Dim pt As Variant<br/>&nbsp;&nbsp; Dim sp(0 To 2) As Double<br/>&nbsp;&nbsp; Dim ep(0 To 2) As Double<br/>&nbsp;&nbsp; Dim mode As Integer<br/>&nbsp;&nbsp; ssetObj.Clear<br/>&nbsp;&nbsp; pt = Obj.StartPoint<br/>&nbsp;&nbsp; sp(0) = pt(0)<br/>&nbsp;&nbsp; sp(1) = pt(1)<br/>&nbsp;&nbsp; sp(2) = pt(2)<br/>&nbsp;&nbsp; pt = Obj.EndPoint<br/>&nbsp;&nbsp; ep(0) = pt(0)<br/>&nbsp;&nbsp; ep(1) = pt(1)<br/>&nbsp;&nbsp; ep(2) = pt(2)<br/>&nbsp;&nbsp; mode = acSelectionSetCrossing<br/>&nbsp;&nbsp; ssetObj.Select mode, sp, ep&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;'附图的命令提示由此方法产生<br/>&nbsp;&nbsp; '其他处理<br/>End Sub</p>

jkbanana 发表于 2007-2-8 17:28:00

<p>没能上传图片。</p>

jkbanana 发表于 2007-2-9 10:05:00

附图

雪山飞狐_lzh 发表于 2007-2-9 10:11:00

<p>这个好像无所谓吧:)</p>

jkbanana 发表于 2007-2-9 18:30:00

<p>谢谢回帖。</p><p>虽然没有什么错误,但当选择的直线很多时,会产生大量的空行,看着很不舒服。</p><p>难道就没有解决的办法吗?</p>

mccad 发表于 2007-2-10 09:51:00

在前面加上:&nbsp;&nbsp; ThisDrawing.SetVariable "NOMUTT", 1<br/>结束时把它恢复为0

jkbanana 发表于 2007-2-12 17:45:00

<p>还是大师高.</p><p>谢谢啦.</p>
页: [1]
查看完整版本: 如何抑制附图中的"命令:"提示行的出现