I am fairly new to scripting in pinnacle. I was wondering if there is
a way to use Do-while loops or something similar. any help would be
greatly appreciated.
Dan
<normal script stuff>
Store.FloatAt.keep_looping = 1;
IF.<stopping condition>.THEN.Store.FloatAt.keep_looping = 0;
IF.Store.FloatAt.keep_looping.EQUALTO.#"#1".Script.ExecuteNow =
"loop.Script";
Hope that helps.
Derek
The only thing that I am really missing is a way to count the number
of loops, and use that number in a useful way. Let me explain. My
overall goal is to scroll through all the beams and delete out all
beams that dont have monitor units associated with them (I am working
on a completely automated dose plane extraction script, and I would be
able to cut down on computing time if I were able to delete out all
unused beams).
I guess I could put in yet another conditional at the end of "the
script that calls itself" that tells it to add 1 to .keep_looping
Store .At .keep_looping .ADD .#"#1" (something like that
anyway, not completely up on my math operators yet)
but then I would need a .NOTEQUALTO operator. Is there such a thing?
IF .Store .At .keep_looping .Value .NOTEQUALTO .#"#0" <call
script again> ?????????
Also is there a proper way to grab the number of beams in the trial
and store it as a variable? I was thinking it might be easy to use
something like:
Trials .Current .Beamlist .Last .MakeCurrent = 1; (but then
how do you get the beam number of the current beam?)
> > Dan- Hide quoted text -
>
> - Show quoted text -
TrialList.Current.BeamList.Count
TrialList.Current.BeamList.Current.Index
For more general help with the scripting language (like EQUALTO/
NOTEQUALTO issues), I find the Perth scripting guide to be quite
handy.
http://www.medphysfiles.com/index.php?name=Downloads&file=details&id=36
You're a Rock Star!! I was hoping that there was some kind of guide
out there somewhere.
> > > - Show quoted text -- Hide quoted text -
TrialList.Current.BeamList.ChildrenEachCurrent.#"@".Script.ExecuteNow = "/usr/local/adacnew/PinnacleSiteData/Scripts/PATHTOMUCHECKSCRIPT";
I hope that helps
Gary
-----Original Message-----
From: pinnacl...@googlegroups.com [mailto:pinnacl...@googlegroups.com] On Behalf Of Dan McKinney
Sent: 28 November 2011 22:46
To: pinnacle3-users
Subject: [p3rtp] Re: Loops using scripts
Thanks Derek.
You're a Rock Star!! I was hoping that there was some kind of guide out there somewhere.
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--
You received this message because you are subscribed to the Google Groups "pinnacle3-users" group.
To post to this group, send email to pinnacl...@googlegroups.com To subscribe to this group, send email to
pinnacle3-us...@googlegroups.com
To unsubscribe from this group, send email to
pinnacle3-use...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pinnacle3-users?hl=en
********************************************************************************************************************
This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.
Thank you for your co-operation.
NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere
For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail
********************************************************************************************************************
the discribed way works, BUT be carefull, childreneachcurrent counts
the beam numbers:
e.g. current = #1, delete current -> next beam checked will be beam
#2, wich was beam #3 before you deleted #1, you failed to check #2!!!
Carsten
On 29 Nov., 15:33, "Bee Gary (TAUNTON AND SOMERSET NHS FOUNDATION
> For more options, visit this group athttp://groups.google.com/group/pinnacle3-users?hl=en
That was a very helpful tip, not only in this situation, but the
ability to use a list like that is very powerful. I didn't know you
could do that cheers.
Dan McKinney
On Dec 2, 11:05 am, "Lederer, Ernst" <ELede...@hsnsudbury.ca> wrote:
> What you can do to avoid this problem is this
>
> 1. Create a List in Store with
>
> Store.At.Stack = ObjectList {ChildClassName = "SimpleString"; };
>
> Then Check all the Beams
>
> TrialList.Current.BeamList.ChildrenEachCurrent.#"@".Script.ExecuteNow = <TestScript>;
>
> TestScript:
>
> IF.TrialList.Current.BeamList.Current.<TestCondition>.THEN.Store.At.Stack.CreateChild = 1; IF.TrialList.Current.BeamList.Current.<TestCondition>.THEN.Store.At.Stack.Last.Name = TrialList.Current.BeamList.Current.Name;
>
> LastStep:
>
> Store.At.Stack.ChildrenEachCurrent.#"@".Script.ExecuteNow = <RemoveScript>;
>
> RemoveScript:
>
> TrialList.Current.BeamList.Current = Store.At.Stack.Current.Name; TrialList.Current.BeamList.Current.Destroy = 1;
>
> Important:
> BeamNames cannot not contain special characters "~!@#$%^&*(){}[]" and spaces should be replaced with underscore (courtesy of SOLARIS)
>
> Ernst
>
> ____________________________________
>
> Ernst Lederer RT. (Austria), C.M.D.
> Dosimetrist, Department of Medical Physics
>
> Regional Cancer Centre of the
> Hopital Regional Sudbury Regional Hospital
>
> 41 Ramsey Lake Road
> Sudbury, Ontario P3E 5J1
> Tel: (705) 522-6237 Ext. 2158
> Fax.: (705) 523-7329
> e-mail: elede...@hrsrh.on.ca
> > ********************************************************************************************************************
>
> > This message may contain confidential information. If you are not the intended recipient please inform the
> > sender that you have received the message in error before deleting it.
> > Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
> > to do so is strictly prohibited and may be unlawful.
>
> > Thank you for your co-operation.
>
> > NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
> > NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients
> > NHSmail provides an email address for your career in the NHS and can be accessed anywhere
> > For more information and to find out how you can switch, visitwww.connectingforhealth.nhs.uk/nhsmail
>
> > ********************************************************************************************************************
>
> --
> You received this message because you are subscribed to the Google
> Groups "pinnacle3-users" group.
> To post to this group, send email to pinnacl...@googlegroups.com
> To subscribe to this group, send email to
> pinnacle3-us...@googlegroups.com
> To unsubscribe from this group, send email to
> pinnacle3-use...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/pinnacle3-users?hl=en
>
> ************************************************************************
> The information contained in this e-mail and document(s) attached are for
> the exclusive use of the addressee and may contain confidential, privileged
> and non-disclosable information. If the recipient of this e-mail is not the
> addressee, such recipient is strictly prohibited from reading, photocopying,
> distributing or otherwise using this e-mail or its content in any way.- Hide quoted text -
This works like a charm:
IF.RoiList.Current.#!HasCurves".
THEN.WarningMessage = "Empty";
Giving me a warning message when the ROI is empty.
However when using a custom list:
Store.At.EmptyROIList = ObjectList {ChildClassName =
"SimpleString"; };
IF.RoiList.Current.#"!HasCurves".
THEN.Store.At.EmptyROIList.CreateChild = 1;
IF.RoiList.Current.#"!HasCurves".
THEN.Store.At.EmptyROIList.Last.Name = RoiList.Current.Name;
It stores EVERY ROI in the list regardless of the condition...
However removing the negation (!) it only stores ROI having curves in
the list...
I'm kind of puzzled over this and hope sombody has an explanation.
Thanks all!
Patrick Delage
Medical Physicist
CHUS - Centre de Santé Universitaire de Sherbrooke
patrick...@gmail.com, pdelag...@ssss.gouv.qc.ca
On 2 déc, 12:05, "Lederer, Ernst" <ELede...@hsnsudbury.ca> wrote:
> What you can do to avoid this problem is this
>
> 1. Create a List in Store with
>
> Store.At.Stack = ObjectList {ChildClassName = "SimpleString"; };
>
> Then Check all the Beams
>
> TrialList.Current.BeamList.ChildrenEachCurrent.#"@".Script.ExecuteNow = <TestScript>;
>
> TestScript:
>
> IF.TrialList.Current.BeamList.Current.<TestCondition>.THEN.Store.At.Stack.CreateChild = 1; IF.TrialList.Current.BeamList.Current.<TestCondition>.THEN.Store.At.Stack.Last.Name = TrialList.Current.BeamList.Current.Name;
>
> LastStep:
>
> Store.At.Stack.ChildrenEachCurrent.#"@".Script.ExecuteNow = <RemoveScript>;
>
> RemoveScript:
>
> TrialList.Current.BeamList.Current = Store.At.Stack.Current.Name; TrialList.Current.BeamList.Current.Destroy = 1;
>
> Important:
> BeamNames cannot not contain special characters "~!@#$%^&*(){}[]" and spaces should be replaced with underscore (courtesy of SOLARIS)
>
> Ernst
>
> ____________________________________
>
> Ernst Lederer RT. (Austria), C.M.D.
> Dosimetrist, Department of Medical Physics
>
> Regional Cancer Centre of the
> Hopital Regional Sudbury Regional Hospital
>
> 41 Ramsey Lake Road
> Sudbury, Ontario P3E 5J1
> Tel: (705) 522-6237 Ext. 2158
> Fax.: (705) 523-7329
> e-mail: elede...@hrsrh.on.ca
> > ********************************************************************************************************************
>
> > This message may contain confidential information. If you are not the intended recipient please inform the
> > sender that you have received the message in error before deleting it.
> > Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
> > to do so is strictly prohibited and may be unlawful.
>
> > Thank you for your co-operation.
>
> > NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
> > NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients
> > NHSmail provides an email address for your career in the NHS and can be accessed anywhere
> > For more information and to find out how you can switch, visitwww.connectingforhealth.nhs.uk/nhsmail
>
> > ********************************************************************************************************************
>
> --
> You received this message because you are subscribed to the Google
> Groups "pinnacle3-users" group.
> To post to this group, send email to pinnacl...@googlegroups.com
> To subscribe to this group, send email to
> pinnacle3-us...@googlegroups.com
> To unsubscribe from this group, send email to
> pinnacle3-use...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/pinnacle3-users?hl=en
>
> ************************************************************************
> The information contained in this e-mail and document(s) attached are for
> the exclusive use of the addressee and may contain confidential, privileged
> and non-disclosable information. If the recipient of this e-mail is not the
> addressee, such recipient is strictly prohibited from reading, photocopying,
> distributing or otherwise using this e-mail or its content in any way.- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -
I once had a similar Task, checking if a ROI has contend; My approach
was, to calculate the ROI Statistic, get the volume (as a STRING!!!)
and check, if the STRING is a '?'.
That worked fine...
Carsten Reiffenstuhl
> patrick.del...@gmail.com, pdelage.c...@ssss.gouv.qc.ca
Solved my problem by modifying the IF form to the following:
IF.RoiList.Current.#"!HasCurves".
THEN.Store.At.EmptyROIList.CreateChild = 1;
IF.RoiList.Current.#"!HasCurves".
THEN.Store.At.EmptyROIList.Last.Name = RoiList.Current.Name;
Becomes:
IF.RoiList.Current.#"!HasCurves".
THEN = {
Store.At.EmptyROIList.CreateChild = 1;
Store.At.EmptyROIList.Last.Name = RoiList.Current.Name;
};
Logically it should have the same outcomes but apperently it doen't...
Patrick
On 10 déc, 06:04, Carsten Reiffenstuhl <cbomba...@googlemail.com>
wrote:
> ...
>
> plus de détails »- Masquer le texte des messages précédents -
Patrick
On 16 déc, 09:05, "Lederer, Ernst" <ELede...@hsnsudbury.ca> wrote:
> Correct, that works but the parser does not like the combination IF.....THEN = { };
>
> It will do what you are asking it to do, however, it will complain about it. The best thing to do is to watch the CDE Error Log (found in the Tools menu)
> That will tell you:
> vRoot_ParseConditionlKey: illegal piece "THEN" found in key "THEN"
> vRoot_ParseIfThenElse: illegal piece "THEN" found in key "THEN"
>
> in future versions of Pinnacle that might work or not work (can go either way - depending on the developers)
>
> Ernst
>
> ____________________________________
>
> Ernst Lederer RT. (Austria), C.M.D.
> Dosimetrist, Department of Medical Physics
>
> Regional Cancer Centre of the
> Hopital Regional Sudbury Regional Hospital
>
> 41 Ramsey Lake Road
> Sudbury, Ontario P3E 5J1
> Tel: (705) 522-6237 Ext. 2158
> Fax.: (705) 523-7329