Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4171

Problems in rhinoscriptsyntax recognizing GUIDs

$
0
0

Hello everyone,

I have been coding in python in grasshopper for about 7 or 8 months now, so I there is plenty I still do not understand. One of the biggest problems I have is getting rhinoscriptsyntax functions (always imported as rs) to do the things they are supposed to do.

For example: I create a brep or a surface component in grasshopper as an input for geometry. I give it list access and type hint GUID.
Then, after making sure the GUID is readable in the script (I always double check, and I save the ID as both a string type and keep the GUID type) I try to use the guid in some rs function, lets say for example rs.GetUserText (to get a value from a key saved in the objects attributes) or rs.SurfaceArea. I input the GUID as I am supposed to, but now in Rhino 7 it returns the error that " ‘NoneType’ object has no attribute ‘GetUserString’, or rs.SurfaceArea simply returns ‘None’ (which means error). I double check the object type to make sure it isnt NoneType… it is always either GUID or str, so I don’t know why rs is telling me it is NoneType.

Can somebody please shine some light on this situation? It has worked many times in the past for me, but all of a sudden doesnt work anymore.
Also, I do not want to program in C#, I would really like to use rhinoscriptsyntax (thats why it is there!)

Thanks for your help!
Brad

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 4171

Latest Images

Trending Articles



Latest Images