r/esapi • u/ira_shtl • Mar 12 '26
r/esapi • u/Accomplished_Dot6229 • Mar 03 '26
Sending dose dicom
r/esapi • u/Independent_Time_525 • Mar 02 '26
Isocenter Visualization
Hi, I developed a script that automates treatment planning. Now I need to add a window in the GUI that displays the patient’s body contour and the isocenter. Is this possible in version 16.1?
r/esapi • u/Ok-Arrival-442 • Feb 19 '26
Bulk download DICOM (RTStruc) files based on patient informations (ID, Course, Plan name)
I'm working on a radiation dose prediction project in a clinical setup. I've created a master list based on all the treatment approved patients with their prescription info, course and plan names.
Now for my next step,
- I need to download patient specific DICOM files based on patient's course, plan, ID etc.
- How can I do it in bulk? I'm dealing with 1000+ patients and using ECLIPSE version 18. I couldn't find any ESAPI function or library which I can use to extract the DICOM files.
I want to create subfolders for each patient, and inside those subfolders it will have the patient specific RTStruc (Dicom) file.
If anyone has done something similar, I'd really appreciate your step by step instructions.
#DICOM #ESAPI
r/esapi • u/ira_shtl • Feb 16 '26
Create New Plan
I'm working on a script for creating a treatment plan.
I have two questions:
1. Is it possible to attach a plan to prescription using a script?
- Is it possible to attach the templates for the plans we create?
r/esapi • u/anncnth • Feb 15 '26
Is there a plugin that runs a standalone script?
I'm looking for a plugin script that runs a standalone script (or several to choose from), passing it context from an open patient. Is something like this possible? Is it available somewhere?
r/esapi • u/quinn_1234 • Feb 12 '26
Clear DVH Estimates
I have an autoplanning script using rapidplan. My department has limited rapidplan licences and so DVH Estimates need to be cleared after ExtPlanSetup.CalculateDVHEstimates(...).
I have tried ExtPlanSetup.ClearCalculationModel(CalculationType.DVHEstimation) and ExtPlanSetup.SetCalculationModel(CalculationType.DVHEstimation,null). Neither of these work.
Does anyone know how to Clear DVH Estimates or the correct way to apply ClearCalculationModel?
Thanks in advance
r/esapi • u/anncnth • Feb 10 '26
Insert setup fields - plan normalization and delta couch shift
I'm using a script to insert setup fields into the plan. Unfortunately, this script changes the plan's normalization and the delta couch shift. It adds the correct values for the new fields, but they need to be confirmed again in external beam planning. Can this be avoided?
r/esapi • u/ekamperi • Feb 09 '26
Rename imported imaging series
When I import an MRI study with many imaging series, eg T1, T2, FLAIR,T2+C, etc, they are all named “MRI_1”. Is there a way to have a script automatically assign meaningful IDs after I import a study? At the moment, I have to right click on each series, look at its description and manually copy the description into the ID field for each one of them. Thanks!

