Free Support Forum -

How to set manually task_code for primavera xer file in aspose tasks using Java

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 */
						  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());
				 PrimaveraSaveOptions options = new PrimaveraSaveOptions();
	 path +"/"+"acual-"+planFile.getName() , options);

please share any sample code that i can set task_code for specific task only.


We need to further investigate this on our end regarding possibility for setting task_code task-wise. A ticket with ID TASKSJAVA-1255 has been created to further investigate this on our end. We will share the feedback with you as soon as the issue will be fixed.

Thank you for your reply. please try to solve it soon. Because My client wait to finish this feature of export XER file from our CRM System.


We will share the good news with you as soon as the issue will be fixed.