- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am recording a macro to export one node XY plot in txt form. That was very esay.
Now I am trying to edit the VB script so I can export XY plot for another node, and the code does not contain the Node number. In the macro I have exported node N12508 . The only data I have in the code is ID 1180.
How can I select a different node in the VB script ?
the purpose is to make a script that can export XY plot for 10 or 20 nodes. (So recording again a macro for the other node is not the solution i am looking for.)
Here is the code of the Macro for exporting one node XY plot.
'%RunPerInstance
'@ DESCRIPTION
'@ Macro recorded by Synergy on 05-Nov-2015 at 11:46:20
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()
Set Plot = PlotManager.CreatePlotByDsID(1180, True)
Set Viewer = Synergy.Viewer()
Viewer.ShowPlot Plot
Set PlotManager = Synergy.PlotManager()
Set Viewer = Synergy.Viewer()
Set Plot = Viewer.ActivePlot()
Plot.SaveXYPlotCurveData "C:\Users\rouhana\Desktop\Pressure data for one node\Node N12508 XY Pressure.txt"
Solved! Go to Solution.