Lattice structures normally have slender members and light weight, high flexibility and small damping ratios. Hence, their structural behavior may be affected by the geometric nonlinearity and they are prone to large displacements and safety issues due to wind loads. Optimal design of such nonlinear and flexible structures is difficult and complicated. This paper presents an automatic optimizing flow for the integrated wind-induced response analysis and wind-resistant optimal design of linear and non-linear lattice structures based on the modified Optimality Criterion (OC) algorithm. The method for structural dynamic analysis and wind-induced response of lattice structure is developed by combining Proper Orthogonal Decomposition (POD) with Load Dependent Ritz (LDR) vector method, together with the Harmonic Excitation Method (HEM) and Load Response Correlation (LRC) method. Meanwhile the quadratic programming method is used to evaluate the Lagrange multipliers in the modified optimality criterion method. Based on the derived design sensitivity analysis results for the nodal displacements, element stresses and nonlinear critical load factor of linear and nonlinear space frame structures in a companion paper, an automatic optimizing flow is then established by adopting the Application Programming Interface (API) of SAP2000 to integrate the wind-induced response, design sensitivity analysis and wind-resistant optimal design of space frame structural system. The proposed automatic optimizing flow is then applied to the optimized process of a lattice structure under dynamic wind loading. It is found that for the lattice structure, the geometric non-linear analysis and the constraint of nonlinear critical load factor need to be considered in their optimization, meanwhile updating on the time-history of wind loads and Equivalent Static Wind Loads (ESWL) is necessary as result of the variations in the design member size during the optimization process. It is also found that the maximum displacement constraint is the most important factor in the optimization of the lattice structure and maximum stress of structural elements are normally found to be inactive constraints during the optimization procedure. In the case that a low limit for the maximum displacement is pre-set, the nonlinear critical load factor becomes the important constraint. Optimized results from this study would be helpful to those involved in wind resistant analysis and optimization design research for such lattice structures.