yinzhiw 发表于 2005-12-2 11:48:00

求助一个关于SelectOnScreen 的问题

<P>如何用SelectOnScreen方法来只选择块(块参照)</P>
<P>就是sstext.SelectOnScreen FilterType, FilterData</P>
<P>中的条件FilterType,FilterData 应该如何写</P>
<P>谢谢!</P>

alin 发表于 2005-12-2 13:20:00

Sub Example_SelectOnScreen()<BR>&nbsp;&nbsp;&nbsp; ' This example adds objects to a selection set by prompting the user<BR>&nbsp;&nbsp;&nbsp; ' to select ones to add.<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; ' Create the selection set<BR>&nbsp;&nbsp;&nbsp; Dim ssetObj As AcadSelectionSet<BR>&nbsp;&nbsp;&nbsp; Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET")<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Dim gpCode(0) As Integer<BR>&nbsp;&nbsp;&nbsp; Dim dataValue(0) As Variant<BR>&nbsp;&nbsp;&nbsp; gpCode(0) = 0<BR>&nbsp;&nbsp;&nbsp; dataValue(0) = "Insert"<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Dim groupCode As Variant, dataCode As Variant<BR>&nbsp;&nbsp;&nbsp; groupCode = gpCode<BR>&nbsp;&nbsp;&nbsp; dataCode = dataValue<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; ' Add objects to a selection set by prompting user to select on the screen<BR>&nbsp;&nbsp;&nbsp; ssetObj.SelectOnScreen groupCode, dataCode<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub

yinzhiw 发表于 2005-12-2 14:45:00

<P>非常感谢版主alin的回答,我找了好久都了</P>
页: [1]
查看完整版本: 求助一个关于SelectOnScreen 的问题