Grasshopper

algorithmic modeling for Rhino

Hi!

I was hoping someone could help me. I created a script in python for one panel. I now put this script in grasshopper and I am trying to run the script for multiple surfaces (surface subdivision). When I attempt to run it, I get the following error:

"Parameter must be a guid or string representing a guid". 

I think the reason I am getting this error is that python can not read the surface that I sent in, but I am not sure how to fix it. 

Any help would be awesome.

Thanks

Alex

Views: 1225

Attachments:

Replies to This Discussion

If you divide Surface, as you did, the previous GUID can no more represent your new subdivided surface.

but, your python need GUID. (only baked Object has GUID)

1. bake your subdivided surfaces

2. assign those surfaces to GUID.

3. feed this info to your python.

Thanks for the quick response!!

Is there a way to avoid having to bake the component? Possibly sending in the corner points of the surface instead of the surface and changing my script a bit. Or maybe performing the subdivision within the script. 

If your Method requires GUID, you must bake the objects first.

you can...

1. use another method, that does not need GUID.

(If there is some thing, which you can use)

2. you can use in script "Add" method. It works same like Do Bake of GH.

If you Add Objects to Rhino, this will return GUID to you. :)

You could also right click the relevant input parameter on the Python component and set the typehint to dynamic (return GUID if geometry). I forget the exact phrasing, but it's something along those lines. This should give you the GUID directly..

Thanks for all your help!!

Right clicking and a few adjustments in my script did the trick.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service