请教,选择集如何清除?
<p>如题,很多资料上都写着SetImpliedSelection()来清除pickfirst集。现在我这边使用的autocad2006,发现没有这个函数。不知道怎么才能清除选择集,很急,希望大大们能帮忙。示例如下:</p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt;"><span lang="EN-US"><font face="Times New Roman">//</font>得到<font face="Times New Roman">pickfirst</font>集</p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">PromptSelectionResult selectionRes = ed.SelectImplied();</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">//</font>如果没有<font face="Times New Roman">pickfirst</font>集</p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">if (selectionRes.Status == PromptStatus.Error)</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">{</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">//</font>请求用户选择实体</p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">PromptSelectionOptions selectionOpts = new PromptSelectionOptions();</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">selectionOpts.MessageForAdding = "\nSelect objects to list: ";</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">selectionRes = ed.GetSelection(selectionOpts);</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">}</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">else//</font>如果有<font face="Times New Roman">pickfirst</font>集,清除它</p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">{</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">ed.SetImpliedSelection(new ObjectId);</font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt;"><font face="Times New Roman">}</font></p><p></p></span> acedSSFree()
页:
[1]