Grasshopper

algorithmic modeling for Rhino

Dear all,

 

The question is how to write a vb component which has one output only.

It returns the current GH ghx file name?

 

Thanks for any help.

Victor

 

Note: I tried getting the Rhino file path and file name by using 

A = RhinoDoc.ActiveDoc.Path()

 

A = RhinoDoc.ActiveDoc.Name

They both behave okay. But they wont automatically update when I load another Rhino file. I suspect I have to add a event handler or a input that update when I load a new file. Any help appreciated.

 

 

 

Views: 779

Replies to This Discussion

Hi Victor,

 

yes, you'll need event handlers to catch events in both the Rhino document and the Grasshopper document.

 

Since your example deals with Rhino 3dm files, I attached a file that registers these events. However I noticed we're not raising them at the best possible time, so some hackery is required. I'll talk to Steve, see if we can make this more reliable.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Sigh...

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Attachments:

Thanks for your quick reply, David,
I'm sorry to bother you again.

The even handler doesn't seem to work catching the RhinoEndOpenDocument
RhinoEndSaveDocument seems to be okay when I save to a new destination
But open a new file is what I need most.


I'm using Rhino 4 not 5.

 

Thanks again

Victor

Yeah I noticed that as well. I'll need to think some more about this.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Hi David,

"The even handler doesn't seem to work catching the RhinoEndOpenDocument
RhinoEndSaveDocument seems to be okay when I save to a new destination
 But open a new file is what I need most."

 

Any change to solve this (file_checker.ghx), i would need this also, to work with a huge amount of files. This would save a lot of time. Otherwise i have always to close and open the GH definition to get the Rhino filename/path if i open a new Rhino file.

 

Thanks in advance.

Georg 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service