Creare una struttura di scomposizione del lavoro (WBS) con Python

This short tutorial explains how to create a work breakdown structure (WBS) using Python. It will provide details on how to set up the IDE, a list of steps, and sample code to work with MS Project WBS using Python. You will receive information to improve the provided code in order to create a customized output MPP.

Passaggi per creare un WBS con Python

  1. Configure the IDE to work with WBS using Aspose.Tasks for Python via .NET
  2. Set the product license and create an empty project.
  3. Define a custom WBS code format using the class object WBSCodeDefinition
  4. Add a mask for the WBS code to set the numbering format for each level.
  5. Aggiungi più attività con una gerarchia definita
  6. Recalculate the project to regenerate the WBS code according to the defined configuration.
  7. Save the project with the defined WBS code format.
  8. Reload the project to read the WBS structure inside it.

The procedure above describes how to work with the project decomposition structure using Python. Set the license, create a new project, define a custom WBS code format along with the mask, and add multiple tasks with a given hierarchy. Recalculate the project to update the WBS codes, save the project, and reload it again to read the WBS structure of all activities in the project.

Code to build a work decomposition structure with Python

Questo codice dimostra come creare una struttura WBS usando Python. The output MPP file can be protected using the MPPSaveOptions property.password_di_protezione, aggiungendo codici di outline personalizzati aggiuntivi accanto al codice WBS, oppure usando i metodi setter di Task.wbs/wbs_level to manually overwrite the automatically generated codes. If you want to use readable alphanumeric codes, try implementing WBSSequence with uppercase or lowercase letters.

This guide explains how to apply work breakdown in a project file. To set a predecessor in a project, refer to the article Set predecessor in MS Project using Python.

 Italiano