Automation of cross sections

How to do automation for cross sections or is there any program like LISP in AutoCAD? 

Thank you!