Orca3D Talk!
May 18, 2013, 04:04:05 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Automating Hull Assistants to Create and Analyze a Parametric Series of Hulls  (Read 3609 times)
Admin
Administrator
Hero Member
*****
Posts: 108


View Profile
« on: June 04, 2010, 08:34:23 AM »

Many of Orca3D’s commands can be scripted, and therefore automated either through RhinoScript or by external programs such as Excel®. We’ve developed an example of automating a Hull Assistant using Visual Basic in Excel. A table of Ship Hull Assistant input parameters for a range of hulls is created by the user in Excel; the Visual Basic macro starts Rhino, then reads the data for each hull, creates the hull using the Hull Assistant, and computes a righting arm curve. Finally, the righting arm curves for all the hulls are plotted together for comparison.

You may download the macro here: http://www.orca3d.com/download/Orca3D_Ship_Hull_Macro.xls .

The macro will start Rhino, and it assumes that your units are meters and kilograms. Note that if Rhino doesn't start fast enough, the macro will report an error. If this happens, usually just running the macro again will solve the problem.

If you make changes and improvements to the macro, why not describe them and post your version on the Orca3D Forum so others can learn from your experience?
Logged
Grant
Full Member
***
Posts: 43


View Profile
« Reply #1 on: November 10, 2010, 10:46:36 AM »

This looks pretty cool. With my Excel 2010 on Windows 7 I get the message ' unable to create Rhino object'  or something like that, but then I gave Excel Adminstrative Rights and it worked! 

I would like to look at the code and or scripts, but can not figure out how... can you help me?  (I know programming in general, but not Office, nor Scripting in Rhino)

Grant
Logged
lleibman
Sr. Member
****
Posts: 78


View Profile
« Reply #2 on: November 10, 2010, 12:32:13 PM »

Grant,

To open the macro in Excel 2010, you first need to have the "Developer" tab visible on the ribbon bar. If you do not, go to File > Options and in the Excel Options form select "Customize Ribbon" and make sure the "Developer" tab checkbox is checked. Then in Excel go to the Developer tab and select "Visual Basic" in the code pane. This should open the Visual Basic editor with the script in it.

Let me know if you have any trouble.

Larry
Logged
Grant
Full Member
***
Posts: 43


View Profile
« Reply #3 on: November 11, 2010, 04:11:40 AM »

Excellent!
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!