Hi Zhencheng,
<span style=“font-size: 9pt; font-family: “Courier New”;”>Project asProject = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new <span style=“font-size: 9pt; font-family: “Courier New”;”>Project(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Empty_Project.mpp”<span style=“font-size: 9pt; font-family: “Courier New”;”>);
com.aspose.tasks.Task asTask = asProject.getRootTask().getChildren().add(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Task1”<span style=“font-size: 9pt; font-family: “Courier New”;”>);
com.aspose.tasks.Task asTaskSub1 = asProject.getRootTask().getChildren().add(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Task1-sub1”<span style=“font-size: 9pt; font-family: “Courier New”;”>);
Date dateTaskSub1 = <span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>new <span style=“font-size: 9pt; font-family: “Courier New”;”>SimpleDateFormat(<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:green”>“MM/dd/yyyy
HH:mm:ss”<span style=“font-size: 9pt; font-family: “Courier New”;”>).parse(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“1/5/2004 08:00:00”<span style=“font-size: 9pt; font-family: “Courier New”;”>);
asTaskSub1.set(Tsk.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>DURATION<span style=“font-size: 9pt; font-family: “Courier New”;”>, asProject.getDuration(<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:blue”>1<span style=“font-size: 9pt; font-family: “Courier New”;”>, TimeUnitType.<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:#660E7A”>Day<span style=“font-size: 9pt; font-family: “Courier New”;”>));
asTaskSub1.set(Tsk.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>START<span style=“font-size: 9pt; font-family: “Courier New”;”>, dateTaskSub1);
asTaskSub1.outlineIndent();
com.aspose.tasks.Task asTaskSub2 = asProject.getRootTask().getChildren().add(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Task1-sub2”<span style=“font-size: 9pt; font-family: “Courier New”;”>);
Date dateTaskSub2 = <span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>new <span style=“font-size: 9pt; font-family: “Courier New”;”>SimpleDateFormat(<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:green”>“MM/dd/yyyy
HH:mm:ss”<span style=“font-size: 9pt; font-family: “Courier New”;”>).parse(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“1/6/2004 08:00:00”<span style=“font-size: 9pt; font-family: “Courier New”;”>);
asTaskSub2.set(Tsk.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>DURATION<span style=“font-size: 9pt; font-family: “Courier New”;”>, asProject.getDuration(<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:blue”>4<span style=“font-size: 9pt; font-family: “Courier New”;”>, TimeUnitType.<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:#660E7A”>Day<span style=“font-size: 9pt; font-family: “Courier New”;”>));
asTaskSub2.set(Tsk.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>START<span style=“font-size: 9pt; font-family: “Courier New”;”>, dateTaskSub2);
asTaskSub2.outlineIndent();
asProject.save(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“output.mpp”<span style=“font-size: 9pt; font-family: “Courier New”;”>, SaveFileFormat.<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:#660E7A”>MPP<span style=“font-size: 9pt; font-family: “Courier New”;”>);
Hi Kashif,
(Sorry, previous message was posted while logged in with the wrong account)
Hi Zhencheng,
Hi kashif,
Hi Zhencheng,
The issues you have found earlier (filed as TASKSJAVA-219) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.