Questa guida rapida spiega come aggiungere una milestone in MS Project usando Java. You will get details on setting up the IDE, a list of programming tasks, and a code example that demonstrates how to convert a task into a milestone in MS Project using Java. Some customizations will also be discussed to create the desired output file MPP with the milestones inside.
Passaggi per inserire una milestone in MS Project usando Java
- Set the IDE to use Aspose.Tasks for Java to create milestones.
- Apply the product license to implement the desired functionality without a watermark.
- Load the existing MPP project file into memory.
- Add a new activity titled milestone to the root activity in the uploaded project.
- Imposta la durata dell’attività a zero e il flag di milestone a true
- Set the new task calendar to the project’s default calendar.
- Set the milestone activity start date to the event occurrence time.
- Save the updated project with a new milestone to disk.
Questi passaggi riassumono come creare una milestone in MS Project usando Java. Apply the product license, load the project file into memory, add a new task for the milestone, set its duration to zero, and set the IsMilestone flag to true. Set the task calendar to the default calendar in the loaded project, set the milestone task’s start date to mark the event occurrence date, and save the output Project file.
Code to add a milestone to MS Project using Java
This code example demonstrates how to set a milestone in MS Project using Java. If you want to be notified of a milestone delay, set a deadline for the milestone. To have more rigorous control over the task, you can set a constraint type and a constraint date.
Questo tutorial fornisce indicazioni su come lavorare con le milestone in un file MS Project. To add recurring tasks in an MPP file, refer to the article Add Recurring Task in MS Project using Java.