algorithmic modeling for Rhino
Hi everybody!
I want to try to incorporate OpenCL in C# in grasshopper.
For a start, I think I'll probably need a "using OpenCL.Net;" command line in my C# program.
How can I achieve so?
It is possible?
links I'm trying to follow:
https://openclnet.codeplex.com/
https://www.nuget.org/packages/OpenCL.Net/
http://www.codeproject.com/Articles/502829/GPGPU-image-processing-b... (as a starting sample)
Tags:
You cannot yourself add using statements, you have to add references to assemblies via the menu of the C# component. All namespaces in the referenced assemblies will be imported.
Thanks for the reply!
Do you mean the "Manage Assemblies..." voice in the right-click menu?
So I have to add a .dll library?
I still need help here from my last question...
Like, also... add a "using Grasshopper.Kernel.Special" as you stated here:
http://www.grasshopper3d.com/forum/topics/scripting-sliders?id=2985...
How to do that?
If you need these types just a few times, simply write the full name, like Grasshopper.Kernel.Special.MyNeededType. Does it help?
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Yes, somehow....
But still, how to add all the types to the whole script?
Also, what about external usings? Must be .dll linked?
"using" in C# simply provides abbreviations for names of types in a namespace. It does not add references to types defined in other assemblies. Also, I do not think that there is a way in Grasshopper to add "using"s to Grasshopper namespaces. Simply refer to those types with their full name for now.
>>Also, what about external usings? Must be .dll linked?
Yes, of course, it needs to be linked. The CLR (Common Language Runtime) will not know enough to actually use the types just by implying them with the using statement. "using" also does not tell the runtime where to find the needed types, e.g., the .dll file location.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Thanks a lot!
Hi, did it work for you?
I did the same with:
System.IO.Compression.ZipFile.CreateFromDirectory,
but somehow constantly end up with an error:
Error (CS0518): Pre-defined type "System.Object" is not defined or imported.
Do you know what am I doing wrong?
Thanks in advance!
Ewa
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by