MetaData_Analayse not executed if directly print from slicer with autostart

The CostEstimation-Plugin needs the analyse-section from the .metadata.json (filament for cost-calculation), but these values are not created if you print directly from the slicer.
After upload the print starts immediately. When you press pause or cancel, then the METADATA_ANALYSIS_FINISHED-Event is fired and the values are there.

Is this behaviour on purpose? Is there a way to trigger the analyse manually?

I think that is intended, analysis to not happen while printing is ongoing. I know that @fieldOfView adds into the Cura plugin checks against PrintTimeGenius to manually start the print after analysis is completed. That of course doesn't help with the PrusaSlicer/SuperSlicer crowd, etc. I think there is a way in which to force it from the plugin side, but it risks performance related issues if it's intensive analysis I would think. That being said, this is how I did it...

Hi @jneilliii,
thanks for the hint.

I looked into the Cura-Plugin and found where the check is done:

Maybe @fieldOfView can add OctoPrint-CostEstimation-Plugin, so that I can close my ticket (a little bit): No cost estimation when printing from Cura Β· Issue #9 Β· OllisGit/OctoPrint-CostEstimation Β· GitHub

Maybe the other slicers could add such feature as well.

And (maybe more important): Inspired by the Cura-Sourcecode I executed the api/settings-API and found this response:

  "gcodeAnalysis": {
    "runAt": "idle"

In OP-Sourcecode there is a comment about the possible values: # 'never', 'idle', 'always'...and the UI is found in Settings / Features:

YES, changed to always and it worked!!!!!

Thanks a lot, you're the best!

1 Like