2 Replies Latest reply on Dec 10, 2011 5:44 AM by areohbee

    How to get access to filenaming preset in export/publish-service settings?

    areohbee Level 5

      I want to be able to pre-check filename, but the tokens in the export parameters have left the preset behind.

       

      If I could access the preset, I could pre-generate the filename to be used by calling photo:getNameViaPreset.

       

      But alas, I can't seem to "lasso" that preset.

       

      So, short of re-implementing the filename token replacement algorithm, if that's even possible, I see no way to generate the destination filename, before the photo is actually rendered by Lightroom.

       

      Any ideas?

        • 1. Re: How to get access to filenaming preset in export/publish-service settings?
          DawMatt Level 3

          Hi Rob,

           

          As I mentioned in the video export thread last week, it is not possible to reliably pre-generate the filename that will be used in a export or publish service. If the user chooses a preset that includes a sequence number then there is no way you can guarantee the name returned will be the same as the one the export/publish chooses.

           

          I have tried this once before. From memory I iterated each filename preset retrieved from LrApplication's method, stored the preset and its tokens, then compared the export's tokens to those for the presets I knew about, and used that to determine which preset to pass to the name via preset method. Very back-to-front way of using the available data but there was no other option available to me at the time.

           

          What makes this even harder is that some of the filename presets returned by the LrApplication method won't be accepted by name via preset. From memory some presets return something other than an ID so the naming function can't understand which preset you are referring to. So if the user chose one of those naming presets in the export then you are, again, out of luck.

           

          In case you were wondering I did report these bugs/limitations to Adobe some time ago.

           

          Matt

          1 person found this helpful