Boat Design Forums  |  Boat Design Directory  |  Boat Design Gallery  |  Boat Design Book Store  |  Thanks to Our Site Sponsors
  #1  
Old 01-09-2017, 10:16 PM
haroldaguirre haroldaguirre is offline
 
Join Date: May 2016
Rep: 10 Posts: 2
Location: colombia
Hydrostatic in multisurf

Hello, i'm new using multisurf i want to design a boat and obtain the hydrostatic data, but i don't know how to do it, i design the boat using rule surface but isee that need the view offset to use the hydro component. Also i made the model in solidworks, multisurf have integration with this but this neither work to the offsets view. I don't know much about the offsets and this program so any kind of help will be appreciate. Sorry for my bad english and Thank you very much.
Reply With Quote
  #2  
Old 01-11-2017, 10:29 AM
tspeer tspeer is offline
Senior Member
 
Join Date: Feb 2002
Rep: 1673 Posts: 2,068
Location: Port Gamble, Washington, USA
There's a hydrostatics function in Multisurf that you can call from Excel. Here's some VBA code that will exercise Multisurf's hydrostatics function and bring the data into Excel so you can work with it further:
Quote:
Function hydro_sections(Name As String, do_setup As Integer, spec_grav As Single, Zcg As Single, sink As Single, trim As Single, heel As Single) As Variant
Static Set_array(1 To 5) As Single
Dim Settings As Variant
Static numsta As Integer
Dim SectData As Variant
Dim err As Integer
Dim warn As Integer
Dim results As Variant

Dim Appobj As Object
Dim Modelobj As Object
Dim RGObjs As Object
Dim ViewsObj As Object
Dim ContourName(1 To 3) As String
Dim SelectedContours As Variant

Rem Setup Multisurf model
Set Appobj = GetObject(, "Multisurf.Application")
Appobj.Interactive = False
Set Modelobj = Appobj.ActiveModel
Set RGObjs = Modelobj.RGObjects

Rem Select desired set of contours, and hide all others

Appobj.Command "Select *XCont"
SelectedObjects = Modelobj.SelectionSet.SelectedObjects

If do_setup = 1 Then
For Each RGObj In SelectedObjects
If RGObj.Name = Name Then
RGObj.Visibility = 1
Else
RGObj.Visibility = 0
End If
Next RGObj
End If

Rem Open Offsets View
Set ViewsObj = Modelobj.Views
ViewsObj.AddBottomForOffsets = True
ViewsObj.GapForOffsets = 0.05
ViewsObj.Open 2, err, warn

Rem compute hydrostatics
Set_array(1) = spec_grav
Set_array(2) = Zcg
Set_array(3) = sink
Set_array(4) = trim
Set_array(5) = heel
Settings = Set_array

Modelobj.Hydrostatics (Settings), numsta, SectData, results
hydro_sections = SectData

Rem return overall hydrostatic results in global variable
For j = 1 To 27
hyd_results(j) = results(j)
Next j

Rem Leave contours visible
If do_setup = True Then
For Each RGObj In SelectedObjects
RGObj.Visibility = 1
Next RGObj
End If


Appobj.Interactive = True
End Function

Function hydro2_results(SectData As Variant) As Variant
x = SectData(1, 1)
hydro2_results = hyd_results
End Function
__________________
Tom Speer
Reply With Quote
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multisurf BASIC's Rodrigo_G Software 9 07-22-2014
08:53 AM 
What about MultiSurf? aleutka29 Software 14 07-22-2014
08:03 AM 
...Two Multisurf questions... kalada Software 6 02-02-2009
09:39 AM 
Stations in Multisurf: help!! Akeswins Software 0 12-11-2005
11:34 AM 
MultiSurf questions... Guest Software 2 04-22-2003
02:49 PM 

Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.

All times are GMT -5. The time now is 12:35 AM.


Powered by: vBulletin Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Web Site Design and Content Copyright ©1999 - 2017 Boat Design Net