Grasshopper

algorithmic modeling for Rhino

Hi all,

<short>

I am trying to find a way to retrieve the content of a panel (knowing its name) from a C# component.

</short>

<longer>

I have a panel displaying a computation result as a tree of int (indexes) and I would like to develop a component dedicated to the Input/Ouput of those indexes using separate file.

As far as the save command is concerned, I would like to access to the result of my computation, which is displayed in a panel.

I've tried to find the panel by its nickname and then get the UserText but it seems that is not the actual content of the panel.

</longer>

Any advice or comment would be appreciated

Thanks in advance

Jerome

Views: 1231

Replies to This Discussion

Anything not fed in via an input will live in UserText - but as soon as you're plugging something into it, the panel behaves like any old Param, meaning you need to get access to its VolatileData property. Easy enough if all you want is the raw data - if you care about the tree structure you'll have to do a little extra leg work to convert from a GH_Structure to a DataTree. See the attached script for an example. 

Attachments:

Hi Andrew,

Thanks a lot for your reply. It helps a lot!

Thanks

Jerome

I exprience something strange now ..

Sometimes the VolatileData is empty whereas my panel still contains the same data.

Is it some condition to check before using VolatileData?

Thanks in advance

jerome

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service