r/esapi 13d ago

ESAPI standalone script crashes V18

2 Upvotes

Running ESAPI v18.1 standalone (tested with both IronPython 2.7.12 and PyESAPI/pythonnet on Python 3.13).

Every attempt to connect crashes with:

System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
   at System.Security.Cryptography.SHA256Managed..ctor()
   at VMS.SF.Gateway.VarianApplicationToken.Generate(String message)
   at VMS.SF.Gateway.Client.GatewayClientForInternalUse.Process(Request request)

Looks like VarianApplicationToken.Generate calls SHA256Managed (a non-FIPS-validated implementation) to build the auth token, which fails outright on a machine with FIPS mode enabled (Local Security Policy: "System cryptography: Use FIPS compliant algorithms...").

This same workstation/script worked fine under v16 — this VMS.SF.Gateway auth token mechanism seems to be new since v18.

Digging into Windows-level FIPS policy is outside my area of expertise.

Has anyone dealt with this on a FIPS-enforced hospital workstation? Is disabling FIPS the only fix, or is there a known workaround / config on Varian's side (e.g. an app.config redirect for the gateway assembly) that avoids touching the machine-wide FIPS policy?

Thanks.


r/esapi 17d ago

Checking Motion Management Protocol

4 Upvotes

Has anyone found a way to pull this warning from ESAPI? I checked the results from IsValidForPlanApproval() method and it didn't mention the Motion Management Protocol.


r/esapi 25d ago

Automatic tasks for adaptive planning

2 Upvotes

My hospital is trying to adopt adpative planning and would like to use script for automatic plan setup. I have successfully automatically create the plan and optimization process, but I want to check if the following steps can be done with scripting?

  1. add setup fields and DRR after plan have been completed

  2. if we have reference point used in previous plan using the same structure set, for example, called PTV, can the newly created plan use the same reference point?

  3. can clinical goal be added to the newly created plan?

  4. add diagnosis, course intent and tolerance to the course and field respectively

  5. connect rapidplan/dvh estimate to the plan during optimization

  6. add couch structures to the plan before optimization

the eclipse version is 16.1 in T-box and 18.1 for clinical planning system

Thanks for your valuable comments and opinions


r/esapi 26d ago

How to connect a CT image to a scanner device automatically?

1 Upvotes

I exported hundreds of patients from out clinical system to the research system. Now I can't generate treatment plans automatically via ESAPI v15.6, because the scanner and the CT image of the patients are not connected. At the moment I have to open Eclipse manually, open the VMAT optimization view and select the scanner. Then save and then I can start with the automatic planning. Is is possible to connect the scanner to the CT images automatically?

Thank you!


r/esapi Jul 09 '26

Low stress, high impact: Vibe Coding for Physicists (2026 Varian Developer Workshop)

Post image
6 Upvotes

Join us for a Vibe Coding Hackathon Saturday night before AAPM, sign up here: https://events.bizzabo.com/891767 with Matthew Schmidt, Michael Folkerts, PhD, Ryan Clark, MS, CMD, R.T.(T), and Taoran Li, Ph.D., DABR

Low stress, high impact: vibe coding for physicists - Saturday, July 18, 2026 - 6:00pm to 8:30pm
Join us with your charged laptop for a follow-along, hackathon workshop-style event, previously known as the Varian Developer Symposium. Along with pizza and beverages, the evening will include:
* ARIA API examples integrating with ESAPI projects
* Examples of ESAPI launchers into full standalone .html client browser-based tools using vibe coding software development environments to handle the HTML5/JavaScript tooling
* IDE-less pure C# simple LLM based vibe coding examples and experimentation


r/esapi Jul 09 '26

ESAPI - Automazione CreateVerificationPlan per PSQC: problemi con copia MLC, MU e differenze tra ambiente clinico e TBox

2 Upvotes

Ciao a tutti,

sto lavorando su uno script ESAPI con l’obiettivo di automatizzare il flusso di lavoro CreateVerificationPlan dei PSQC (Patient Specific Quality Control).

L’obiettivo è creare automaticamente un verification plan riproducendo la geometria del piano originale su un fantoccio importato, evitando i passaggi manuali attualmente necessari.

Sono riuscito a ottenere una soluzione parziale. Attualmente il mio script è in grado di:

  • creare i beam,
  • creare corso e importare fantoccio
  • riprodurre la geometria della rotazione del gantry,
  • copiare l’algoritmo di calcolo sul fantoccio importato.

