<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: use a script to extract the cavity weight results and deflection,all effects:Deflection results in Moldflow Insight Forum</title>
    <link>https://forums.autodesk.com/t5/moldflow-insight-forum/use-a-script-to-extract-the-cavity-weight-results-and-deflection/m-p/13259122#M188</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15603421"&gt;@1292909313&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi,&lt;BR /&gt;a way of doing this is to loop through all studies in the project.&lt;BR /&gt;Basically a script that opens each study with results and read the label info.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Open the study.&lt;BR /&gt;Get the max and/or min value from result label.&lt;BR /&gt;Write info to a file.&lt;BR /&gt;Close the study.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attach a piece of code that shows max value from result plot "Cavity weight" and&lt;BR /&gt;for "Deflection, all effects:Deflection".&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;SetLocale("en-us")
Dim SynergyGetter, Synergy
On Error Resume Next
Set SynergyGetter = GetObject(CreateObject("WScript.Shell").ExpandEnvironmentStrings("%SAInstance%"))
On Error GoTo 0
If (Not IsEmpty(SynergyGetter)) Then
	Set Synergy = SynergyGetter.GetSASynergy
Else
	Set Synergy = CreateObject("synergy.Synergy")
End If
Synergy.SetUnits "Metric"
 
Set PlotManager = Synergy.PlotManager()

ResultName = "Cavity weight"  
Set Plot = PlotManager.FindPlotByName(ResultName)
Set Viewer = Synergy.Viewer() 
Plot.SetScaleOption 0
Viewer.HidePlot Plot   
Viewer.ShowPlot Plot   
maxV = Plot.GetMaxValue
minV = Plot.GetMinValue
MsgBox ResultName &amp;amp; " = " &amp;amp; FormatNumber(maxV,2,,,0),,"Information"

ResultName = "Deflection, all effects:Deflection"
Set Plot = PlotManager.FindPlotByName(ResultName)
Set Viewer = Synergy.Viewer()
Plot.SetScaleOption 0
Viewer.HidePlot Plot   
Viewer.ShowPlot Plot 
maxV = Plot.GetMaxValue
minV = Plot.GetMinValue
MsgBox ResultName &amp;amp; " Max= " &amp;amp; FormatNumber(maxV,2,,,0) &amp;amp; " Min= " &amp;amp; FormatNumber(minV,2,,,0),,"Information"

Viewer.HidePlot Plot &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps as a starting point to move forward.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Berndt&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jan 2025 05:51:52 GMT</pubDate>
    <dc:creator>bernor_mf</dc:creator>
    <dc:date>2025-01-14T05:51:52Z</dc:date>
    <item>
      <title>use a script to extract the cavity weight results and deflection,all effects:Deflection results</title>
      <link>https://forums.autodesk.com/t5/moldflow-insight-forum/use-a-script-to-extract-the-cavity-weight-results-and-deflection/m-p/13226919#M187</link>
      <description>&lt;P&gt;I want to use a script to extract the cavity weight results and deflection,all effects:Deflection results of 100 items into a csv file, what should I do?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 11:33:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/moldflow-insight-forum/use-a-script-to-extract-the-cavity-weight-results-and-deflection/m-p/13226919#M187</guid>
      <dc:creator>1292909313</dc:creator>
      <dc:date>2024-12-23T11:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: use a script to extract the cavity weight results and deflection,all effects:Deflection results</title>
      <link>https://forums.autodesk.com/t5/moldflow-insight-forum/use-a-script-to-extract-the-cavity-weight-results-and-deflection/m-p/13259122#M188</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15603421"&gt;@1292909313&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi,&lt;BR /&gt;a way of doing this is to loop through all studies in the project.&lt;BR /&gt;Basically a script that opens each study with results and read the label info.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Open the study.&lt;BR /&gt;Get the max and/or min value from result label.&lt;BR /&gt;Write info to a file.&lt;BR /&gt;Close the study.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attach a piece of code that shows max value from result plot "Cavity weight" and&lt;BR /&gt;for "Deflection, all effects:Deflection".&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;SetLocale("en-us")
Dim SynergyGetter, Synergy
On Error Resume Next
Set SynergyGetter = GetObject(CreateObject("WScript.Shell").ExpandEnvironmentStrings("%SAInstance%"))
On Error GoTo 0
If (Not IsEmpty(SynergyGetter)) Then
	Set Synergy = SynergyGetter.GetSASynergy
Else
	Set Synergy = CreateObject("synergy.Synergy")
End If
Synergy.SetUnits "Metric"
 
Set PlotManager = Synergy.PlotManager()

ResultName = "Cavity weight"  
Set Plot = PlotManager.FindPlotByName(ResultName)
Set Viewer = Synergy.Viewer() 
Plot.SetScaleOption 0
Viewer.HidePlot Plot   
Viewer.ShowPlot Plot   
maxV = Plot.GetMaxValue
minV = Plot.GetMinValue
MsgBox ResultName &amp;amp; " = " &amp;amp; FormatNumber(maxV,2,,,0),,"Information"

ResultName = "Deflection, all effects:Deflection"
Set Plot = PlotManager.FindPlotByName(ResultName)
Set Viewer = Synergy.Viewer()
Plot.SetScaleOption 0
Viewer.HidePlot Plot   
Viewer.ShowPlot Plot 
maxV = Plot.GetMaxValue
minV = Plot.GetMinValue
MsgBox ResultName &amp;amp; " Max= " &amp;amp; FormatNumber(maxV,2,,,0) &amp;amp; " Min= " &amp;amp; FormatNumber(minV,2,,,0),,"Information"

Viewer.HidePlot Plot &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps as a starting point to move forward.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Berndt&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 05:51:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/moldflow-insight-forum/use-a-script-to-extract-the-cavity-weight-results-and-deflection/m-p/13259122#M188</guid>
      <dc:creator>bernor_mf</dc:creator>
      <dc:date>2025-01-14T05:51:52Z</dc:date>
    </item>
  </channel>
</rss>

