Although robotics based flexible automation is an intriguing prospect for small to median enterprises in the era of the global competition, the complexity of programming remains one of the major hurdles limiting its applications. This paper presents an automated offline programming (AOLP) method to address this issue. AOLP is software that automatically plans and programs for a robotic welding system with high Degree of Freedoms (DOFs). It takes CAD model as input, and is able to generate the complete robotic welding code without any further programming effort.