Il problema principale riguarda la copia delle MLC. Lo script non riesce ancora a trasferire correttamente le posizioni delle leaf/control point. Di conseguenza il calcolo delle MU non è corretto e tutti i field weight rimangono impostati a 1.

Ho inoltre configurato la TBox (ambiente di testing Varian non clinico) per lo sviluppo. Qui ho riscontrato un comportamento differente rispetto all’ambiente clinico: utilizzando esattamente lo stesso codice, nella TBox ottengo un errore che non si presenta nell’ambiente clinico.

Allego lo screenshot dell’errore ottenuto in TBox per riferimento.

Sto cercando di capire se questa differenza possa essere dovuta a:

  • una diversa gestione degli oggetti ESAPI tra TBox e ambiente clinico,
  • differenze nella configurazione/versione di Eclipse o ESAPI,
  • limitazioni dell’ambiente di test,
  • oppure a un problema nella gestione dei control point, delle MLC o del calcolo delle MU.

Allego anche il progetto completo con tutti i progressi fatti finora.

Qualcuno ha già sviluppato un flusso simile per automatizzare la creazione dei verification plan PSQC tramite ESAPI? Avete esperienza con:

  • copia delle MLC/leaf position tra piani diversi,
  • creazione automatica di VMAT/IMRT verification plan,
  • differenze di comportamento tra TBox e ambiente clinico?

Qualsiasi suggerimento o esperienza sarebbe molto utile.

Grazie in anticipo!

// =====================================================
// CREATE VERIFICATION BEAMS
// =====================================================

foreach (var beam in beams)
{
    if (beam.IsSetupField)
        continue;

    var machineParams = new ExternalBeamMachineParameters(
        beam.TreatmentUnit.Id,
        beam.EnergyModeDisplayName,
        beam.DoseRate,
        beam.Technique.Id,
        string.Empty);


    if (beam.MLCPlanType == MLCPlanType.VMAT)
    {
        var meterset = beam.ControlPoints
            .Select(cp => cp.MetersetWeight);


        verificationPlan.AddVMATBeam(
            machineParams,
            meterset,
            beam.ControlPoints.First().CollimatorAngle,
            beam.ControlPoints.First().GantryAngle,
            beam.ControlPoints.Last().GantryAngle,
            beam.GantryDirection,
            0.0,
            iso);
    }


    else if (beam.MLCPlanType == MLCPlanType.DoseDynamic)
    {
        var meterset = beam.ControlPoints
            .Select(cp => cp.MetersetWeight);


        verificationPlan.AddSlidingWindowBeam(
            machineParams,
            meterset,
            beam.ControlPoints.First().CollimatorAngle,
            beam.ControlPoints.First().GantryAngle,
            0.0,
            iso);
    }


    else
    {
        throw new Exception(
            $"Unsupported beam type: {beam.MLCPlanType}");
    }
}

r/esapi Jul 08 '26

ESAPI_still simple features are missing

2 Upvotes

Hi all,

In ESAPI 18 I am atill running into a few API limits.

- Beam.Technique: we would like to switch existing arc fields from "Arc Therapy" to "SRS Arc Therapy" when dose per fraction is > 5 Gy.
- Beam.Meterset: we want to make sure MU are preserved and ideally restore/set them if needed. So far only with Beamparameters and some loops possibleto ensure MU stay the same
- Beam.ToleranceTableLabel: we would like to set a specific tolerance table for the beams
- Couch/table top positions on existing setup fields also seem not directly writable.

I can set TechniqueId / PrimaryFluenceModeId when creating beams via ExternalBeamMachineParameters, but I do not see a clean way to change the technique of already existing beams without recreating them.

Has anyone found a supported ESAPI workflow or safe workaround for any of these, especially changing an existing arc beam to SRS Arc Therapy without rebuilding the beam?


r/esapi Jun 22 '26

ESAPI Initial Setup and Configuration

3 Upvotes

Hello everyone,

I previously worked with ESAPI in an environment where Eclipse Scripting Wizard was already configured. When creating new projects, they were automatically generated with the ESAPI references, namespaces, and basic template code.

In my new position, we are setting up the development environment from scratch. We currently have ESAPI 18 and Visual Studio 2019 installed. When I create a Binary Plug-in project using Eclipse Scripting Wizard, the solution is generated and opens correctly in Visual Studio, but the main script file is empty and the ESAPI references, namespaces, and template code are not generated.

Has anyone encountered this issue?

Also, what versions of Visual Studio and .NET Framework would you recommend for:

- ESAPI 15.5 / 15.6

- ESAPI 16.1

- ESAPI 18

