algorithmic modeling for Rhino
Hi Everyone,
Seem to be getting a very odd error with attached Python Script as when I wrote it an ran it earlier today I get no errors and it works fine, but when I re-opened the file this afternoon it gives me these Errors
Error Line 6: Runtime error (MissingMemberException): 'CustomTable' object has no attribute 'GetObjectList'
Error Line 11:Runtime error (NotSupportedException): This call is not supported from within a Grasshopper component
I have internalised the Sample Geo to Bake into Rhino:Meters file to Cut down on Downloads
Any thoughts, much appreciated
Matt
Tags:
Hi Matt
CPlanes do not exist in Grasshopper. They are a Rhino-specific feature. Just like selection, views, picking. If you want to use methods related to these, you need to access the Rhino document, not the Grasshopper one.
I've fixed your script for this.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Btw, I believe you when you say that this script worked before. I am not sure why, as there is no history of what happened. One possibility is that something else (an earlier attempt?) was setting scriptcontext.doc to the Rhino document.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Thanks Giulio, that works great.
Yeah the original I had written was using scriptcontext.doc before I had rewritten it to work 'better' its RhinoScriptSyntax
Seems the main thing I was missing was this : sc.doc = Rhino.RhinoDoc.ActiveDoc
Feel I have seen it before in another code I had worked on linked to Camera's but not thought to use it here.
As for the section you commented out, that was the best way I could find to delete the previous clipping plane before creating the new one. I had looked at trying to Attributes, Key/Value but could not get it to work as simply as just naming it.
Thanks Again
Matt
>> As for the section...
I'm pretty sure it was already text when I downloaded it. Naming objects sounds like a great way. I would just maybe choose a more specific name, and if that name is not found, make sure that nothing happens to the script.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by