Hello,
I don’t know if it’s a bug or if I don’t know how to use the component but the component can’t read the “Input” input:
jmv
Hello,
I don’t know if it’s a bug or if I don’t know how to use the component but the component can’t read the “Input” input:
According to the error text, it is necessary to set the override language on the parameter
You can also set it to automatic and then add the following line at the beginning of your code:
//#! csharp
#! python
Thank you @Mahdiyar !
You know all the tricks of this new component!!
Setting the language with either method effectively suppresses error messages. But unfortunately the component does not seem to be executed and it does not create any results:
I also experienced this last week - a C# component suddenly stopped working while I was coding in it. Just dead. The component didn’t respond even after closing and restarting Rhino.
There’s too much magic going on in the component during development, it lags and it become unstable. Less magic would be better I think.
//Rolf
@kitjmv Currently you can NOT use a ScriptInstance
implementation as an input code mostly due to the fact that ScriptInstance
can implement BeforeSolve
and AfterSolve
methods but the script itself is only accessible when the main component is trying to solve.
You should be able to use a normal C# script like this as input:
// #! csharp
using System;
a = Math.Abs((double)x) + Math.Abs((double)y);
There was a bug in processing // #! csharp
directive that I’m fixing for the next build. Thank you!
RH-78488 Script fails to determine language from lang id specifier line
Hello @eirannejad,
It works correctly.
Unfortunately, editing the code in a dedicated editor like VSCode returns errors because the input and output parameters (x
, y
, à`) are not declared.
jmv
Ya it’s gonna be a while until I get to incorporate all of this in the vscode plugin I’ll think of something to make these input and output parameters availabe in the main ScriptEditor so you can edit from there
Hello @eirannejad
Is this feature still relevant?
It seems to me that it is no longer possible to link source code to components?
I haven’t gotten a chance to work on the vscode plugin but it is still on my list
No, we are not on the VSCode thread.
I was talking about the script entry in a Grasshopper component.
It seems that it has disappeared in the commercial version of Rhino 8.
Hello,
Shift + Right mouse button click.
Nah it’s all there. We decided to keep the context menu simple but as @11159 mentioned you can get that with Shift+Click. Here is a bunch more stuff there that are described in this guide
Hi @eirannejad
Really, the new script editor looks great.
I just spent a week configuring the toolbars in Rhino 8 and I have the impression that the new editor is going to be a big part to learn.
I can’t wait to use it! Congratulations on the work!!!
Thank you