Dynamo Code for Schedule and quantity

Hi there

I have a question about getting Quantity take-off by using dynamo for some fixed items, I always taking quantity for all the elements in revit like Walls, lighting fixtures, ducts, cable trays… and for all of these ones I get these items for take-off ( Family, types, levels, marks, descriptions…). I am wondering how Can I find a way to generate a code which is a part of daily task and i need to repeat it again and again and i’m looking for a code to be flexible to change or add any items as needed.
I don’t know where should I start to run this code !

Has anyone suggest a good idea for generating code ?

Thank you for your support everyone !