Running multiple simualtions on a extern server using vb script

Running multiple simualtions on a extern server using vb script

martin_schedler1
Explorer Explorer
366 Views
0 Replies
Message 1 of 1

Running multiple simualtions on a extern server using vb script

martin_schedler1
Explorer
Explorer

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.

 

martin_schedler1_0-1686641644491.png

 
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) .
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,
 
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()

 

0 Likes
367 Views
0 Replies
Replies (0)