import FreeCAD as App
import FreeCADGui as Gui
import Draft
import json

sequence_file = 'path_to_sequencesjson'

def load_assembly_sequence(filepath):
    with open(filepath, 'r') as file:
        sequences = json.load(file)
    return sequences

print(load_assembly_sequence(sequence_file))


sequence = load_assembly_sequence(sequence_file)['sequences']

for part in sequence:
    _layer = Draft.make_layer()
    App.ActiveDocument.recompute()
    _layer.Group = App.ActiveDocument.getObjectsByLabel('part')
    
    
