joniles / mpxj Goto Github PK
View Code? Open in Web Editor NEWPrimary repository for MPXJ library
Home Page: http://www.mpxj.org/
License: GNU Lesser General Public License v2.1
Primary repository for MPXJ library
Home Page: http://www.mpxj.org/
License: GNU Lesser General Public License v2.1
Hello,
Parsing this basic .xer file (found in simple.xer.zip) using MPXJ leads to an exception:
Reading input file started.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at net.sf.mpxj.primavera.DatatypeConverter.parseUUID(DatatypeConverter.java:59)
at net.sf.mpxj.primavera.MapRow.getUUID(MapRow.java:156)
at net.sf.mpxj.primavera.PrimaveraReader.processFields(PrimaveraReader.java:1438)
at net.sf.mpxj.primavera.PrimaveraReader.processTasks(PrimaveraReader.java:656)
at net.sf.mpxj.primavera.PrimaveraXERFileReader.processTasks(PrimaveraXERFileReader.java:497)
at net.sf.mpxj.primavera.PrimaveraXERFileReader.read(PrimaveraXERFileReader.java:130)
at net.sf.mpxj.reader.UniversalProjectReader.readProjectFile(UniversalProjectReader.java:340)
at net.sf.mpxj.reader.UniversalProjectReader.read(UniversalProjectReader.java:234)
at net.sf.mpxj.reader.UniversalProjectReader.read(UniversalProjectReader.java:139)
at net.sf.mpxj.reader.UniversalProjectReader.read(UniversalProjectReader.java:120)
at net.sf.mpxj.sample.MpxjConvert.readFile(MpxjConvert.java:106)
at net.sf.mpxj.sample.MpxjConvert.process(MpxjConvert.java:84)
at net.sf.mpxj.sample.MpxjConvert.main(MpxjConvert.java:57)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 13 more
The file only contains one task.
I am using MPXJ 7.8.1 to read MS Project file(.mpp). I created a new calendar via copy "24 Hours" as following:
When I use ProjectFile.getDefaultCalendar().getWorkWeeks() to get the workweeks, it returns nothing.
...
UniversalProjectReader reader = new UniversalProjectReader()
ProjectFile projectFile = reader.read(stream)
ProjectProperties projectProperties = projectFile.getProjectProperties()
def calendar = projectFile.getDefaultCalendar()
calendar.getName() + ': ' + calendar.getWorkWeeks()
Output: My Calendar: []
In most files Leveling format is "8" after reading .mpp files from the mpxj pool the format becomes "10".
Hello,
We've discovered a really strange bug where the dates are being imported incorrectly from a Microsoft Project file. Initially, we thought it might a problem with the frontend library, but I can confirm that the dates are being read incorrectly on import.
I've attached some screenshots of the dates in Microsoft Project, and the dates reported in our software after import. I'll be happy to send the file to an email if you need it.
Cheers!
I am able to manage standard fields without problem.
I'm trying to manage custom fields in MPP file.
MPPReader reader = new MPPReader();
reader.setPreserveNoteFormatting(true);
ProjectFile projectFile = reader.read("C:/test.mpp");
TaskContainer tc = projectFile.getTasks();
System.out.println("Number of tasks: " + tc.size());
Iterator<Task> it = tc.iterator();
for (int i = 0; it.hasNext(); i++) {
Task task = it.next();
System.out.println("GTMDATE: " + task.getFinish().toGMTString());
task.setFinish( new Date() );
System.out.println("GTMDATE: " + task.getFinish().toGMTString());
String alias = "Custom Fieldname";
task.setFieldByAlias(alias, "ABCD" );
System.out.printf("%s : %s\n", alias, task.getFieldByAlias(alias));
task.setFieldByAlias(alias, 1234 );
System.out.printf("%s : %s\n", alias, task.getFieldByAlias(alias));
}
The output is always
Number of tasks: 1894
...
GTMDATE: 8 Jun 2018 10:00:00 GMT
GTMDATE: 19 Nov 2018 13:12:28 GMT
Custom Fieldname : null
Custom Fieldname : null
Is this supposed to work?
Hello, I'm trying to extract an MS Word file embedded in an RTF file by using RTFEmbeddedObject.getEmbeddedObjects(String file). The method returns a list with four instances, which is expected. When I check the resulting data array with Apache Tika, it returns the application/x-tika-msoffice mime type, which seems correct.
However, when I try to open the resulting file, it doesn't show the expected result on MS Word. I will attach both files on this issue.
here's the code that I'm using:
`
List<List> rtfl = RTFEmbeddedObject.getEmbeddedObjects(readLineByLine(file));
for(List<RTFEmbeddedObject> l : rtfl){
FileUtils.writeByteArrayToFile(new File
("test.doc"),
l.get(1).getData());
Tika t = new Tika();
String s = t.detect(l.get(1).getData());
System.out.println("Mimetype: " + s);
}
`
Attachments at:
rtfword.zip
Thanks in advance!
The ProjectCalendar() getWork(Date, Date, TimeUnit) method in the C# version of MPXJ appears to be buggy when you have Calendar exceptions with Ranges
For example, if I have a task that's 80 hours that runs from 12/23 - 1/8, but I have calendar holiday exceptions of 12/23 - 12/25 for Christmas and 1/1 for new years day, and I do something simple like:
java.util.Date date1 = new java.util.Date(2019, 12, 23);
java.util.Date date2 = new java.util.Date(2020, 1, 8);
Debug.WriteLine(myProjectCalendar.GetWork(date1, date2, net.sf.mpxj.TimeUnit.DAYS));
It returns 11 days instead of 9 days.
What I believe is happening:
Between 12/23 and 1/8, there's 13 days
The code sees that there's two exceptions, one starting on 12/25, and one only on 1/1 and says 13 - 2 = 11
In reality, I would expect the code to say hey, this exception day starts on 12/25 and continues through 12/27 so that's 3 days, and there's another exception day on 1/1 which is a total of 4 days, 13 total business days - 4 exception days = 9 days of work
Example .mpp file attached where I'm seeing this bug today:
Sample Schedule.zip
Would be great if this could be patched!
My uniqueId is create by the gantt plugin. So, when i am trying to create a projectFile Task passing the uniqueId, the value of my uniqueId is changed, cause of int overflow.
long myUniqueId = myTask.getUniqueId(); // 1544482355525 -> long
ProjectFile project = new ProjectFile();
Task task = project.addTask();
task.setUniqueId((int) myUniqueId);
Hi Jon!
Please look at ActualWork timephased for Res2Material assignment (getting by assignment.TimephasedActualWork) in attachment.
List has 4 TimephasedItem(s). 2,3,4 have incorrect Start and Finish dates (outside of assignment start-finish range)
Hi Jon Iles,
First of all, thanks for your great work building this lib.
I've got a problem reading the Activity Codes(http://www.mpxj.org/apidocs/net/sf/mpxj/Task.html#getActivityCodes--) from a xer file I'm exporting out from P6. The activity codes for all tasks are always coming up as an empty list even though I have activities assigned.
Please find below the xer file I'm playing with:
test.xer.zip
Hi Jon Iles,
First of all, thank for your great lib. I've got a question, I can't find the activity codes linked to the task with the library. Are they available? Or are you planning on exposing them as well?
They contain really critical info for my project.
With kind regards!
Hi,
Is there any reason why writing to XERs is not supported? Is there a license issue or something? It would be really useful!
Happy to contribute to this if required.
Best,
Samir.
I was wondering if the function ProjectCalendar.getDate(Date startDate, Duration duration, boolean returnNextWorkStart) is working correctly. The description states:
It takes account of working hours in each day, non working and calendar exceptions.
I would have thought that the function would not allocate hours for days with DayType.NON_WORKING, it however does allocate hours on non working days in the tests I performed.
I'm trying to read the outline codes - while the outline codes are being read fine, the lookup tables are Not. I've tested this on several MPP files, and have ensured that there are lookup tables present for the outline codes.
My application is .Net, and I'm using MPXJ via IKVM.
Code is below. The outline code names show up, but the lookup table size is 0 everytime.
I've also attached a screenshot from a MPP file - for instance, the custom fields '00:Phase' through '04: Wrong Phase' all show up in the console, but the lookup table size is 0.
private void outlinecodereader(ProjectFile project)
{
foreach (CustomField outlinecode in project.CustomFields)
{
Console.WriteLine("Outline Code Name = " + outlinecode.Alias + "; count = " + outlinecode.LookupTable.size);
}
}
The MSPDI writting works well in Java 8. But in Java10 , there is an exception of ClassNotFoundException caused by the sentense " MSPDIWriter writer=new MSPDIWriter();"
The codes are same, only the jave version is different.
Saving a project with the versions of MSP that contain the June 4th fixes compared to the same release lines of MSP that precede it appear to have enough changes to the task data and meta data records to be causing some significant data corruption.
Reference:
https://support.microsoft.com/en-us/help/4464589/june-4-2019-update-for-project-2016-kb4464589
Although this was an update from a few weeks ago, I believe some of the 'monthly' distribution and update channels from Microsoft are just beginning to push this out to desktops as of the last few days.
These new-version MSP (June+) .mpp files can still be opened perfectly fine by the prior versions (e.g. March release of MSP) and without these issues present, but I guess that's part of the nature of how it reads the OLEDoc format that's different to the expectations that the MPP reader class has.
I plan to get and upload copies of the side-by-side .mpp files from March (good) and June (bad) releases of MSP if that helps, along with their converted-to-xml counterparts.
Sometimes custom fields (mostly populated with lookup tables) are missing when we are reading them from mpp files. (Maybe this was a related issue, but we still have something like this: #38 )
Finally we have some mpps (mpps.zip) to share which contain the following issue:
The 11. task (unique id: 14) in the original mpp (QualityReportTestGIVE) has a value in TaskField Text8.
I deleted the value and saved it as QualityReportTestGIVE_2.
Reading the first version there is no problem (all values are fine). However, reading the second one, Text8 is missing from other tasks as well (unique id: 16 and 15), not just from the one that I modified.
Other interesting fact: when I open the second version in MSP 2013 and save it again (as QualityReportTestGIVE_3) without any modification, then reading the third version, Text8 is OK in other tasks and missing only from the earlier modified task which would be the expected behavior with the second version as well.
Currently used MPXJ version in Java: 7.6.3 (but we had the same experience with earlier versions)
Could it be fixed somehow?
Please let me know if you need further information.
The Activity ID is not being set to the Task object of mpxj when reading from primavera using the PrimaveraXERFileReader class.
The default ACTIVITY IDs in primavera are set as A0001, A0002 etc. When you export a project as P6 XML, you will see that this id of the Activity is set in the id tag.
But when you are reading the Primavera XER file using the mpxj PrimaveraXERFileReader, the Task object's id is set as a sequence (1,2,3 etc). What is the way to get the Activity ID of the project seen in P6? Am using the Task class's getID() API to get this id.
I noticed recently a change was made to account for P6 exception dates being days from 12/30/1899 instead of 1900.
I thought this should fix the issue I'm seeing, but it didn't.
I'm using the 7.0.2 NUGET .NET package, and I have to add 1 day to the exceptions after import to make them match what is found in the P6 client.
foreach (ProjectCalendarException exception in calendar.CalendarExceptions.ToIEnumerable())
{
if (!exception.Working)
{
for (var dt = exception.FromDate.ToDateTime(); dt <= exception.ToDate.ToDateTime(); dt = dt.AddDays(1))
dates.Add(dt.Date.AddDays(1));
}
}
I've tried using the ToDateTime function provided by MPXJ as well as another one I found that does a simple conversion using Year, Month, etc into new DateTime. Both produce the same results.
When I inspect the Calendar object, the Exception shows, for instance, as 2009/12/31 (-6:00), when it should be 2010/1/1.
After I deleted a task and its children in project 2010 or 2013, mpjx will get wrong result.
Distinguish deleted tasks with (flags & 0x02) != 0, seems not right for mpp14.
Using Mpxj 7.6.2 (.net), if I read a .mpp file containing a simple lookup table, Mpxj can view it and extend it in memory with additional lookup values.
Reading an MSP 2016 generated .xml file with the same lookup table, results in saying that the ProjectFile has no lookup table or custom field information values, when opening the same .xml again into MSP 2016 still shows them correctly.
Writing either of these read ProjectFile instances to .xml with MSPDIWriter has the following observations:
SaveVersion is 14
Simplified read/write program:
using System;
using System.IO;
using net.sf.mpxj;
using net.sf.mpxj.mspdi;
using net.sf.mpxj.reader;
namespace mspdi {
class Program {
static void Main(string[] args) {
FileInfo file = null;
if (args.Length == 1)
file = new FileInfo(args[0]);
if (file != null && file.Exists)
ConvertUsingMpxj(file.FullName);
else
ShowUsage();
}
private static void ConvertUsingMpxj(string filename) {
if (string.IsNullOrEmpty(filename)) {
ShowUsage();
return;
}
// If .mpp then lookup table exists, if .xml it does not (even though MSP 2016 shows it when opening the same .xml file)
var reader = new UniversalProjectReader();
var project = reader.read(filename);
Console.WriteLine($"Has lookup table: {project.CustomFields.GetCustomField(TaskField.TEXT1)?.LookupTable}");
// Neither .mpp or .xml as source when written out using MSPDIWriter is having the custom field and lookups in the generated .xml
var writer = new MSPDIWriter {SaveVersion = SaveVersion.Project2016};
writer.write(project, filename + "-converted.xml");
Console.WriteLine("Finished");
}
private static void ShowUsage() => Console.WriteLine("Usage: mspdi [filename]");
}
}
Console output showing detection of lookup table w/MPP reader
D:\Projects\mpxj\mspdi\bin\Debug>mspdi c:\temp\Project2.mpp
Has lookup table: [[CustomFieldValueItem uniqueID=1 guid=0191cf35-78c6-e811-afd5-001fbc126620 parentId=0 value=Yes, [CustomFieldValueItem uniqueID=2 guid=0291cf35-78c6-e811-afd5-001fbc126620 parentId=0 value=No]
Finished
Console output of identical project saved as .xml in MSP (and persists when re-opening in MSP):
D:\Projects\mpxj\mspdi\bin\Debug>mspdi c:\temp\Project2.xml
Has lookup table: []
Finished
Excerpt of resulting .xml file generated by MSPDIWriter:
<ExtendedAttributes>
<ExtendedAttribute>
<FieldID>188743731</FieldID>
<FieldName>Text1</FieldName>
</ExtendedAttribute>
</ExtendedAttributes>
Files used and generated:
project2-before-and-after.zip
Hi Jon,
I'm unsure if this could be a problem or not, at least it looks like this could be a problem.
The following TaskField's are defined twice:
the first time:
mpxj/src/main/java/net/sf/mpxj/common/MPPTaskField14.java
Lines 606 to 608 in bc60764
the second time:
mpxj/src/main/java/net/sf/mpxj/common/MPPTaskField14.java
Lines 996 to 998 in 6416471
I am trying to use MPXJ (Version 7.7.1) to read Primavera project from XER and XML. I found that if a WBS has no activity under it, it is going to be treated as a task. The summary
flag will be set to false
. Also if I try to dump the file using PrimaveraPMFileWriter
, the WBS is going to be dumped as Activity.
I've created a sample schedule to demonstrate this issue. The schedule is created with P6 Professional 18.8 as follows:
This is the schedule dumped as XML:
TEST1.xml.zip
And this is the same schedule being read and dumped from MPXJ using PrimaveraPMFileWriter
:
TEST1.export.xml.zip
I think the cause of this issue is MPXJ only marks tasks with child tasks under it as summary task.
Similar issue is also found with XER file, as it is sharing PrimaveraReader
with XML file.
Could you please look into this issue or provide a work around so that I can distinguish an empty WBS from a task? Thanks.
can i get calendars if i use ruby?JsonWriter doesn`t have writeCalendars()
Hey,
I need help with this issue, when I am trying to read one file with .PP extension in C# doing this:
AstaFileReader reader = new AstaFileReader();
ProjectFile projectFile = reader.read(inputFile);
This error appear
"Can not convert the type 'java.util.PropertyResourceBundle' to 'sun.util.resources.OpenListResourceBundle'."
Maybe I am doing something wrong, could I get help please?
Add multiple front-end tasks to a task, but when project is opened, the front-end task is not displayed, and it is successful if only one front-end task is added.
if (CollectionUtils.isNotEmpty(list)) {
for (PredecessorVO predecessorVO : list) {
net.sf.mpxj.Task target = getMpxTaskByUniqueId(mpxTasks, predecessorVO.getTargetTask());
Duration lag = Duration.getInstance(predecessorVO.getLag().getDuration(),
predecessorVO.getLag().getUnits());
mpxTask.addPredecessor(target, predecessorVO.getType(), lag);
}
}
Hey Jon,
I finally got around to forking and building this awesome project (jar and .NET).
The reason I did it was to debug some performance issues I am having. Basically I have a huge client XER (350mb) that is taking ~2 hrs to process.
I discovered that the UDF processing is taking about 95% of that time, due to there being ~3 mil UDF rows. Commenting out the loop in PrimaveraReader.getContainerUDF() takes that 2 hrs down to 4.5 min. That method is called in two places and it's exponential based on the number of UDF rows.
I can keep my fork and leave it commented, since I don't need UDFs at this time, but thought you might like to know. I'm not too familiar with Java, but some type of Dictionary with O(1) lookup (Map<int, List> maybe?) might be a good candidate for storing the UDF rows by ID?
Thanks!
It's copied from: https://sourceforge.net/p/mpxj/bugs/322/
(This is a major Bug for us.)
ResourceAssignment::getTimephasedActualWork() returns incorrect values when read from mpp (Project 2013). From xml it is fine. Tested with mpxj version 7.1.0. (getTimephasedWork() seems also wrong)
For example see attached mpp, task: "FixUnit50".
Use case: In the mpp we had tasks with different completion and types. Then I added an exception to the standard calendar. TypesWithException.zip
More example with attached mpp. In task "ExceptionMerges" assignment with "Merge4" getTimephasedWork() has returning incorrect values. Tested with mpxj 7.0.2 & 7.2.1.
ScheduleAdv.zip
I am setting the project header comments using ProjectProperties.setComments() method. But, when I write the ProjectFile into xml using MSPDIWriter.write() method, it's not writing the comments field as it's not being taken care of in MSPDIWriter.writeProjectProperties(). Can we fix that?
The XML generated from MPP (using last version of MS Project) cames with empty section directly inside the Project tag.
If we look the XML generated by MS Project for the same gantt, it has 80 lines between and tags, corresponding to the extended attribute which we configured in MS Project, plus 10 blocks with the following form (Duration1 to Duration10):
<ExtendedAttribute>
<FieldID>188743783</FieldID>
<FieldName>Duration1</FieldName>
<Guid>000039B7-8BBE-4CEB-82C4-FA8C0B400067</Guid>
<SecondaryPID>255868968</SecondaryPID>
<SecondaryGuid>000039B7-8BBE-4CEB-82C4-FA8C0F404028</SecondaryGuid>
</ExtendedAttribute>
which we didn't configure.
Also, the XML from MPXJ has no tag inside , while it do comes in the XML generated with MS Project.
There's no problem when we try with any MPP generated with older versions of MS Project.
This same issue was created on SF.net (https://sourceforge.net/p/mpxj/bugs/337/), but seems to be more activity on GitHub
We're using the 7.9.3 version.
Hey there,
Just found what I believe to be a new issue - we use MS Project 2010 files where I work, and I'd like to use your library, but I seem to have an issue with subprojects
To better explain -- from time to time, we will have one "macro" schedule that has many sub "micro" project schedules embedded into it
But in .NET / C#, when I use Task.SubProject.FullPath, sometimes it misses subprojects that are definitely linked (I have 1 macro schedule with 11 micro schedules attached as subprojects), and other times it's grabbing subprojects that aren't actually subprojects at all but successor or predecessor references to other .mpp files (just because their a successor or predecessor doesn't mandate them being a subproject)
Ultimately the field I'm trying to get at is "Subproject File" which is a native field in MS Project 2010, not even a custom field, and it doesn't appear that I can get this information today (screenshot of native field attached today)
After further reviewing this issue - while the predecessor/successor issue still appears to be an issue, the other reason I wasn't seeing some actual subprojects was because they were added as "read only" inserted projects per the "Indicators" column, screenshot below --
I'm able to see everything without the red ! point, but all the red ! is indicating is that they were added as read only, so I would think I should still be able to get the "Subproject File" name
7.6.x - 7.9.2 inclusive
Seems to be at least any 2016-2019 standard or pro
When importing an .xml into MSP and saving it as .mpp, if there were lookup values on columns (e.g. Text1) for rows that had not been visibly shown on a view prior to saving it and reading it with MPXJ, it seems it stores the lookup data in a different place within the .mpp file and causes MPXJ to read garbage characters from something else instead.
package com.regoconsulting.mpxj;
import net.sf.mpxj.MPXJException;
import net.sf.mpxj.ProjectFile;
import net.sf.mpxj.Task;
import net.sf.mpxj.reader.UniversalProjectReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws MPXJException, IOException {
if (args.length > 0)
ReadTaskLookupValues(args[0].startsWith("com.rego") ? args[1] : args[0]);
}
private static void ReadTaskLookupValues(String filename) throws MPXJException, IOException {
UniversalProjectReader reader = new UniversalProjectReader();
ProjectFile project = reader.read(filename);
for (Task task : project.getTasks()) {
System.out.println(task.getName() + ": " + task.getText(1));
}
}
}
D:\mpxj-test>java -classpath out\production\mpxj;lib/* com.regoconsulting.mpxj.Main c:\temp\TaskLookupValuesFault.mpp
Project1: null
Task1: ???????????
D:\mpxj-test>java -classpath out\production\mpxj;lib/* com.regoconsulting.mpxj.Main c:\temp\TaskLookupValuesFixed.mpp
Project1: null
Task1: Just
Due to the non-ascii / non-printable chars it just shows ???? but in a non-ascii (e.g. Unicode) aware display it shows this instead, in case it "helps" with identification of where the funky data was being pulled from:
Both projects to have had the same output (e.g. "Just" for Task1).
Aside from saving-as xml/mpp a couple of times, which seems to force MSP to "read" the lookups data in a way that influences how it then stores the view/lookup/task data back into the MPP later on, it's also possible to workaround by ensuring that Text1 is added to the view inside MSP and showing for every row that has a value before saving it.
I guess in both ways, we're forcing MSP to have to acknowledge and read the data in a way that alters how it then saves it again, otherwise the place or ordering in the file for where it stores that data will be elsewhere and MPXJ picks up something else.
Here's the examples I used for the code and results above; I created this project and task manually in the MSP UI - there's nothing special about their generation. I include the original .xml used to import as a new project, and then the subsequent saves of that file to get the bad and good .mpp's to demonstrate with.
The conversion from elapsed days to days is incorrect, first the minutes are calculated based on a 24 hour clock and then the conversion back is done based on minutes per day which is hardcoded to assume that there are 8 hour days.
Example:
If you have 1ed it is first converted to 1440 minutes and then when it's converted back with the 8 hour day it's converted to 3d.
The project LICENSE file is LGPL-2.1 and the license headers on the *.java source files are LGPL-2.1. However, the maven/pom.xml incorrectly identifies those licenses as LGPL-3.0
The website cannot be opened.
Hi, is the library supporting writing detailed timephasedwork when writing to ms project's xml file ?
What's missing from this code ?
https://gist.github.com/martinm1000/08f020407c8ca83e61e94289ac3d48ec
I don't see the detail of day by day entries to the assignation. (and I can't find much code on the web for that).
Not sure if I'm doing correct, but looks currently mpxj doesn't support to import the project date/time format via MPPReader.read API? Looks projectProperties.getDateFormat()
always returns 20
, while projectProperties.getTimeFormat()
always returns 0
.
Any plan when we're gonna support to import the project date/time format?
The LINK table can contain references to TASK, MILESTONE and TASK_COMPLETED_SECTION tables in the START_TASK and END_TASK fields. The TASK_COMPLETED_SECTION references are currently ignored, resulting in missing predecessor relationships for completed tasks.
Your work is very great!
I found a small issue in the source code: line 462 in the file "mpxj/src/main/java/net/sf/mpxj/mpp/MPP8Reader.java", the code is "taskExtData = new ExtendedData(taskVarData, getOffset(data, 312));"; here the parameter "312" seems incorrect, after testing it, i think this parameter should be 362, do you agree?
MPXJ 7.6.0 (net.sf.mpxj-for-vb)
"WORK" net.sf.mpxj.resource.type is returned for material resources .
The method Task.getRecurring()
is returning true
only for the recurring summary task (the task with the recurrence configuration).
I need to differentiate a recurring task from a non-recurring task in this example:
https://sourceforge.net/p/mpxj/bugs/296/attachment/nonrecurring.mpp
During the import of a Microsoft Office Project 2003 file, the WBS of tasks are read correctly until the yellow part, after that they all WBS are null, I am using mpxj-for-csharp 5.1.9 to import the mpp file:
I can't share the project file I have, due to confidentiality, I can of course try to replicate it in a different project file. I hope the image above gives you enough information. If not, let me know how I can help you further pinpoint the issue.
Hi im syafik
How to find this PrimaveraP6 Attribute from .xer file
1.Performance % complete
2.Schedule Performance Index
3.Cost performance index
4.Planned value cost
5.Earned value cost
thank you
Hi,
I use the java version and this is reproducible using 7.2.0 and 7.2.1
I have a use case where I need my users to populate a field using a lookup (Reporting Flag), when I try to parse and read the content of the file, I am not able to read the values for the custom column (I get null).
I am able to read 'simple' custom columns where the value is a string (Overall Rag)
Below is a small code snippet to reproduce the issue, please find a screen shot of the file in the attachment. Reporting Flag has a lookup of values (Flag1, Flag2, Flag3 ...).
I am not able to attach the mpp to github, but let me know if you want me to send it by email.
import net.sf.mpxj.CustomField;
import net.sf.mpxj.ProjectFile;
import net.sf.mpxj.Task;
import net.sf.mpxj.mpp.MPPReader;
import net.sf.mpxj.reader.ProjectReader;
import java.nio.file.Path;
import java.nio.file.Paths;
public class CustomFieldsMain {
public static void main(String[] args) throws Exception {
Path path = Paths.get("path to the file", "Project-1.mpp");
ProjectReader reader = new MPPReader();
final ProjectFile projectFile = reader.read(path.toFile());
// print custom fields values for task# 1
final Task task = projectFile.getTasks().getByUniqueID(1);
System.out.println(task.getName());
for (CustomField customField : projectFile.getCustomFields()) {
System.out.printf("%s : %s\n", customField.getAlias(), task.getFieldByAlias(customField.getAlias()));
}
}
}
Hi,
I have a XER file that I imported to my trial version of Primavera P6. Here is an screen shot of one of the activity's assigned resources:
As you see I have 14 resources in Primavera but when I watch it in Visual Studio I have 13 resources:
Well I guess it has problem with duplicate assignment of same resource(I marked in the first screen shot).
Am I right? Is there any way to get all 14 resources on C# side?
I love your library!
I am wondering if you might be open to exposing some of the IDs when reading XER files.
The two I'm currently interested in are the Relation ID (integer) and the Project ID (integer).
I believe that would be adding "task_pred_id" to processPredecessors() and exposing "proj_id" in project properties.
It would be useful for tying back to the data source for BI.
Thank you for the work you put into this great library. I would be happy to fork and contribute if I knew how the java -> C# build was done.
This class is not setting the Data date / Status date which is set in the Project Properties.
I am able to read values from MPP, but and publish it in my local machine, but while publishing in a different laptop got error "System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified."
Did I miss something to add while packaging.
any help will be highly appreciated.
@joniles How you are testing reading of MPP files? Do you have some repository with mpp samples which is used to check mpjx reading?
When there are no Predecessors of a task
, task.getPredecessors
throws a NullPointerException.
One might expect instead an empty list.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.