Referencing macro in current filament's directory?
-
Hi,
I'd like to have the ability to define some new macros on a per-filament basis. I don't see the specific filament in the object model, but even if I did I'm not sure how I would structure a call to use it.
Can someone give me an example M98 that would reference a file "foo.g" in the current filament directory?
Thanks!
-
@paralepsis The structure is like this.....
M98 P"foo.g" will access a macro in the /sys folder (not something that many people do)
M98 P"0:/macros/foo.g" will access the macro if it's in a folder called "macros" which is in the root of the SD card at the same level as /sys
M98 P"0:/macros/filaments/foo.g" will access the macro if it's in folder called "filaments" which is itself a sub folder of "macros".
-
@deckingman understood. What I'm trying to do though is reference a macro inside a specific directory within the filament directory (e.g., "0:/macros/filaments/Overture PETG 20220908/foo.g"), but in a way that pulls the filament directory name from a variable.
Something is doing this to execute the correct config.g from that directory on a M703, but it's unclear how to do this myself...
Thanks!
-
@paralepsis Are you looking for something like this?
M98 P{"0:/filaments/" ^ move.extruders[0].filament ^ "/foo.g"}
-
@chrishamm Yes, I think that might be the magic I'm looking for; thanks!!
-
-