이 예에서는 메쉬 진단에서 얻은 면비 데이터를 사용해 사용자 지정 등고선 플롯을 만듭니다. 스크립트는 DiagnosisManager 클래스를 사용해 메쉬 진단 데이터에 액세스하고, PlotManager 클래스를 사용해 사용자 지정 플롯을 만듭니다.
'%RunPerInstance
'@
'@ DESCRIPTION
'@ Take the Standard Aspect Ratio Plot and convert it into a contour plot
'@
'@ SYNTAX
'@ CustomAspect
'@
'@ PARAMETERS
'@ none
'@
'@ DEPENDENCIES/LIMITATIONS
'@ Assumes a study file is open within synergy
'@ none
'@
'@ History
'@ Created DRA 9/8/2006
'@@
Option Explicit
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("amiws.Synergy")
End If
Synergy.SetUnits "METRIC"
Dim DiagnosisManager, PlotManager
Dim Elems, AR, ARPlot
' Get aspect ratio diagnostics
Set Elems = Synergy.CreateIntegerArray()
Set AR = Synergy.CreateDoubleArray()
Set DiagnosisManager = Synergy.DiagnosisManager()
DiagnosisManager.GetAspectRatioDiagnosis 0.0, 0.0, True, Elems, AR
Set DiagnosisManager = Nothing
' Create user plot
Set PlotManager = Synergy.PlotManager()
Set ARPlot = PlotManager.CreateUserPlot()
ARPlot.SetDataType "ELDT"
ARPlot.SetName "Aspect ratio by contours"
ARPlot.AddScalarData 0.0, Elems, AR
ARPlot.Build
MsgBox "Script Complete"
Wscript.Quit