Hello all,
I save off views using the set command:
Parameters.set("RView", RView.id);
and drag off an instance. Then, double click the instance to bring up the window that has the values (and the view is listed there), then click the circle and the dialog appears, but without the retrieved view in the viewlist. I retrieve the view using
if (Parameters.has("RView")) {
AugmentParameters.RView = View.viewById(Parameters.getString("RView"));
I check using Console.writeln that it has RView.id and it appears fine. But I want this view to show in the viewlist dialog box so I tried about everything I could think of....here is one example of what I tried...
AugmentParameters.RViewList.currentView = AugmentParameters.RView;
I have tried declaring RVList globally (as in the code below) and not declaring it globally among about 50 variations of everything I can think of, but I haven't found the correct way to do this?
Thanks for your help...Alex
AugmentParameters is the global declaration of the variables...I have attached the complete code that does these things.
I save off views using the set command:
Parameters.set("RView", RView.id);
and drag off an instance. Then, double click the instance to bring up the window that has the values (and the view is listed there), then click the circle and the dialog appears, but without the retrieved view in the viewlist. I retrieve the view using
if (Parameters.has("RView")) {
AugmentParameters.RView = View.viewById(Parameters.getString("RView"));
I check using Console.writeln that it has RView.id and it appears fine. But I want this view to show in the viewlist dialog box so I tried about everything I could think of....here is one example of what I tried...
AugmentParameters.RViewList.currentView = AugmentParameters.RView;
I have tried declaring RVList globally (as in the code below) and not declaring it globally among about 50 variations of everything I can think of, but I haven't found the correct way to do this?
Thanks for your help...Alex
Code:
var AugmentParameters = {
filterWidthBB: 90.0,
filterWidthNB: 5.0,
exposureBB: 300,
exposureNB: 1800,
HFactor: 2.0,
SFactor: 2.0,
OFactor: 2.0,
HbPcnt: 34.0, // supposedly the commonly assumed value Ha/Hb=3.92
OBPcnt: 50.0, // very close to the true value
HView: undefined,
SView: undefined,
OView: undefined,
RView: undefined,
GView: undefined,
BView: undefined,
GO_amp: "",
BHO_amp: "",
RHS_amp: "",
SHO_RGB: "",
Ha_LINE: "",
SII_LINE: "",
OIII_LINE: "",
dialog: "",
RViewList: "",
// save parameters for new instance
save: function () {
with ( AugmentParameters ) {
Parameters.set( "filterWidthBB", filterWidthBB );
Parameters.set( "filterWidthNB", filterWidthNB );
Parameters.set( "exposureBB", exposureBB );
Parameters.set( "exposureNB", exposureNB );
Parameters.set( "HFactor", HFactor );
Parameters.set( "SFactor", SFactor );
Parameters.set( "OFactor", OFactor );
Parameters.set( "HbPcnt", HbPcnt );
Parameters.set( "ProcessingOption", ProcessingOption);
Parameters.set( "DeleteIntermediate", DeleteIntermediate );
Parameters.set( "OBPcnt", OBPcnt );
/*
Parameters.set( "HView", HView.id );
Parameters.set( "SView", SView.id );
Parameters.set( "OView", OView.id );
Parameters.set( "RView", RView.id );
Parameters.set( "GView", GView.id );
Parameters.set( "BView", BView.id );
*/
Parameters.set("RView", RView.id);
}
},
// load the script instance parameters
load: function() {
// with ( AugmentParameters ) {
if (Parameters.has("exposureNB")) {
AugmentParameters.exposureNB = Parameters.getReal("exposureNB"); }
if (Parameters.has("exposureBB")) {
AugmentParameters.exposureBB = Parameters.getReal("exposureBB"); }
if (Parameters.has("filterWidthNB")) {
AugmentParameters.filterWidthNB = Parameters.getReal("filterWidthNB"); }
if (Parameters.has("filterWidthBB")) {
AugmentParameters.filterWidthBB = Parameters.getReal("filterWidthBB"); }
if (Parameters.has("HFactor")) {
AugmentParameters.HFactor = Parameters.getReal("HFactor"); }
if (Parameters.has("SFactor")) {
AugmentParameters.SFactor = Parameters.getReal("SFactor"); }
if (Parameters.has("OFactor")) {
AugmentParameters.OFactor = Parameters.getReal("OFactor"); }
if (Parameters.has("HbFactor")) {
AugmentParameters.HbPcnt = Parameters.getReal("HbPcnt") }
if (Parameters.has("OBPcnt")) {
AugmentParameters.OBPcnt = Parameters.getReal("OBPcnt") }
/*
if (Parameters.has("HView")) {
AugmentParameters.HView = Parameters.get("HView"); }
if (Parameters.has("SView")) {
AugmentParameters.SView = Parameters.get("SView"); }
if (Parameters.has("OView")) {
AugmentParameters.OView = Parameters.get("OView"); }
if (Parameters.has("RView")) {
AugmentParameters.RView = Parameters.get("RView"); }
if (Parameters.has("GView")) {
AugmentParameters.GView = Parameters.get("GView"); }
if (Parameters.has("BView")) {
AugmentParameters.BView = Parameters.get("BView"); }
*/
if (Parameters.has("RView")) {
AugmentParameters.RView = View.viewById(Parameters.getString("RView"));
//HELP--THIS DOES NOT WORK! I've tried every syntext I can think of
AugmentParameters.RViewList.currentView = AugmentParameters.RView;
}
}
//}
};