The invention relates to a method for automatically breaking and grouping pipelines, which is characterized in that the pipeline breaking and grouping processes are automatically completed by using a plug-in, the operation efficiency is greatly improved, and after the automatic pipeline breaking is completed, a user can adjust the pipelines, maintain the original grouping scheme after the adjustment, and group the pipelines, flanges and other
pipe fittings. Comprising the steps that all pipelines in a link are traversed, and if the length of the current pipeline in the link exceeds a length constraint, the current pipeline is broken into groups; if the length of the current pipeline is smaller than the length constraint, the current pipeline and the next adjacent pipeline are regarded as a whole, when the equivalent length of the whole in the length direction and the width direction meets the constraint, the whole serves as a grouping unit, and when the equivalent length of the whole in the length direction and the width direction does not meet the constraint, the last pipeline in the whole is
cut off; and interrupting schemes of all links are calculated, and the scheme meeting the requirements is selected as the optimal scheme.