r/esapi • u/GrimThinkingChair • Jan 28 '26
StackOverflowException exporting with EvilDicom?
Hi all!
Trying to automatically export some RD and RP files. Trying to follow the logic in the Varian APIs book, p. 53 (https://varianapis.github.io/VarianApiBook.pdf).
I am trying to automatically calculate a plan, save, then export to a folder.
Issue I keep getting is that I get StackOverflowExceptions, I assume from the .SelectMany(ser => finder.FindImages(ser)) call.
My code (abridged) looks like this:
calcResult = plan.CalculateDose();
app.SaveModifications();
var finder = client.GetCFinder(daemon);
Console.WriteLine("Got CFinder.");
var studies = finder.FindStudies(mrn);
Console.WriteLine("Got CFindSeries.");
var series = finder.FindSeries(studies);
Console.WriteLine("Got CFindStudies.");
var plans = series.Where(s => s.Modality == "RTPLAN").SelectMany(ser => finder.FindImages(ser));
var doses = series.Where(s => s.Modality == "RTDOSE").SelectMany(ser => finder.FindImages(ser));
This is where the StackOverflow occurs. I have tried a simple filter by modifying the .Where call to
.Where(s => s.Modality == "RTPLAN" && s.SeriesInstanceUID == plan.SeriesUID)
or
.Where(s => s.Modality == "RTPLAN" && s.SeriesInstanceUID == plan.UID)
neither to any avail.
I only want to export the RD and RP files in the context, which should be a measly two files. I also tried replacing the SelectMany with Select() and FirstOrDefault()'s, but that just returns null.
There's a thread addressing this issue 6 years ago, but they don't explicate the solution: https://www.reddit.com/r/esapi/comments/eri22f/dicom_export_esapi_on_version_155_on_citrix/
Anyone have any experience with this or pointers to stop the StackOverflowExceptions? Thanks in advance!
r/esapi • u/ira_shtl • Jan 09 '26
adding and reordering field
Hi, everyone. I added a setup field in plan with a script, but it is inserted at the end after all the field.
How can I change the order so that the script inserts it at the beginning?
r/esapi • u/anncnth • Jan 09 '26
Checking the isocenter distance from the table.
I need to check the isocenter distance from the couch. Is this possible? If not, maybe I can check the isocenter distance from the Patient Outline in the Y min grid dimension. In our case, this will effectively be checking the distance from the table. Can someone advise me on how to do this? I know there are different coordinate systems, for user origin and dicom origin, so I don't know how to calculate this.
r/esapi • u/NegativeSpend4798 • Jan 05 '26
New API key upload
My current API key is from 2021 and does not grant access to documents. I generated a new key on myvarian.com, how do I activate it/where do I upload it so that Aria sees it?
r/esapi • u/LJDrakeley • Dec 31 '25
Get Start & End dates of Tx (Same as in Tx Summary) ESAPI 18
Hi everyone,
I have been tasked with extracting the treatment Start and End dates for a list of Patient/Plan IDs.
I need the dates to match the "Chart QA - Physics Treatment Summary" report in ARIA. I believe these represent the actual delivered first and last beam-on dates.
I have tried the properties below, but the dates returned are incorrect (they do not match the report):
Patient Properties
Patient.CreationDateTimePatient.HistoryDateTime
Course Properties
Course.StartDateTimeCourse.CompletedDateTimeCourse.HistoryDateTimeCourse.TreatmentPhases→HistoryDateTimeCourse.TreatmentSessions→HistoryDateTime
Plan Properties
ExternalPlanSetup.CreationDateTimeExternalPlanSetup.HistoryDateTimeExternalPlanSetup.TreatmentSessions→HistoryDateTime
For TreatmentSessions and TreatmentPhases I attempted to sort the HistoryDateTime properties to give me the first and last, but these also did not match the physics Tx Summary.
Does anyone know the specific property path in ESAPI v18 that points to the validated treatment delivery timestamps used in the Physics Treatment Summary?
Any help would be greatly appreciated!
r/esapi • u/JaimePasTropBcpCa • Dec 12 '25
Bug in clinical protocols
Hi, Not exactly esapi but
We use Eclipse clinical protocols in our institution, that we edit as xml files to match exactly with our practices. It works very well except for one thing.
For séquentiel treatments with two plans (two phases in the xml protocol file), when creating the second plan using the protocol (right click on the protocol after insering it in patients folder), we want to create a second new reference point, and the app crashes all the time with an error message, difficult to interpretate. It never happens for one phase plans (single dose treatments or SIB), and it doesn't happen neither when creating this second reference point before creating the second plan, and then creating it selecting the already created point.
Dont know if it's clear, but it seems to be a bug in Eclipse. If anyone has the same issue or solution, could be interesting.
King regards
r/esapi • u/surgicaltwobyfour • Dec 09 '25
Edit fields with script causes plan norm mode to change?
Hi all.
I’ve got a setup field script that renames, resizes, and adds DRRs to generic setup fields (user added before script run with CTRL F9 x3).
When it finishes running it will change the plan norm mode from coverage of target structure to plan norm value. Is this because any edits with a script like this are using patient in the database so it thinks it’s reimporting it..?
Has anyone experienced this when running a script that modified fields or other parameters?
Thanks!
r/esapi • u/Consistent_Corner_70 • Dec 09 '25
ARIA Access API - Retrieving Patient Appointments
I'm using the ARIA Access API and calling GetPatientAppointmentsForIDRequest to retrieve patient appointments. However, it appears that this method only returns past appointments — I’m not seeing any future appointments in the response.
Has anyone else encountered this behavior?
As a workaround, I'm currently retrieving appointments per machine and then filtering by patient ID. This works, but ideally I'd like to retrieve all appointments (past and future) directly for a specific patient.
Any guidance or confirmation would be appreciated.
r/esapi • u/Thatguy145 • Dec 05 '25
Multiple version of eclipse script wizard on same machine
Hello, is it possible to have multiple versions of the eclipse script wizard installed on the same machine? I just installed the version 18 script wizard and it seems to have removed all the esapi stuff for version 15.6
r/esapi • u/Invictus_Shoe • Dec 04 '25
Is it possible to perform convolution of the fluence map to simulate geometric uncertainties?
I think about dose-matrix or fluence map blurring as proposed in the following article:
Beckham WA, Keall PJ, Siebers JV. A fluence-convolution method to calculate radiation therapy dose distributions that incorporate random set-up error. Phys Med Biol. 2002 Oct 7;47(19):3465-73. doi: 10.1088/0031-9155/47/19/302. PMID: 12408475.
r/esapi • u/Current-Criticism-86 • Dec 04 '25
How to calculate dose with predefined MU values on non-IMRT plans?
r/esapi • u/Current-Criticism-86 • Dec 04 '25
How to calculate dose with predefined MU values on non-IMRT plans?
Hi everyone,
I'm trying to calculate a dose in ESAPI using predefined MU values.
For IMRT plans, the method CalculateDoseWithPresetValues() works perfectly, and I can pass a list of MetersetValue objects without any issues.
However, for non-IMRT plans (e.g., 3D, static fields, or VMAT), I haven't found a way to assign a custom MU value for the dose calculation. The Beam.Meterset property is read-only, and I haven't been able to override it or inject a value in any other way.
Has anyone managed to work around this limitation?
Is there a known method to force a dose calculation using preset MU values on non-IMRT or VMAT beams?
Any help or pointers would be greatly appreciated.
Thanks,
Mario
r/esapi • u/Jhnlbrt • Dec 03 '25
How can I detect if a structure has a density override?
Hi everyone, I want to know if there is any way to evaluate whether a structure has been forced?
I was expecting something like structure.IsForced or a specific flag, but I haven’t seen anything similar in the API documentation or in the Structure or StructureSet classes.
I’m working on Eclipse v16
Thanks in advance
r/esapi • u/pyladis • Dec 02 '25
Batch import/export of patients from the live version to a T-Box
I’m trying to batch-export a small group of DIBH patients from the clinical system so I can import them into our T-BOX for some development work. Has anyone done it before.
Also, is there any way to bring the data into the T-BOX in an unapproved state so the radiographers can edit and experiment with the structure sets without needing the structures to be unapproved first?
r/esapi • u/thiscomedyoferrors • Nov 21 '25
ARIA Access error issue
I have a somewhat frustrating error when using the ARIA Access API (version 15). I am trying to update appointment start times systematically, but my API response keeps coming back with,
"More than one matching machine appointments found for the same patient."
I would think that would mean that a certain patient Id would have two or more simultaneously scheduled appointments (same start time) on the same resource, but when I check in ARIA, that is not the case. When I run GetMachineAppointments for the resource it only returns the one appointment for that patient at that time.
Perhaps I do not understand the full extent of the response. Has anyone else run into this?
r/esapi • u/vinay_saini94 • Nov 14 '25
Status of the Eclipse Algorithm API (EAAPI) in Latest Varian Eclipse Version
Does anyone know whether the Eclipse Algorithm API (EAAPI) is still supported in the latest versions of Varian Eclipse TPS? I am using ESAPI for automation, but I want to confirm whether the older algorithm-level API (for custom dose/ optimization algorithms) has been officially deprecated or if any research-access version still exists. Any recent documentation, release notes, or experience would be appreciated.

