Author Topic: Hotcode Code Generator for the same variable in more than one namespace  (Read 177 times)

Offline ejhutch

  • Member
  • **
  • Posts: 54
    • View Profile
Hi,
Is it possible to have a hot code code generator for the same variable in more than one namespace?

I'd like to be able to do something like [volume.root]/[volume.prefix][workflow.preingestfolder]

However, if I have "local" in usercustom3, [volume.prefix] seems to evaluate to what I would expect [workflow.preingestfolder] to evaluate to "To Ingest1"... and [workflow.preingestfolder] also seems to evaluate to  "To Ingest1". What seems to be going on?  Thanks!

Example Hotcodes definition:

//$$   volume
//##   prefix   volume   root   backuproot   
//==   {usercustom3:0:lc}
//==   {clientcustom3:0:lc}
//??   local      Pictures   PicturesBackups
local   Local_   /Users/edhutchison   Pictures   PicturesBackups
mobile   PB_   /Volumes/SSD   SSDPictures   SSDPicturesBackups
server   Server_   /Volumes/sharedPictures   ServerPictures   ServerPicturesBackups

//$$   workflow
//##   preingestfolder   ingestfolder   originalsfolder   selectsfolder   outputfolder   outtakesfolder   trashfolder
//==   {usercustom3:0:lc}
//==   {clientcustom3:0:lc}
//??   To Ingest   Ingest   Original   Select   Output   Outtake   Trash
local   To Ingest1      Ingest   Original   Select   Output   Outtake   Trash
mobile
server

Offline alexmacnaughton

  • Newcomer
  • *
  • Posts: 29
    • View Profile
Re: Hotcode Code Generator for the same variable in more than one namespace
« Reply #1 on: December 21, 2025, 02:52:47 PM »
Hi, could you give me more information about what you're trying to achieve with the hot codes?

Offline ejhutch

  • Member
  • **
  • Posts: 54
    • View Profile
Re: Hotcode Code Generator for the same variable in more than one namespace
« Reply #2 on: December 22, 2025, 06:05:36 AM »
Hi,
Oh, a number of different things, but with this example it's providing different locations for me to ingest or move photos to based on if I'm working locally on my laptop with just it's internal drive, locally with an external SSD, or connected to a server.  There are a few different ways to solve this particular case, including with the dialog snapshot feature, and this possible use case for hotcodes is just one possibility.  And storing the volume path is simply for my reference since you have to manually pick the volume path in the ingest and copy/move destination and backup folder roots and can't use variables for it.  I'm also planning automated repository segregation by path depending on whether photos are created by/for clients, family members, youth sports teams, friends, personal photos, or other types of photo creators or clients.

I realize that I could (and may have to) just extend the column list in one namespace to support all of the columns, but organizing them into different namespaces and hot code files is easier for me to keep track of where I need to make changes or additions.

If I have to just use one namespace for those particular code generators I'd do something like what's below.  Or I may try to find a different approach.  Either way it's helpful to know the constraints of the hotcodes feature.

//$$   path
//==   {usercustom3:0:lc}
//==   {clientcustom3:0:lc}
//??   local      Pictures   PicturesBackups To Ingest   Ingest   Original   Select   Output   Outtake   Trash
//##   prefix   volume   root   backuproot   preingestfolder   ingestfolder   originalsfolder   selectsfolder   outputfolder   outtakesfolder   trashfolder

local   Local_   /Users/edhutchison   Pictures   PicturesBackups To Ingest1      Ingest   Original   Select   Output   Outtake   Trash
mobile   PB_   /Volumes/SSD   SSDPictures   SSDPicturesBackups
server   Server_   /Volumes/sharedPictures   ServerPictures   ServerPicturesBackups

I could also achieve similar organization with keywords and / or multiple catalogs (which I'm also using), but this approach so far seems like it will meet most of my needs to keep my photo repositories organized in such a way that each repository can be easily moved or shared in bulk depending on working storage capacity. Plus it's easier for me to keep track of where photos are stored as they're moved among local, SSD, and server storage.

Thanks for your question.

Offline alexmacnaughton

  • Newcomer
  • *
  • Posts: 29
    • View Profile
Re: Hotcode Code Generator for the same variable in more than one namespace
« Reply #3 on: December 22, 2025, 08:39:51 AM »
Hi, thanks for the extra information. I may be completely misunderstanding what you are trying to achieve with hot codes. Please feel free to correct me. If I understand correctly, creating snapshots of the paths you want for ingest, copy and move is the best approach rather than using hot codes.
It's possible to create a folder path using hot codes, but it's a complicated way to do it. Personally, I think hot codes work best when, for example, you're using a folder name to trigger the completion of multiple IPTC fields.

Offline ejhutch

  • Member
  • **
  • Posts: 54
    • View Profile
Re: Hotcode Code Generator for the same variable in more than one namespace
« Reply #4 on: December 23, 2025, 07:27:00 AM »
I think you understand correctly.  However I'd suggest that creating snapshots seems to be best if you want to easily change Destination Folder ROOT paths for the Primary and Secondary Ingest Destination Folders.  Hotcodes may be better for automatically populating the Folder Name field under Copy Photos: when "into folder with name" is selected. It seems to really depend on what you want to do.

Still, I think it would make sense if code generators for a single variable could be different in more than one namespace.  Though I'm not sure if the fact that they seem not to be able to be different across namespaces is a bug, an intentional design decision, or some other reason.

Does anyone know if this is intentional behavior for code generators?

Thanks!