Grasshopper

algorithmic modeling for Rhino

assign initial value in GH_OutputParamManager pManager.AddBooleanParameter()?

Hi :)

By Developing GH Plug-in, I want to know, How can I assign default value to OutParameter.

pManager of GH_OutputParamManager can not assign default output value.

Is there some way to assign output default value??

Views: 453

Replies to This Discussion

There is no way to assign a default value to an output, outputs are only assigned during SolveInstance().

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thank you for reply,

I have two more questiones about IGH_VariableParameterComponent

I triedto  use IGH_VariableParameterComponent and It works somehow but...

as you see in screenshot...

If I add the first new Item, It seems public void VariableParameterMaintenance(), doesn't called.

after new second Item, works VariableParameterMaintenance().

Which line should I modify?

The code is in attachment.

2. and can you show me the coding sample of

AddHandler Params.ParameterSourcesChanged, AddressOf ParamSourcesChanged

for C#?

Attachments:

for (int i = 2; i < Params.Input.Count - 1; i++ )

should be

for (int i = 2; i < Params.Input.Count; i++)

You were skipping the bottom most parameter every time by using smaller than count -1.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service