Create hotkey in bpatcher to open referenced .maxpat

Matt Romein's icon

I'm working on a larger scale video processing system using bpatchers for each of the different stages of the signal flow. Once I realized how often I was going back each patch to alter the presenation settings and send and receives it made sense to try and create a hotkey in the bpatcher that brings up the .maxpat file attached to it. I attempted this using pcontrol on the top level patch until I realized it was creating two versions of each patch (the one attached to pcontrol and the bpatcher). So obviously this idea doesn't work.

Is there an elegant solution to this? I suppose maybe I could query the actual bpatcher object from the top level patcher for the .maxpat attached to it and use a series of sprintfs to create a message that opens the patch but that would create a lot more stuff to hide in the top patch, which I'm trying to keep as clean as possible.

Attached is an example of my original thought process

bpatcher-test.zip
zip
Matt Romein's icon

NVM figured out the solution and it's pretty absurdly simple. Using the load message with pcontrol opens the named .maxpat. Not sure why I didn't get that but I think I was assuming that the solution lay in using the open message and that the load message functioned in a different way then it actually does. Attached is the solution.

bpatcher_test_fixed.zip
zip