Using GHS in a RhinoScript with Python


#1

I have a fairly complex vehicle modeled in RhinoCAD where I want to assess the hydrostatic performance. I am using GHS to evaluate the hydrostatics, and RhinoCAD has a tool called Attach GHS Data that does an excellent job of creating a GHS geometry file. Now, I would like to automate this process by writing a Python script and running it through RhinoCAD. I will admit that I am new to Python, and I have not an expert in either RhinoCAD or GHS. I have been successful at running a GHS run file through the Python script within RhinoCAD. However, I do not know how to access and run the AttachGHSData command using Python. Does anyone have experience in writing such a script? I could use some help.


(Giulio Piacentino) #2

Hi William

sorry it seems I missed this thread. I am no expert in hydrostatic analysis, nor at running a GHS run file in Rhino (what is RhinoCAD?).

However, I see that AttachGHSData is a scriptable command. This means that is it possible to invoke it via -_AttachGHSData (with leading dash). This also means that it can be scripted with the rs.Command(macro_text) function.

Is this useful?
Thanks,

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com