Ok step by step I'm closer to my goal to get the Material name I'm using this code :
# add extruder specific data to slice info
extruders = list(Application.getInstance().getGlobalContainerStack().extruders.values())
GetValStr = extruders[0].material.getMetaData().get("material", "")
Does anyone of you knows how to get the Profil name ?
Edited by Cuq
Recommended Posts
gr5 2,224
This is beyond my knowledge but maybe @burtoogle or @ctbeke or @ahoeben can help or at least know who can.
Link to post
Share on other sites
ahoeben 1,981
A printer has one global stack that has common settings, but it typically has no materials. A printer also has one or more Extruder Stacks. You need to get the material from the extruder stack. This might work (but I have not tested it):
There are other settings that you should be getting from the extruder stack too, like material_diameter, material_flow, retraction+*, material_print_temperature, machine_nozzle_size, infill_*, speed_*
There's a lot of code duplication in your script. You don't need to get the global stack over and over again; store it in a variable.
Link to post
Share on other sites
Cuq 205
For the the majority of these parameters ( material_print_temperature, machine_nozzle_size , material_diameter etc ) . GetProperty function retrun the right values.
GetVal = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_size", "value")
But I don't find any parameter for the profil name and the material base.
Doesn't seems to be a valide solution
Link to post
Share on other sites