dml1280 Posted October 25, 2018 Posted October 25, 2018 I have this rule that is working great to only show what I need on preview: //access the "isOnlinePreview" property and the "isPreview" property onlinePreviewVal = FusionPro.Composition.JobOptions.isOnlinePreview; desktopPreviewVal = FusionPro.Composition.isPreview; //if this is a preview composition or a desktop preview //then return the specified resource if (onlinePreviewVal == "Yes" || desktopPreviewVal == true) { FusionPro.Composition.SetBodyPageUsage("Info",true); FusionPro.Composition.SetBodyPageUsage("UV Back",false); FusionPro.Composition.SetBodyPageUsage("Black Back",false); FusionPro.Composition.SetBodyPageUsage("Back Black and White",true); } if (Field("Stock Option") == "Matte") { FusionPro.Composition.SetBodyPageUsage("Info",true); FusionPro.Composition.SetBodyPageUsage("UV Back",false); FusionPro.Composition.SetBodyPageUsage("Black Back",false); FusionPro.Composition.SetBodyPageUsage("Back Black and White",true); } if (Field("Stock Option") == "Matte with UV") { FusionPro.Composition.SetBodyPageUsage("Info",true); FusionPro.Composition.SetBodyPageUsage("UV Back",false); FusionPro.Composition.SetBodyPageUsage("Black Back",true); FusionPro.Composition.SetBodyPageUsage("Back Black and White",false); } if (Field("Stock Option") == "Silk Lam") { FusionPro.Composition.SetBodyPageUsage("Info",true); FusionPro.Composition.SetBodyPageUsage("UV Back",false); FusionPro.Composition.SetBodyPageUsage("Black Back",false); FusionPro.Composition.SetBodyPageUsage("Back Black and White",true); } if (Field("Stock Option") == "Silk Lam with UV") { FusionPro.Composition.SetBodyPageUsage("Info",true); FusionPro.Composition.SetBodyPageUsage("UV Back",false); FusionPro.Composition.SetBodyPageUsage("Black Back",true); FusionPro.Composition.SetBodyPageUsage("Back Black and White",false); } if (Field("Stock Option") == "Suede Lam") { FusionPro.Composition.SetBodyPageUsage("Info",true); FusionPro.Composition.SetBodyPageUsage("UV Back",false); FusionPro.Composition.SetBodyPageUsage("Black Back",false); FusionPro.Composition.SetBodyPageUsage("Back Black and White",true); } if (Field("Stock Option") == "Suede Lam with UV") { FusionPro.Composition.SetBodyPageUsage("Info",true); FusionPro.Composition.SetBodyPageUsage("UV Back",false); FusionPro.Composition.SetBodyPageUsage("Black Back",true); FusionPro.Composition.SetBodyPageUsage("Back Black and White",false); } How do I append this so that anything "with UV" should be set as such in the press file? FusionPro.Composition.SetBodyPageUsage("Info",true); FusionPro.Composition.SetBodyPageUsage("UV Back",true); FusionPro.Composition.SetBodyPageUsage("Black Back",true); FusionPro.Composition.SetBodyPageUsage("Back Black and White",false); Thanks! Quote
Dan Korn Posted November 1, 2018 Posted November 1, 2018 It's hard to say without the whole job, and a complete description of the requirements, but I think the entire rule can just be this: var withUV = !IsPreview() && Field("Stock Option").indexOf("with UV") > -1; FusionPro.Composition.SetBodyPageUsage("UV Back", withUV); FusionPro.Composition.SetBodyPageUsage("Black Back", withUV); FusionPro.Composition.SetBodyPageUsage("Back Black and White", !withUV); Quote
dml1280 Posted December 4, 2018 Author Posted December 4, 2018 Thank you so much! That was what I needed to make it work. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.