Cycling74 / min-devkit

Tools, documentation, and reference implementation of a Max Package built using the Min-API.
MIT License
161 stars 31 forks source link

Question: retrieve Package path #176

Closed omarcostahamido closed 3 years ago

omarcostahamido commented 3 years ago

Question: how can I retrieve the directory path of the max package? I need to access some files that I include in this package folder directly from within an external.

omarcostahamido commented 3 years ago

ok, so I found this: path p { path("fileinmypackage.extension") }; Not sure it is the most elegant way to do it.

robtherich commented 3 years ago

seems like a fantastic way to do it.

omarcostahamido commented 3 years ago

haha, thx @robtherich I guess this is good enough, then.

jeremybernstein commented 3 years ago

Also note that there's an undocumented path prefix called ... Package:/, so for instance, passing Package:/Mira to absolutepath or conformpath will result in "HD:/Users/uname/Documents/Max 8/Packages/Mira" on my machine. I am not a min-sdk expert, I don't know if you can pass this type of path into path(), but I thought I'd mention it.

omarcostahamido commented 3 years ago

@jeremybernstein thank you so much for this secret hint. This was just what I needed!