Message 1 of 1
Running multiple simualtions on a extern server using vb script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I am currently working on creating a .vbs script to copy studies, modify process parameters, and ultimately start the Analyze software. So far, I have successfully achieved these tasks, including launching Analyze on the local PC.
However, I am encountering a problem when attempting to start Analyze on an external server using the "AnalyzeNow3()" function.
My Code:
StudyDoc.AnalyzeNow3 False, True, False, "12.23.123.12"
isn´t working right and start the simulation local (instead of the extern Server: 12.23.123.12) .
StudyDoc.AnalyzeNow3 False, True, False, "12.23.123.12"
isn´t working right and start the simulation local (instead of the extern Server: 12.23.123.12) .
I am pretty confident that I am using the correct server. However, I am wondering if there are any other potential issues that could be causing the problem.
(If I try the analysis manually via the external server, it works)
I would appreciate any tips - Thank you.
Regards,
Regards,
Martin
The Code: (only the interesting part)
______________________________Start________________________________________
'Standardeinstellungen
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"
Dim StudyDoc
Dim i
For i = 1 To 30
Set Project = Synergy.Project()
' Studie wird geöffnet MC(i)
Project.OpenItemByName "MC" + CStr(i), "Study"
Set StudyDoc = Synergy.StudyDoc()
' Analyse der Studie ausführen
StudyDoc.AnalyzeNow3 False, True, False, "12.23.123.12"
Next
Project.SaveAll()