algorithmic modeling for Rhino
This is not possible. At present, you'd have to put these functions in a dll that you reference from both components. It would probably be a nice idea to be able to include source code files in scripts.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Ok, David.
And yes, it would be very nice!
:-)
Hello David,
Is there a way to reference a dll into the C# or VB Grasshopper scriptable component ?
In the menu of VB and C# components you'll find a Referenced Assemblies... item. It allows you to add a dll.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi Miguel,
it actually depends. It is not a Grasshopper feature, but there are cases in which it is possible to call functions from other components. The easiest is in Python. You can easily pass function references and callable items to other components and call them from there.
Here is what it would look like:
x() in the middle calls the x function, that returns the text you can see at the end of the definition.
Besides that, this type of operation is also possible in C# and Vb.Net, with a language construct that is called delegate. A delegate encapsulates a reference to a function. However, because delegates are type safe, they are a little more complicated to use. There is an example in the same file in C# and Vb.Net.
To see the Python components, you will need the last version from here.
I hope it helps,
- Giulio
_____________
giulio@mcneel.com
McNeel Europe
Hello,
I am trying to make a mathematical function and call it into another python component.
Here is the file, maybe it is possible somehow.
Best regards
Thank you Giulio, from now on my work will go smoother.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by