r/esapi • u/Major-Passenger-7610 • Aug 17 '26
Eclipse 18 Contouring - Errore "The script does not contain a public type with name 'VMS.IRS.Scripting'"
Ciao a tutti,
sto cercando di sviluppare uno script personalizzato per Eclipse 18 Contouring e sono bloccato su un problema che sembra legato al framework IRS/CA.
Ambiente
- Eclipse 18
- Visual Studio 2022
- .NET Framework 4.8
- Compilazione x64
- Avvio da Contouring → Tools → Scripts
Riferimenti:
- VMS.CA.Scripting.dll
- VMS.IRS.Scripting.dll
Le DLL si trovano in:
C:\Program Files (x86)\Varian\ProductLine\Workspaces\VMS.IRS.WorkspaceObiettivo
Vorrei realizzare uno strumento che generi automaticamente PTV a partire da GTV/CTV, ma per il momento sto cercando semplicemente di far partire uno script minimale.
Il codice di test è:
using System.Windows;
using VMS.CA.Scripting;
namespace VMS.TPS
{
public class Script
{
public void Execute(ScriptContext_ context)
{
MessageBox.Show("CONTOURING SCRIPT OK");
}
}
}La soluzione compila senza errori e genera correttamente la DLL.
Quando però provo a lanciarla da:
Contouring → Tools → Scriptsottengo sempre il messaggio:
The script does not contain a public type with name 'VMS.IRS.Scripting'Cose già provate
- Script ESAPI classico (
VMS.TPS.Script) - Namespace
VMS.IRS.Scripting - Namespace
VMS.CA.Scripting - App.config con:
<appSettings>
<add key="AssemblyPath"
value="C:\Program Files (x86)\Varian\ProductLine\Workspaces\VMS.IRS.Workspace\" />
</appSettings>Cartella script contenente solo:
- AutoPTV_Contouring_Test.dll
- AutoPTV_Contouring_Test.dll.config
- Verificato che
ScriptContext_esiste inVMS.CA.Scripting.dll
Domande
- Qualcuno ha sviluppato con successo uno script binario per Eclipse 18 Contouring?
- Quale firma/metodo/classe si aspetta realmente il loader IRS?
- È necessario ereditare da una classe base specifica (
ScriptBase,IScript, ecc.)? - È obbligatorio utilizzare il progetto generato dal Varian Script Wizard?
- Qualcuno ha già incontrato questo errore specifico?
Qualsiasi esempio di progetto funzionante, screenshot della struttura o indicazione sulla corretta configurazione IRS/CA sarebbe molto utile.
Grazie mille!
1
u/schmatt_schmitt Aug 17 '26
We had this same issue with the portal dosimetry scripting API when we first moved to V18. We were using a V18.1 virtual machine through VIC but our aria install was 18.2 and the versions of the pdsapi binaries weren't completely correct.
We asked our Varian software engineer if he could get is copies of the correct binaries from the production environment and recompiling with the new binaries fixed the issue.
1
u/David_el_fisico Aug 17 '26
The error occurs because the Contouring workspace (VMS.IRS.Workspace) reflection loader does not look for VMS.TPS.Script. Instead, it explicitly scans the compiled assembly for a public class named Script within the VMS.IRS.Scripting namespace.
namespace VMS.IRS.Scripting { public class Script { public Script() { }
}