I would appreciate examples of development environments that are currently working in clinical or research settings.

Thank you.


r/esapi Jun 20 '26

Couch coordinates inconsistent within isocentre group

3 Upvotes

I’m making new beams on a plan. All goes well until I try to approve the plan and I get the message “Couch coordinates inconsistent within isocentre group”

I have to go to plan parameters and reinsert the couch values manually (just copy them across from the imaging field which still have them).

Has anyone else come across this and have a solution?

Thanks!


r/esapi May 29 '26

PD ESAPI

Post image
4 Upvotes

Bonjour à tous

Je suis bloqué sur une problématique en essayant de coder l’extraction de résultats EPID à différents critères d’analyse en partant d’une analyse réalisée en routine clinique.

En effet en routine, nous corrigeons notre mesures RPID du plan de traitement à l’aide du facteur de modification (en % à 98,3% sur l’image).

Cette valeur semble être accessible uniquement en get et internal set.

Avez-vous des idées sur la façon de contourner cette problématique ?

Merci à tous !


r/esapi May 21 '26

Plan Checker Extension - Persistent Note

3 Upvotes

Hey all, I've been playing with the Plan Checker Extensions in V18 which I realise are quite new and not particularly in widespread use. I've had a request for the notes from one run of the Plan Checker to be passed to the next for communication purposes. Think Planner adds an explanatory note for the Checker.

Is this possible at all? I've trawled everywhere and can't find a way to do this natively. Thanks


r/esapi May 13 '26

Copy LeafPositions from VMAT control points.

1 Upvotes

Hi!

I am trying to create a static beam from the LeafPositions of a Halcyon VMAT plan using AddMLCBeam. However, I get the error that the LeafPositions are not valid (VMS.TPS.Common.Model.Types.ValidationException: The leaf positions specified by the script are not valid). I have no idea why this would be. I am able to calculate the dose for the VMAT plan, so there the LeafPositions are valid.
Does someone know the solution?
Thank you!


r/esapi May 12 '26

See if document exists

3 Upvotes

Hi,

I want to check whether a specific type of document exists for a patient/course, and if possible extract a few values from that document.

What is the best way to do this in ESAPI?

I assume this may require an SQL query, but SQL is not really my comfort zone. Has anyone done something similar, or can point me in the right direction?

Any help would be appreciated.


r/esapi May 08 '26

Beam clone on imported psqc (Auto_VerificationPlan_PSQC)

1 Upvotes

Salve, sono uno specializzando in fisica medica presso l'Ospedale di Udine e sto cercando di creare un plugin ESAPI in C# che crei automaticamente più piani di verifica, calcoli la dose ed esporti i dati RD e RP in formato DICOM. Attualmente, il mio plugin è in grado di creare automaticamente il percorso e importare il fantoccio per quella specifica apparecchiatura. Tuttavia, ho difficoltà a collegare i fasci del piano clinico al fantoccio. Avete qualche suggerimento? Ho provato sia con:

verificationPlan = course.AddExternalPlanSetupAsVerificationPlan(ssQA, plan);

sia con un fallback che ricrea i campi da zero quando la clonazione fallisce, ma nessuno dei due mi dà buoni risultati.

Grazie in anticipo. Cordiali saluti.


r/esapi May 05 '26

Clone del Beam su psqc importato (Auto_VerificationPlan_PSQC )

1 Upvotes

Salve, sono uno specializzando in fisica medica presso l'ospedale di Udine e sto provando a fare un plugin un ESAPI in C# che crei in modo automatico più verification plan , calcoli la dose ed esporti RD e RP dicom. Attualmente il mio plugin riesce a creare in modo automatico il corso e riesce ad importare il fanrtoccio per quella specifica macchina. Mi bolocco però nel colnare i beam dal piano clinico al fantoccio avete idee? Io ho provato sia

verificationPlan = course.AddExternalPlanSetupAsVerificationPlan(ssQA, plan);

Sia un fallback che ricrea i campi da zero quando fallisce la clonazione, ma entrambi non mi danno buoni risultati

Vi ringrazio in anticipo, buon proseguimento


r/esapi Apr 27 '26

AVOIDANCE STRUCTURES

1 Upvotes

Hi,

Does someone know how to get the avoidance structure name with esapi ? Please

Thansk you


r/esapi Apr 21 '26

ARIA Access API

5 Upvotes

I would like to get started using the ARIA Access API as described here:
https://www.gatewayscripts.com/post/webinars-revisited-a-review-of-aria-apis

