Grasshopper

algorithmic modeling for Rhino

All,

Attached is a "final" version of a plug-in that was requested by Gustavo over the weekend.  It may have some additional bells and whistles added,
but right now its in good enough shape for you guys to make use of it.


What it does...
This plug-in allows for one to "connect" a Rhino document with Grasshopper documents (referred to throughout the plugin as pairing) so
that you can remember which Grasshopper documents are used or reference
data from the Rhino document


How to use it...
Right now, the plug-in is just one command "PairGHFiles" which has five(5) different options.


PairAllActiveGHDocs - This option pairs all of the documents that are currently active in the GH Editor to the current Rhino document

PairSelectedGHDocs - This option shows a dialog that allows you to pick from all the currently active documents in the GH Editor.  The selected
documents will be paired to the current Rhino document

OpensAllPairedGHDocs - Opens all the GH Documents that are currently paired with the Rhino Document

RemovePairedGHDocs - Shows a list of the currently paired GH Documents and allows you to select which ones to remove.

CurrentlyPairedGHDocs - Prints to the command line all of the GH Document paths that are currently paired to the Rhino Document.

The plug-in automatically saves all the necessary data, so you don't need to remember to save any additional files.  Do keep in mind that
only GH documents that have been saved and have a valid path will be
able to be paired to the Rhino Document.

Installation
Place the rhp file in a safe, static locataion, then drag and drop it on top of a running instance of Rhino.  Or run the PlugInManager command,
click the Install button towards the bottom of the window, and choose
the rhp file.

If anyone has any questions, feedback, suggestions, or issues, feel free to post here or email me.  Also, for people looking to do the "opposite"
of this (pairing a Rhino Document to a GH Document), check out Visose's
post below.

http://news2.mcneel.com/scripts/dnewsweb.exe?cmd=article&group=...

This plug-in is provided without any written or expressed guarantee. By downloading and installing the plug-in you release the author of any
liability in regards to anything this plug-in may or may not do.


Best Regards,
Damien

Develop | Research | Design
e| damien[AT]liquidtectonics.com
w| liquidtectonics.com

Views: 3302

Attachments:

Replies to This Discussion

this is a great idea, thank you Damien

Hi Damien,

 

nice work! Did you know you can access the thumbnail image of each document via the GH_Document.Thumbnail property*? You could then use a ListView control (Large Icon view) which has the images and the filenames to replace your current ListBox with filepaths.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

* please don't Dispose() this image or you'll screw me over royally

Not sure if it is related to your plugin, but I was running fine with it installed and today I couldn't get Grasshopper to start and was getting the attached dialogs.

 

I shutdown Rhino, changed the extension on the rhp to xrhp, started Rhino back up and Grasshopper started up as normal.

 

 

Attachments:

Well, I needed a quick and dirty way to load GH, since my plug-in would crash if GH wasn't loaded (that's failing gracefully for you).  Anyway, my quick work around was to run the following macro before I tried to access any of the GH resources, which basically loads GH, but doesn't show the Editor....

 

-_Grasshopper _Editor _Load _Enter

 

Those error messages don't look like anything related to my plug-in, but it looks as though the error messages are related to the Editor not being shown. That's my best guess at least, but I'm usually wrong.

Damien,

 

you can run a less 'severe' command as well. For example _GrasshopperBake. This will cause the plugin to load as well, but without all the secondary loading.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

it might be something different all together, I still have the plugin with a .xrhp extension and grasshopper still wouldn't load.  i took out a user component someone posted called DegreestoRadians and it is loading fine, so it might be that.   I don't know.  I'm going to find that thread and post into it.

Is that the only user component you have loaded or are there still others. I cannot imaging it is this single component that is doing the damage as it is very simple User code:

A = angle * (math.PI / 180)
Print("A=" & A)

yeah, i put DegreestoRadians back in and it's fine, so i don't know what is going on.  sorry.

ok, my apologies to both parties here, I think it was protozoa that might have been causing this. i put the plugin and the component back in and it's loading fine with protozoa taken out.

 

my bad for causing a stir.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service