Phyllomachine vb scripts

Hi, I have a set of example files from daniel gonzález abalde and his components dating back to 2016.
Unfortunately when running the vb scripts I keep getting a similar error … {0;0}
0. Error (BC30451): ‘vbCrLf’ is not declared. It may be inaccessible due to its protection level. (line 91)

This happens in both Rhino 7 and 8 (Mac)

Does anyone know how to fix this please ?

@Dani_Abalde

… hard to help without the code…
There should be some simple workarounds / this might be a mac-Problem.

You can try to replace the code by doing double click on it and paste this:

    '
    'PhylloMachine v1.0
    'Code of iFibonacci developed by Daniel González Abalde in Spring 2015, released under the GNU 3.0 license, as all files of PhylloMachine.
    'Your are free to modify, copy and derive, but must be subject to this license.
    'Your are free to use the designs made with PhylloMachine for commercial purposes. Consider the option to reward the author, or at least allow to see the product or project.
    'This plugin comes without warranty of any kind, but feel free to contact the author for any subject via email to dga_3@hotmail.com. You can also follow their work from facebook.com/DanielAbaldeDesigner
    'Enjoy! ツ
    '
    Component.Params.Input(0).Name = "Index"
    Component.Params.Input(0).Description = "Index of Fibonacci serie"
    Component.Params.Input(1).Name = "Previous/Next"
    Component.Params.Input(1).Description = "Leave empty to return a number, or for adding a second number set:" & vbCrLf & "True = Extracts the previous Fibonacci number" & vbCrLf & "False = Extracts the next Fibonacci number"
    Component.Params.Output(1).Name = "Numbers"
    Component.Params.Output(1).Description = "Resulting Fibonacci numbers"
    '
    Dim Fib As New list(Of Integer)
    Dim F0, F1, I2 As New Integer

    If P Then
      I2 = I - 1
    Else
      I2 = I + 1
    End If

    F0 = (1 / math.Sqrt(5)) * (((1 + math.Sqrt(5)) / 2) ^ I - ((1 - math.Sqrt(5)) / 2) ^ I)
    Fib.add(F0)

    If P IsNot Nothing Then
      F1 = (1 / math.Sqrt(5)) * (((1 + math.Sqrt(5)) / 2) ^ I2 - ((1 - math.Sqrt(5)) / 2) ^ I2)
      Fib.add(F1)
    End If

    N = Fib

And in case it miss some libraries you can import this:

Imports System.IO
Imports System.Linq
Imports System.Data
Imports System.Drawing
Imports System.Reflection
Imports System.Windows.Forms
Imports System.Xml
Imports System.Xml.Linq
Imports Microsoft.VisualBasic
Imports System.Runtime.InteropServices

Imports Rhino.DocObjects
Imports Rhino.Collections
Imports GH_IO
Imports GH_IO.Serialization

I don’t have a mac so I can’t test. But this component only returns two consecutive numbers of the Fibonacci succession from an index so it’s quite easy to replace it for example with a panel with 5 and 8 or 8 and 13.

Thanks Dani,
I will try replacing the code in this component today…
I am getting the same errors in most of the components that I downloaded from your phyllomachinev10 ghuser files on food4rhino…
Do you think that it is a problem with VB on a mac ? I only have experience with python scripting.

Yes, replacing everything with your recent code works…thankyou…I just created a new VB component and copied your script and imports from above.
I still have no idea what to change in your Phyllo components…I will try to make sure the imports from this one are there but if it needs anything else I don’t know where to start.

Solved it …Imports Microsoft.VisualBasic…just this line was missing…I guess because you wrote for Windows so it didn’t need to be told

Great components…thanks…I am always experimenting with flower structures in metal and this hopefully will add to my visualization…
where to bend next…www.metalgarden.ca

2 Likes

Hi , I also solved the problem just adding line:
Imports Microsoft.VisualBasic
(i have a windows pc)

1 Like