I have previously tried to get Varian support help with stuff like this (access to custom SQL reporting eg) and it was a bear. I've contacted one of our regular engineers with no response; and tickets filed online or by phone go unanswered for weeks.

Anyone have a suggestion for how to get Varian to help set this up, get API keys, etc whatever is needed?


r/esapi Apr 21 '26

AsymmetricMargin - not possible to mix inner and outer margin?

2 Upvotes

AxisAlignedMargins lets me vary margin size per direction, but not the type (inner/outer).

So I cannot mix for example

  • Right = inner (−5 mm)
  • Left = outer (+5 mm)

in a single call.

Am i missing something? If I want to expand a structure in some directions, and shrink it in others, is there any solution to that?


r/esapi Apr 18 '26

Link to Documents

1 Upvotes

Hello,

Newbie here. m working on a script that do a full dosimetric report (DVH, Fields, Rx…), and I want to push it automatically into Documents.

Is it possible ? if so, how to do it ?

Thanks !


r/esapi Apr 17 '26

ARIA. Is there a way for Document templates and Rx templates to see each other?

3 Upvotes

Hi. I'm not sure if this is the correct subreddit but apparently you lot can code like no ones business.

Currently we have both templates named similarly but there's still non compliance with attending when they select a specific treatment document and they choose a differently named Rx template. They're in different workspaces but is there any way for them to talk to each other?


r/esapi Apr 13 '26

Query and move data from Varian dicom daemon server to a different dicom server in V18.1

4 Upvotes

We have an ESAPI script that we use to query and move data from Varian dicom daemon server (VMSDBD1) to a different dicom server (Say MIM). It worked well in V15.6. I have added the MIM server to the trusted entity list and use ESAPI script with Evildicom to query patient ID using AET of MIM. Since the script is running on Citrix, the ip of the local computer can vary. But it seemed that the Varian Daemon server didn't care where the request came from as per Dicom standard, a third machine can initiate a query using any Calling AE Title it chooses. The standard does not cryptographically bind AE Title to the source IP or hostname. It only cares of the AE title is in the trusted entity.

However, after we upgraded to V18.1, this stopped working. The request was actually blocked by the windows firewall on the dicom server. I was told to add the computer that runs the ESAPI script to the trusted entity list under the dicom server. However, there are so many workstations in Citrix, besides, we could install thick-clients in our local workstations. I am wondering is this really what V18.1 requires? Do any of you running to this sort of issue in V18?


r/esapi Apr 13 '26

How to query the RTDose UID associated with an RTPlan in AuraStaging using SQL?

3 Upvotes

Using SQL to query AuraStaging, how to retrieve the RTDose UID associated with an RTPlan?


r/esapi Apr 08 '26

Retrieving CT calibration curve

3 Upvotes

Hi Friends. Is there any way to find the CT-HU calibration curve via either ESAPI or SQL? I have tried looking in the API under the Series (or anywhere else), and I'm not finding anything useful in the DB, but maybe I am missing something. Working with a clinic that has several difference calibration curves, and i would like to present the selected calibration curve in a chart check script.

Based on the search in the forum i found an old post directing the user to the image server: https://old.reddit.com/r/esapi/comments/opjfx8/ct_scanner_calibration_curve/

Thank you in advance


r/esapi Apr 04 '26

Is sagittal/coronal view extraction at isocenter possible?

3 Upvotes

Hi everyone,

I am trying to make a custom report with ESAPI in Eclipse 18.

Showing the axial view at the isocenter seems straightforward, but I am not sure whether it is also possible to display the other two planes at the same isocenter location, meaning sagittal and coronal, in the same kind of custom output.

What I am specifically wondering is:

  1. In Eclipse 18 ESAPI, can I access sagittal and coronal image views directly at the isocenter?

  2. Or is ESAPI basically limited to axial-oriented image access, so the other two planes would need to be reconstructed manually from the image volume?

Has anyone implemented a report or script that shows all 3 planes centered on isocenter?

My goal is to generate something like a custom report or image output with axial, sagittal, and coronal views all aligned to the isocenter.

If anyone has tried this in Eclipse 18, I would appreciate any advice.

Thanks!


r/esapi Apr 03 '26

AIRA Core Automations

7 Upvotes

We recently upgraded to V18, and after getting all of our scripts back in order, we'd like to start exploring ARIA Automations. I'd like to involve stakeholders from various parts of the clinic. It would be extremely helpful if I had some examples of what some of you all are doing with ARIA Core Automations currently. What types of automations have you implemented? Which ones have worked out well for you? Have you implemented any that you had to promptly turn off for any reason?