Skip to content

File Grid

George Joseph edited this page Oct 20, 2019 · 1 revision

Derived from Element -> Panel -> Grid.

A File Grid is a form of Grid specialized to display and allow printing of files. Basically, it's a grid of Buttons. When you click the button, that file will be printed. A better way to print files would probably be with a File List but if you have a small set of files you print often, like calibration prints, a file grid could be useful. NOTE: There's no confirmation. When you click the button, the file will print.

{
	/*
	 * All attributes of Element, Panel and Grid apply here
	 */

	"type": "file_grid",

	/*
	 * What directory should the files be retrieved from?
	 * If you have lots of files that you'd like to
	 * display in groups, put them in sub directories
	 * and just display that directory.
	 */
	"directory": "/gcodes",
	/*
	 * The "element_configs" array is automatically filled
	 * based on the files in the directory.
	 */

	/*
	 * You can sort them based on the "file"
	 * name which would include any "XX_" prefix
	 * or you can sort them based on the "label"
	 * after any of the following transforms are done.
	 */
	"sort_autofill": "file",

	/*
	 * For the label, you can strip the directory
	 * off the front, any "XX_" prefix from the
	 * front, and any ".g" or other suffix from the
	 * end.
	 */
	"strip_directory": true,
	"strip_prefix": true,
	"strip_suffix": true
}

Clone this wiki locally