Hi @ruban2 .
"Product" was interpreted to mean occurrence or component.
The material name can be obtained in the following way
# Fusion360API Python script
import traceback
import adsk.core as core
import adsk.fusion as fusion
def run(context):
ui = core.UserInterface.cast(None)
try:
app: core.Application = core.Application.get()
ui = app.userInterface
des: fusion.Design = app.activeProduct
root: fusion.Component = des.rootComponent
for occ in root.allOccurrences:
app.log(f'{occ.name} --> {occ.component.material.name}')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
However, if there are several bodies with different materials in one component, you will not get the correct result.
If you want to get the correct result, you need to refer to the material property of the body.