@dutt.thakar
Decide on how much you need to automate in the drawing. If you are just doing one model you can leave the template alone and automate the scale, position, parts list and notes and save as method for each variant.
Decide if you want to run the rule on an internal rule or external rule from the drawing or from the model.
There is a difference depending on your workflow. Use internal if your rules are only for one model/drawing.
The approach I took was to take one piece at a time and write one rule per function and set the rules up to work in the drawing. Say automate notes. Create note and save to symbols then automate this. Next parts list,etc.
Then create one rule and run all the individual rules from here.
For a complete solution all the elements would then be combined in a rule run from the model. This is slightly more complex and I have yet to automate this.
@Anonymous provided a link to a blog post earlier. Here is a the drawing automation handout PDF that the blog post is based on. It gives a sample code. If elements are too complex just extract headings/ keywords etc and search for forum topics that describe how they are implemented.
https://www.autodesk.com/autodesk-university/class/Taking-It-Next-Level-Drawing-Automation-Inventor-2018#handout
Hope this helps.
Alan
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan