VarianAPIs / Varian-Code-Samples

Code samples for ESAPI and other Varian APIs and web services.
MIT License
116 stars 108 forks source link

External beam configuration not found when using CreateVerificationPlan #55

Open avalgoma opened 4 years ago

avalgoma commented 4 years ago

Good morning and many thanks to all of you in advance.

When I run CreateVerificationPlan to generate a Verification Plan on an Octavius Phantom I find:

Either running script on TBOX or ARIA (real patient database).

Here you are the exception message. Any idea?

External beam configuration not found

\s231262saria01\va_data$\ProgramData\Vision\PublishedScripts\CreateVerificationPlan.esapi.dll

System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. --->

VMS.TPS.Common.Model.ScriptExecutionException: There was a problem while executing the script

'\s231262saria01\va_data$\ProgramData\Vision\PublishedScripts\CreateVerificationPlan.esapi.dll' (ESAPI: VMS.TPS.Common.Model.API, Version=1.0.300.11, Culture=neutral, PublicKeyToken=305b81e210ec4b89). --->

System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. --->

System.ApplicationException: External beam configuration not found

en VMS.TPS.Common.Model.PlanSetup.AddVMATBeam(ExternalBeamMachineParameters machineParameters, IEnumerable`1 metersetWeights, 

Double collimatorAngle, Double gantryAngle, Double gantryStop, GantryDirection gantryDirection, Double patientSupportAngle, VVector isocenter) en VMS.TPS.Common.Model.API.ExternalPlanSetup.AddVMATBeam(ExternalBeamMachineParameters machineParameters, Inumerable1 metersetWeights, Double collimatorAngle, Double gantryAngle, Double gantryStop, GantryDirection gantryDirection, Double patientSupportAngle, VVector isocenter) en VMS.TPS.Script.CreateVerificationPlan(Course course, IEnumerable1 beams, ExternalPlanSetup verifiedPlan, StructureSet verificationStructures, Boolean calculateDose) en VMS.TPS.Script.Execute(ScriptContext context) --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) en System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) en System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) en System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) en VMS.TPS.Script.Engine.InvokeMethod(Object obj, String methodName, Object[] parameters) en VMS.TPS.Script.Engine.Execute(String fileName) --- Fin del seguimiento de la pila de la excepción interna --- en VMS.TPS.Script.Engine.Execute(String fileName) en VMS.TPS.Script.Extension.Execute(IntPtr parentWindow) --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) en System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) en System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) en System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) en vhost.TpsNetExtension.Execute(TpsNetExtension , HWND__ parentWindowHandle)

joecastelo commented 4 years ago

@avalgoma Hello! I solved that issue already in closed issues #53 ! The thing is when you Add the beam the FFF has to be at the primaryfluenceModeId and not in the energy name.

avalgoma commented 4 years ago

Ops @joecastelo! You are right.

Many thanks.

joecastelo commented 4 years ago

@avalgoma Close the issue?

avalgoma commented 4 years ago

Hi.

Has anybody checked CreateVerificationPlan scritp for a Halcyon ALE plan?

We have a problem of the type "There were errors in beam parameters" when in the code is executed

verificationBeam.ApplyParameters(editableParams);

Many thanks,

-- Agus