Aspose task auto set task_code in XER file start with A1000. But i want set task_code manually. i try to used PrimaveraSaveOptions
but It is working for all Tasks. but My requirement is that to set task_code task vise. PrimaveraSaveOptions
class not provide any methods for set task_code for any specific task.
A Sample code show as per under.
Project asposeProject = new Project("/home/sample.xer");
// Reading project from primavera XER
TaskContainer tasklist = project.getTasks(); //Here,task container will store all the project's task
/*This will iterate through all the task in tasklist */
asposeMap.entrySet().forEach(task->{
Activity act = idToActivityMap.get(task.getKey()); //It will get each activity from map by passing task id
Task t = task.getValue();
t.set(Tsk.NAME, act.getName());
if(Objects.nonNull(act.getTrackingQuantityCurrent())){
t.set(Tsk.PERCENT_COMPLETE,Integer.valueOf(Math.round(act.getTrackingQuantityCurrent())));
}
});
PrimaveraSaveOptions options = new PrimaveraSaveOptions();
options.setRenumberActivityIds(false);
asposeProject.save( path +"/"+"acual-"+planFile.getName() , options);
please share any sample code that i can set task_code for specific task only.