Looking for context variable documentation

What is the problem?

I'm trying to write a custom GCODE script and access the build volume height using context variables, yet I can't find full documentation on what is available for the print_profile context variable.

What did you already try to solve it?

I see in https://docs.octoprint.org/en/master/features/gcode_scripts.html#context that the variable printer_profile is what I would use for the build volume, but I have yet to find any documentation of all the different parameters available. (Or is the proper term methods, what I mean are the terms after period(s) in the extended context variable name). For example in the documented default for the disable_hotends snipped I see printer_profile.extruder.count used, yet if I follow the link for printer_profile I don't see any documentation for the extruder attribute (method?).

Is there more complete documentation for, specifically, the printer_profile context variable that I haven't found yet?

Additional information about your setup

Octoprint Version 1.4.2
OctoPi Version 0.17.0, running on Raspberry Pi 4 Model B Rev 1.1

Currently undocumented. No one has yet volunteered to go through the source and document it, and there are more pressing issues.

Spent a couple of minutes reading the source, found an example of a printer profile that should help:

2 Likes

Thanx for the prompt reply. I think I figured out that I need printer_profile.volume.height based on the code snippet that you linked. I don't think I would have ever found that in the codebase, I wouldn't even know where to look.

1 Like