Jed
July 13, 2017, 9:59pm
1
Hello,
I am trying to use a list in vb. I get an error with this line:
Dim ids As New System.Collections.Generic.List(Of Guid)()
I really want to make a list of strings, but I found this example here:
I have gotten an error any time I try and use ‘As’ statements pretty much, what is the issue here?
(error is “Expected end of statement”)
dale
(Dale Fugier)
July 13, 2017, 10:04pm
2
Hi @Jed ,
To convert a Guid to a string, use Guid.ToString() .
– Dale
Jed
July 13, 2017, 10:08pm
3
That isn’t the problem. Basic examples that I find for vb online don’t work in rhinoscript for me. For example:
Dim ids As New System.Collections.Generic.List(Of String)()
or even Dim stringValue As String
dale
(Dale Fugier)
July 13, 2017, 10:10pm
4
Hi @Jed ,
RhinoScript, which is based on VBScript, and VB.NET are not the same thing. RhinoScript is for scripting. VB.NET is for writing plug-ins using RhinoCommon.
If you are interested in RhinoScript, start here:
If you are interested in writing plug-in with VB.NET (or C#), start here:
– Dale
Jed
July 13, 2017, 10:15pm
5
yikes…is there a recommended way to adding values to an array without knowing the size? Similar to List in c#?
dale
(Dale Fugier)
July 13, 2017, 10:17pm
6
Hi @Jed ,
VBScript arrays can be painful. Here are some utility functions you might find helpful.
– Dale
Jed
July 13, 2017, 10:17pm
7
Thank you Dale! Glad I am not going crazy haha