Awesome! Thanks
-- Joey Ponthieux LaRC Information Technology Enhanced Services (LITES) MYMIC Technical Services NASA Langley Research Center __________________________________________________ Opinions stated here-in are strictly those of the author and do not represent the opinions of NASA or any other party. From: [email protected] [mailto:[email protected]] On Behalf Of Eric Thivierge Sent: Tuesday, February 10, 2015 10:58 AM To: [email protected] Subject: Re: Custom Param Set property = PPG.Inspected(0) model = property.Parent On 2/10/2015 10:51 AM, Ponthieux, Joseph G. (LARC-E1A)[LITES] wrote: I had been able to get this far function MyProperty12_Set_Camera_OnClicked( this_model ) { Application.LogMessage("MyProperty12_Set_Camera_OnClicked called"); var page = PPG.Name; var param = PPG.Camera_Name; Application.LogMessage("value is "+ page); Application.LogMessage("value is "+ param); } // INFO : MyProperty12_Set_Camera_OnClicked called // INFO : value is MyProperty12 // INFO : value is Camera3 Problem is I need to edit an expression on an object other than this param. As a result I need the path of that object and then add the Camera name to the expression. I’ve been completely unable to retrieve the Model and object path which is necessary to make this work. This is the expression: SetExpr("GlowSphere.GlowSphereSurface.kine.global.sclx", " GlowSphere. MyProperty12.Size * ctr_dist(GlowSphere.GlowSphereSurface, Camera. )", null); Camera needs to be replaced with param as in, but the GlowSphere (Model) name may be different and needs to be acquired prior to editing and included in the edit SetExpr("GlowSphere.GlowSphereSurface.kine.global.sclx", " GlowSphere. MyProperty12.Size * ctr_dist(GlowSphere.GlowSphereSurface,”+param+” . )", null); The PPG belongs to the Model but I’ve been unable to extract the Model as a Parent to the page. Thanks -- Joey Ponthieux LaRC Information Technology Enhanced Services (LITES) MYMIC Technical Services NASA Langley Research Center __________________________________________________ Opinions stated here-in are strictly those of the author and do not represent the opinions of NASA or any other party. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Eric Thivierge Sent: Tuesday, February 10, 2015 10:24 AM To: [email protected]<mailto:[email protected]> Subject: Re: Custom Param Set Find your parameter: myParam = PPG.MyParam Set the expression: myExpr = "blah / 2 * myCameraName" myParam.SetExpression(myExpr) On 2/10/2015 8:42 AM, Ponthieux, Joseph G. (LARC-E1A)[LITES] wrote: Thanks. I’d already started building the property page via the wizard and formatted the expression with the “this_model” reference. I’ve got the button and entry line set up in the property page but it’s been so long since I’ve done anything like this I can’t seem to remember how to force the expression rewrite through the property page’s code. Ideas? -- Joey Ponthieux LaRC Information Technology Enhanced Services (LITES) MYMIC Technical Services NASA Langley Research Center __________________________________________________ Opinions stated here-in are strictly those of the author and do not represent the opinions of NASA or any other party. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Alok Gandhi Sent: Tuesday, February 10, 2015 12:00 AM To: [email protected]<mailto:[email protected]> Subject: Re: Custom Param Set I would go with Eric's approach. Surely have done this before. If I find that script I will post a snippet. Sent from my iPhone On 10-Feb-2015, at 1:39 am, Ponthieux, Joseph G. (LARC-E1A)[LITES] <[email protected]<mailto:[email protected]>> wrote: Ugh. I can’t seem to shake the idea that I have done something like this in the past. Just can’t remember the context. Thanks -- Joey Ponthieux LaRC Information Technology Enhanced Services (LITES) MYMIC Technical Services NASA Langley Research Center __________________________________________________ Opinions stated here-in are strictly those of the author and do not represent the opinions of NASA or any other party. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Eric Thivierge Sent: Monday, February 09, 2015 11:50 AM To: [email protected]<mailto:[email protected]> Subject: Re: Custom Param Set You'll probably have to script this. Type in the name of the camera in the text area, have a button next to it to run the script to do a find and replace in the expression. Eric T. On 2/9/2015 11:07 AM, Ponthieux, Joseph G. (LARC-E1A)[LITES] wrote: Hello, I have an expression. Part of that expression points to a camera. I’d like to have that reference point to a Custom Pset parameter where I can provide the name of the Camera in the parameter. I tried this with the Camera name as Text, but it doesn’t work. Apparently it can’t resolve the object name that way. There will be multiple expressions, each pointing to the same Camera, I wanted to make this easy to edit the Camera name and have it propagate to all the expressions. How would I do this? -- Joey Ponthieux LaRC Information Technology Enhanced Services (LITES) MYMIC Technical Services NASA Langley Research Center __________________________________________________ Opinions stated here-in are strictly those of the author and do not represent the opinions of NASA or any other party.

