arwolfe Posted March 21, 2011 Share Posted March 21, 2011 Hello all, I have a job, which I run every month, where I call on a large list (100s) of resources. Each month I would like to remove the entire set of resources and link in a new set. How can I accomplish this without clicking delete on overy resource? Thanks Link to comment Share on other sites More sharing options...
Dan Korn Posted March 21, 2011 Share Posted March 21, 2011 Instead of adding all the resources in the GUI, it might be easier to simply call CreateResource in your rules, so that you don't need to deal with hundreds of named resources in the first place. Link to comment Share on other sites More sharing options...
arwolfe Posted March 22, 2011 Author Share Posted March 22, 2011 Dan, Thanks for the feedback. What would be the best approach to your strategy? Use the onRecordStart event to create the resource and leave the Field definition (Graphic) the same? Or change the frame source to a rule which returns the resource? On a related note, can the search paths be set in the onJobStart event so that I do not need to supply the absolute path to the resource being created? Link to comment Share on other sites More sharing options...
Dan Korn Posted March 22, 2011 Share Posted March 22, 2011 Thanks for the feedback. What would be the best approach to your strategy? Use the onRecordStart event to create the resource and leave the Field definition (Graphic) the same? Or change the frame source to a rule which returns the resource? You can simply create a Graphic rule which calls CreateResource with the field name, and give the rule the same name as the field, and any frame referencing that field/rule name will call the rule. You don't need to use OnRecordStart. On a related note, can the search paths be set in the onJobStart event so that I do not need to supply the absolute path to the resource being created? You can specify the search path on the Advanced tab of the Composition Settings dialog. Or you can simply prepend the path to the file name in the Graphic rule. But I recommend using the Composition Settings; this makes your job more portable. Link to comment Share on other sites More sharing options...
arwolfe Posted March 22, 2011 Author Share Posted March 22, 2011 You can simply create a Graphic rule which calls CreateResource with the field name, and give the rule the same name as the field, and any frame referencing that field/rule name will call the rule. You don't need to use OnRecordStart. Sounds good. So creating a rule with the same name as a Field effectively overrides that Field? You can specify the search path on the Advanced tab of the Composition Settings dialog. Or you can simply prepend the path to the file name in the Graphic rule. But I recommend using the Composition Settings; this makes your job more portable. How does this impact the preview funtionality? Will FP use the search paths from the composition dialog when it builds the preview? Link to comment Share on other sites More sharing options...
Dan Korn Posted March 22, 2011 Share Posted March 22, 2011 Sounds good. So creating a rule with the same name as a Field effectively overrides that Field? Yes. How does this impact the preview funtionality? Will FP use the search paths from the composition dialog when it builds the preview? Yes, it uses the Search Path for both Preview and regular (non-Preview) compositions. Link to comment Share on other sites More sharing options...
arwolfe Posted March 22, 2011 Author Share Posted March 22, 2011 Thanks Dan! You cleared up a lot of questions here! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.