I made a model with the model-builder which create a grid with its height- and width-size dependend on the size of a certain map in a certain print-layout. It allready works fine. But that for I need to feed my model by hand with the scale of that certain map. But it would be so wow, if the scale would adapt automatically to the scale of that map in the print-layout.
Of course I looked as far as I can in the internet: The only hint i found was this: How to Access the Current Value of the Scale Factor of a Map as a Variable (eg $map_scale) in Print Layouts in QGIS So it would be something like this map_get(item_variables('MapABC'),'map_scale')
Is it even possible to access the scale of a map in a certain print-layout from without the print-layout-composer? Maybe even from the model-builder? And if yes, how do i manage to point to a specific map in a specific print-layout?