pan7302 发表于 2008-5-23 21:13:00

如何选择某一标高上的多义线?

<p>如如Private Sub JoinPoly()<br/>Dim SSet As AcadSelectionSet<br/>Dim UseElevation As Double<br/>Dim N As Integer<br/>Dim fType(0 To 1) As Integer<br/>Dim fData(0 To 1) As Variant<br/>Dim det As String<br/>fType(0) = 0: fData(0) = "LightWeightPolyline"<br/>fType(1) = 38</p><p>If Not IsNull(ThisDrawing.SelectionSets.Item("JoinPoly")) Then<br/>Set SSet = ThisDrawing.SelectionSets.Item("JoinPoly")<br/>&nbsp;SSet.Delete<br/>End If<br/>Set SSet = ThisDrawing.SelectionSets.Add("JoinPoly")<br/>For N = 0 To 7<br/>&nbsp;&nbsp;&nbsp; SSet.Clear<br/>&nbsp;&nbsp;&nbsp; fData(1) = H(N)<br/>&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; <strong>SSet.Select acSelectionSetAll, , , fType, fData</strong><br/>&nbsp;&nbsp;&nbsp; det = axSSet2lspEnts(SSet)<br/>&nbsp;&nbsp;&nbsp; SSet.Clear<br/>&nbsp;&nbsp;&nbsp; '使用SendCommand方法完成连接操作<br/>&nbsp;&nbsp;&nbsp; ThisDrawing.SendCommand "_PEDIT" &amp; vbCr &amp; "M" &amp; vbCr &amp; det &amp; vbCr &amp; vbCr &amp; "J" &amp; vbCr &amp; "0.001" &amp; vbCr &amp; vbCr</p><p>Next N</p><p>End Sub</p><p>我在图纸上画有不同高程上多义线,想选择特定高程上的线图。H(I)为模块级Private double</p><p></p><p></p><p>&nbsp;<strong>SSet.Select acSelectionSetAll, , , fType, fData提示出错,不知是什么原因?</strong></p><p><strong></strong></p><p><strong>请高手指点</strong></p><p>fType(1) = 38 的用法是否有错?</p><p><strong></strong></p>
页: [1]
查看完整版本: 如何选择某一标高上的多义线?