News: Need training? HyperSizer Training Videos are available now! Learn more here: https://hypersizer.com/trainingevents/e-learning/

Author Topic: Retrieve margin-of-safety  (Read 20642 times)

trelau

  • Client
  • **
  • Posts: 11
    •  
Retrieve margin-of-safety
« on: May 10, 2012, 10:01:30 AM »
I've been searching for where/how to retrieve a margin of safety. I would like to return the lowest margin of safety for the whole project as a filter for discarding cases. If this information is only available at the component level I can just loop through them all and find the minimum, I just don't know where to find it.

Thanks,
Trevor

Phil

  • Administrator
  • *****
  • Posts: 218
    • HyperSizer Structural Sizing Software
    •  
Re: Retrieve margin-of-safety
« Reply #1 on: May 14, 2012, 04:01:21 PM »
The Component object has a property called "ResultPanel" and one of the parameters of that property is "pcrMOS" which will return the lowest (or controlling) margin of safety for that component.  You would use it like this:

dblMOS = objComponent.ResultPanel(pcrMOS)

and you can also get the corresponding controlling load case with

lngLC = objComponent.ResultPanel(pcrLoadCase)

If the component is a beam, you would use "ResultBeam"

dblMOS = objComponent.ResultBeam(bcrMOS)

lngLC = objComponent.ResultBeam(bcrLoadCase)

etc.


phil11

  • Client
  • **
  • Posts: 1
    •  
Re: Retrieve margin-of-safety
« Reply #2 on: June 07, 2012, 09:39:24 AM »
Can you retrieve all the MOS?

Ryan

  • Administrator
  • *****
  • Posts: 145
    •  
Re: Retrieve margin-of-safety
« Reply #3 on: June 13, 2012, 07:03:11 AM »
Any MS that your see in the Failure tab can be retrieved in the object model. Component.ObjectAnalyses and Component.ConceptAnalyses each return a collection of AnalysisResults. AnalysisResult has individual margins of safety.

http://hypersizer.com/help/index.php#COM/Object/AnalysisResult.php