|
83 Private Sub RunScript(ByVal N As Integer, ByVal P As Integer, ByVal Q As Integer, ByRef A As Object, ByRef B As Object, ByRef C As Object)
84 Dim Txt_s As New Rhino.Input.Custom.GetObject()
85 Txt_s.DisablePreSelect
86 Txt_s.AcceptNothing(True)
87 Txt_s.SetCommandPrompt("Select text")
88 Txt_s.SubObjectSelect = False
89 Txt_s.GroupSelect = True
90 Txt_s.GetMultiple(1, 0)
91
92 Dim Grd As New arraylist()
93 Dim T_s As New List(Of String)
94 Dim P_s As New arraylist()
95
96 Dim i,j As int32
97 For i = 0 To Txt_s.ObjectCount() - 1 Step N
98 Dim Row As New list(Of Double)
99 Dim P_r As New List(Of Point3d)
100
101 For j = i To i + N - 1
102 Dim Ant As AnnotationBase = DirectCast(Txt_s.Object(j).Geometry, AnnotationBase)
103 Dim Pt As New Point3d()
104 Pt = Ant.Plane.Origin
105 P_r.Add(Pt)
106 If Ant.IsValid Then
107 Dim Txt As String = Ant.Text
108 T_s.Add(Txt)
109 If IsNumeric(Txt) Then
110 Dim Dbl As Double = convert.ToDouble(txt)
120 Row.add(Dbl)
121 Print("Dot(" & i & ")(" & j & ")_Value=" & dbl)
122 Else
123 Row.add(0)
124 End If
125 End If
126 Next
127
128 Grd.add(Row)
129 P_s.Add(P_r)
130 Next
131
132 a = Grd
133 b = t_s
134 c = P_s(P)(Q)
用GH的 VB 模块儿编写的
出现的错误提示:未将对象引用设置到对象的实例(line104)
即上面的E:\gh编程练习\unsorted\1
104 Pt = Ant.Plane.Origin
在线等待高手解答!
file:///E:\360data\重要数据\我的文档\Tencent Files\736629329\Image\50`())$4A25190SW3OYWL)E.jpg
file:///E:\360data\重要数据\我的文档\Tencent Files\736629329\Image\50`())$4A25190SW3OYWL)E.jpg
file:///E:\360data\重要数据\我的文档\Tencent Files\736629329\Image\50`())$4A25190SW3OYWL)E.jpg |
|