Software Use > Scripting

Retrieve margin-of-safety

(1/1)

trelau:
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:
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:
Can you retrieve all the MOS?

Ryan:
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

Navigation

[0] Message Index

Go to full version