Grasshopper

algorithmic modeling for Rhino

Hi,

working in a node trough visual studio,

I would like to update some of the strings in the pManager parameter. in the output method.

example:

pManager.AddNumberParameter("Angle", this.ang, "Angle Between points, GH_ParamAccess.item);

so the output "nick name" will be updated according to the new angle.

Thanks in advance

Carlos

Views: 285

Replies to This Discussion

In the SDK > Examples > Simple Component > Parameter Registration:


Components have unique input and output parameters which are most often fixed. We are ignoring those rare cases where a component either has no inputs or no outputs, or where there is a variable number of parameters. There are two subroutines that allow you to define (or "register") these parameters. These routines are called from within the base class constructor and they are only called once.(...)

So I do not think this can be done. Perhaps with a custom parameter, but I doubt it.

thanks for clarify,

regards

c

You can change the nickname of an object whenever you want as it is not a solution related property (only exception here is script and expression components).

If you want to set the nickname of an output during SolveInstance, then just use:

this.Params.Output[1].NickName = "NewName";

If you do it outside of SolveInstance, then you may have to call the ExpireLayout method on the component attributes before the change becomes visible on screen.

Amazing!!!!

thanks a lot

c

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2022   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service