mpxj-developers Mailing List for MPXJ
Multi platform library to read and write schedule data
Brought to you by:
joniles
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
(2) |
May
(3) |
Jun
(4) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(6) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(5) |
Jun
|
Jul
(20) |
Aug
(12) |
Sep
(3) |
Oct
(1) |
Nov
(6) |
Dec
(5) |
| 2005 |
Jan
(7) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
(4) |
Sep
(5) |
Oct
(4) |
Nov
(1) |
Dec
(6) |
| 2006 |
Jan
(5) |
Feb
(2) |
Mar
(9) |
Apr
|
May
|
Jun
(4) |
Jul
(5) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2007 |
Jan
(10) |
Feb
(22) |
Mar
(9) |
Apr
(3) |
May
(6) |
Jun
(17) |
Jul
(7) |
Aug
(8) |
Sep
(6) |
Oct
(1) |
Nov
(4) |
Dec
(2) |
| 2008 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
(1) |
Nov
(6) |
Dec
|
| 2009 |
Jan
(7) |
Feb
(22) |
Mar
(26) |
Apr
(7) |
May
(5) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
(6) |
Nov
(1) |
Dec
|
| 2010 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(2) |
May
(3) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(6) |
May
(3) |
Jun
(14) |
Jul
(9) |
Aug
(5) |
Sep
(7) |
Oct
(1) |
Nov
(5) |
Dec
(5) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(10) |
Apr
(6) |
May
(8) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(1) |
Feb
(1) |
Mar
(5) |
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
(4) |
Dec
(1) |
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(3) |
| 2015 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2016 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Tiberiu G. <tib...@gm...> - 2021-03-15 09:47:47
|
Hi there, I am trying to detect if an external task is actually a project (to load its content) or a simple task from another project but I am not able to find a method for this... Any "external" or "subproject" related methods do not offer such information. I also tried getSummary as a workaround but it always returns false even for external tasks that represent external projects... I am sure it is a very simple solution to this but it slips through my fingers... Thanks, Tiberiu |
|
From: Jon I. <pac...@go...> - 2019-12-19 16:12:32
|
Hello! As you may be aware MPXJ is presently targeted at Java 1.6. Historically I've held off changes to the minimum version of Java required to allow the library to be used as widely as possible. From September 2018 Apache Poi, one of the main libraries used by MPXJ, has required Java 1.8 so I've been unable to update the version of this library used by MPXJ since then. It would be nice to benefit from new features and bug fixes in more recent versions of Poi, and in the light of vulnerabilities reported for Poi which are unlikely to be fixed in older versions (for example https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12415) now seems to be a good time to move forward and make Java 8 the minimum supported version of Java for MPXJ. Therefore the forthcoming 7.9.8 release of MPXJ will be the last to support versions of Java prior to Java 8. Jon p.s. This change will affect users of the Ruby gem - you'll now need at least Java 1.8 installed. It will not however affect users of the .Net assemblies. |
|
From: Tims C. <tim...@gm...> - 2019-10-17 01:03:38
|
The following works fine from a console app but fails on a backend web application in C# prj = m_reader.read( xer); |
|
From: Tims C. <tim...@gm...> - 2019-10-11 16:21:15
|
Thanks Jon. Is there a way to anonymize the xer? Here's a mangled record with task code "A34000" %F task_id proj_id wbs_id clndr_id phys_complete_pct rev_fdbk_flag est_wt lock_plan_flag auto_compute_act_flag complete_pct_type task_type duration_type status_code task_code task_name rsrc_id total_float_hr_cnt free_float_hr_cnt remain_drtn_hr_cnt act_work_qty remain_work_qty target_work_qty target_drtn_hr_cnt target_equip_qty act_equip_qty remain_equip_qty cstr_date act_start_date act_end_date late_start_date late_end_date expect_end_date early_start_date early_end_date restart_date reend_date target_start_date target_end_date rem_late_start_date rem_late_end_date cstr_type priority_type suspend_date resume_date float_path float_path_order guid tmpl_guid cstr_date2 cstr_type2 driving_path_flag act_this_per_work_qty act_this_per_equip_qty external_early_start_date external_late_end_date cbs_id pre_pess_start_date pre_pess_finish_date post_pess_start_date post_pess_finish_date create_date update_date create_user update_user location_id control_updates_flag %R 617029 16026 212935 14673 0 N 1 N N CP TT DT_FixedDUR2 TK_NotStart A34000 Test Fabrication 28143 -1344 2248 1032 0 73667 73667 1032 0 0 0 2019-08-14 08:00 2020-02-18 17:00 2020-04-14 08:00 2020-10-14 17:00 2020-04-14 08:00 2020-10-14 17:00 2020-04-14 08:00 2020-10-14 17:00 2019-08-14 08:00 2020-02-18 17:00 PT_Normal mcFxPDbOgUa8zq7/rWJ1Aw aKE8zEjenUGY2b9cQiiaOg N 0 0 2019-04-23 17:29 2019-06-05 14:59 Symon(bg) D3C666 N On Fri, Oct 11, 2019 at 1:16 AM Jon Iles <pac...@go...> wrote: > Hi Tims, > > can you send me an example XER file and indicate a couple of tasks I > should look at and the values you'd expect to see in TEXT3 for those tasks? > At the moment we're reading the status_code attribute from P6 to populate > that field. > > Thanks! > > Jon > > On Fri, 11 Oct 2019 at 02:11, Tims Corbett <tim...@gm...> wrote: > >> MPXJ C# XER GetText() returns null though there is a value for it. I am >> looking for "task_code" >> >> PrimaveraXERFileReader reader = new PrimaveraXERFileReader();ProjectFile project = reader.read(xer_file); >> var tasks = project.Tasks;var task = tasks.Get(1);var txt = ((net.sf.mpxj.Task)task).GetText(3); >> >> >> >> _______________________________________________ >> Mpxj-developers mailing list >> Mpx...@li... >> https://lists.sourceforge.net/lists/listinfo/mpxj-developers >> > |
|
From: Jon I. <pac...@go...> - 2019-10-11 08:16:16
|
Hi Tims, can you send me an example XER file and indicate a couple of tasks I should look at and the values you'd expect to see in TEXT3 for those tasks? At the moment we're reading the status_code attribute from P6 to populate that field. Thanks! Jon On Fri, 11 Oct 2019 at 02:11, Tims Corbett <tim...@gm...> wrote: > MPXJ C# XER GetText() returns null though there is a value for it. I am > looking for "task_code" > > PrimaveraXERFileReader reader = new PrimaveraXERFileReader();ProjectFile project = reader.read(xer_file); > var tasks = project.Tasks;var task = tasks.Get(1);var txt = ((net.sf.mpxj.Task)task).GetText(3); > > > > _______________________________________________ > Mpxj-developers mailing list > Mpx...@li... > https://lists.sourceforge.net/lists/listinfo/mpxj-developers > |
|
From: Tims C. <tim...@gm...> - 2019-10-11 01:11:03
|
MPXJ C# XER GetText() returns null though there is a value for it. I am looking for "task_code" PrimaveraXERFileReader reader = new PrimaveraXERFileReader();ProjectFile project = reader.read(xer_file); var tasks = project.Tasks;var task = tasks.Get(1);var txt = ((net.sf.mpxj.Task)task).GetText(3); |
|
From: Christiaan B. <cf...@gm...> - 2019-03-10 11:26:00
|
Good day everyone, I'm trying to get to the time phased data for any project. My problem is, I can get all the tasks, resources, predecessors for tasks, calendars, and task start and finish dates etcetera, but the call for getting the time phased data always returns null for all resource assignments. java.util.List<TimephasedWork> listTimephasedWork = mpxjResourceAssignment.getTimephasedWork(); / results in null Can anyone point me in the right direction to retrieve some structures for time phased work? Is there a call I have to make on the project after I've read the project data to get the mpxj class to build time phased data from the task and calendar info it has first? -- Kind regards Chris Bosch |
|
From: Christiaan B. <cf...@gm...> - 2019-03-10 11:19:03
|
Good day everyone, I'm trying to get to the time phased data for any project. My problem is, I can get all the tasks, resources, predecessors for tasks, calendars, and task start and finish dates etcetera, but the call for getting the time phased data always returns null for all resource assignments. java.util.List<TimephasedWork> listTimephasedWork = mpxjResourceAssignment.getTimephasedWork(); / results in null Can anyone point me in the right direction to retrieve some structures for time phased work? Is there a call I have to make on the project after I've read the project data to get the mpxj class to build time phased data from the task and calendar info it has first? -- Kind regards Chris Bosch |
|
From: Khalid A. <kha...@gm...> - 2018-09-11 18:06:02
|
Dear Respondent, This questionnaire is part of my Ph.D. thesis in the area of Design Smell Prioritization. The purpose of the study is to define a priorities among the classes having detected as God Class in order to decide which class to be repaired first. We analyzed the MPXJ-7.0.2 project and the most important God Classes (Large Class or The Blob) in terms of which of them should be scheduled their reparation in first place. These classes are found in this questionnaire. Completing this questionnaire should take about 5 minutes. I would appreciate your kind attention and cooperation on sending your questionnaire feedback as soon as possible. Notice that all information related to the respondent or contained in this questionnaire will be treated in strict confidence. If you are not currently involved in this project, please forward this message to project members you think are a better target for this questionnaire. Even if you are currently involved in the project, we would appreciated the participation of other project contributors, please resend this questionnaire to them. Survey link: https://docs.google.com/forms/d/e/1FAIpQLSfxAAjlIMaRez6h0Ql59f1vNHeN3e7gpqSnlx5jK9VqaRoong/viewform?c=0&w=1 Thank you in advance. Yours sincerely, -- <http://twitter.com/citiususc> Kha <die...@us...>lid Alkharabsheh LP2 [image: E-mail:] kha...@us... <die...@us...> [image: Phone:] +34 881816474 [image: Website:] citius.usc.es <http://citius.usc.es/> · [image: Twitter:] citiususc <http://twitter.com/citiususc> |
|
From: Jon I. <pac...@go...> - 2018-01-03 12:34:09
|
Hello! Just a quick note to say thanks for your continued interest in and use of MPXJ. The library is 15 years old today: the project was first registered on SourceForge back in 2003. I hope you've enjoyed working with it as much as I've enjoyed writing the code! I've also just released version 7.1.0, which along with bug fixes and minor enhancements, brings support for reading GanttProject files. Enjoy! Jon p.s. drop me a note and let me know how you are using MPXJ! |
|
From: Jon I. <pac...@go...> - 2017-10-15 17:40:17
|
Hello! I don't email this list very often, so I thought it would be nice to get a better idea of who is currently using MPXJ. If you're not on this page: http://www.mpxj.org/users.html and would like to be... drop me a line! Even if you'd prefer not to be on this list, drop me a line to say hi anyway, it's always really interesting to find out how other people are using MPXJ. Cheers! Jon |
|
From: BILLEL R. <bil...@gm...> - 2016-09-16 13:22:19
|
Hello,
I want to add my data (Work and Actual) for Set With using MPXJ.
TimephasedWork w = new TimephasedWork();
w.setStart(Date.*from*(LocalDateTime.*of*(2016,9,1, 8,0).atZone(ZoneId.
*systemDefault*()).toInstant()));
w.setFinish(Date.*from*(LocalDateTime.*of*(2016,9,1, 17,0).atZone(ZoneId.
*systemDefault*()).toInstant()));
w.setAmountPerDay(Duration.*getInstance*(8, TimeUnit.*HOURS*));
w.setTotalAmount(Duration.*getInstance*(8, TimeUnit.*HOURS*));
TimephasedWork w2 = new TimephasedWork();
w2.setStart(Date.*from*(LocalDateTime.*of*(2016,9,2, 8,0).atZone(ZoneId.
*systemDefault*()).toInstant()));
w2.setFinish(Date.*from*(LocalDateTime.*of*(2016,9,2, 15,0).atZone(ZoneId.
*systemDefault*()).toInstant()));
w2.setAmountPerDay(Duration.*getInstance*(6, TimeUnit.*HOURS*));
w2.setTotalAmount(Duration.*getInstance*(6, TimeUnit.*HOURS*));
List<TimephasedWork> works = new ArrayList<>();
works.add(w);
works.add(w2);
ra.setTimephasedWork(new DefaultTimephasedWorkContainer(pc, new
MSPDITimephasedWorkNormaliser(), works, false));
task.addResourceAssignment(ra);
Should create an XML below :
<Assignment>
<UID>7</UID>
<TaskUID>5</TaskUID>
<ResourceUID>7</ResourceUID>
….
<TimephasedData>
<Type>1</Type>
<UID>8</UID>
<Start>2016-03-29T10:00:00</Start>
<Finish>2016-03-30T10:00:00</Finish>
<Unit>1</Unit>
<Value>PT8H0M0S</Value>
</TimephasedData>
//Other TimephasedData
</Assignment>
The code is executed but, it does not work?
--
Cordialement,
*Billel REDOUANE*
Pensez à l'environnement - Devez-vous vraiment imprimer ce message ? … Really
?!
Please consider the environment - Do you really need to print this email?
|
|
From: Jonas T. <jo...@ta...> - 2016-09-09 11:17:00
|
Hello fellow MPXJ users, I get more and more requests to improve the export to MS Project. Most of them can only be solved with the generation of Timephased data. Task splits and recorded work time by resource are my main goals here. MS-Project is picky when the timephased data is not a perfect match to the planned amount of work and the tasks duration. That means when a few recorded work entries are available, that the remaining amount of work needs to be distributed evenly or better according to the specified distribution function. Is there already a method to do so? I didn't see one while having a fast look at the code. If not i would start to write something up and add it to TimephasedUtility.java. Best Regards Jonas Tampier |
|
From: Jon I. <jon...@bc...> - 2016-08-21 13:21:41
|
Hi, I look after MPXJ. If you are re-writing the code, feel free to re-use the symbol names, field IDs, types, location and offsets. It might be worth bearing in mind that you can re-use MPXJ as it is (without translating it to C++) by calling out to the .Net or the Java version from your code and have it generate JSON which you can then consume natively in C++ (this is how the Ruby version works). With Mono, .Net Core and easy availability of the JVM for many platforms this might be a quicker way to get your project working. If the JSON generated by MPXJ doesn't contain the data you need, you could contribute a change back to MPXJ to add the missing attributes. Hope that helps! Jon On 9 August 2016 at 13:13, xonotic nexiuz <xon...@gm...> wrote: > Hello! > > Can anybody help me. I write my own MPP file reader library with Qt and > C++ and want to use same names and for Fields (for example Task Fields like > DURATION_UNITS, STARTS, LEVELING_DELAY, etc.) > Also I want to use same default field IDs, types, location and offsets. > > My library is a part of largre proprietary project. Can I use this names > and values? Will it compatible with LGPL license of MPXJ library? > > ------------------------------------------------------------ > ------------------ > > _______________________________________________ > Mpxj-developers mailing list > Mpx...@li... > https://lists.sourceforge.net/lists/listinfo/mpxj-developers > > |
|
From: xonotic n. <xon...@gm...> - 2016-08-09 12:13:15
|
Hello! Can anybody help me. I write my own MPP file reader library with Qt and C++ and want to use same names and for Fields (for example Task Fields like DURATION_UNITS, STARTS, LEVELING_DELAY, etc.) Also I want to use same default field IDs, types, location and offsets. My library is a part of largre proprietary project. Can I use this names and values? Will it compatible with LGPL license of MPXJ library? |
|
From: Enrico B. <enr...@gm...> - 2016-07-28 20:18:27
|
Hello to all, I'm new to this mailing list. Is possible with MPXJ insert resource usage in a project? I read the doc but i didn't found a solution. Thanks in advance |
|
From: Jon I. <pac...@go...> - 2016-02-08 14:54:43
|
I’m pleased to announce that version 5.2.0 of MPXJ is now available from SourceForge, NuGet, Maven, and RubyGems! - Add support for PP files generated by Asta Powerproject 11, Powerproject 12, Easyplan 2, Easyplan 3, Easyplan 4 and Easyplan 5 - Fix SourceForge issue 285: Unsupported encoding command ansicpg949 - Fix SourceForge issue 288: AvailabilityTable getEntryByDate does not work properly |
|
From: Jon I. <pac...@go...> - 2015-11-16 22:13:12
|
I’m pleased to announce that version 5.1.11 of MPXJ is now available from SourceForge, NuGet, Maven, and RubyGems! - Avoid NPE when writing MSPDI files with timephased data (contributed by Bruno Gasnier) - Improve resource assignment constructor (based on a contribution by Bruno Gasnier) - Improve MPX French translations (contributed by Bruno Gasnier) - Add calendar specific minutes per day, week, month, and year (based on a contribution by Bruno Gasnier) - Add support for reading and writing GUID attribute for PMXML, XER files and Primavera database. |
|
From: Jon I. <pac...@go...> - 2015-11-12 18:45:13
|
I’m pleased to announce that version 5.1.11 of MPXJ is now available from SourceForge, NuGet, Maven, and RubyGems! >From the changelog: - Avoid NPE when reading MPP14 custom properties. - Ensure calculated task attributes are present in JSON output. - Handle MSPDI files written by German versions of Microsoft Project (based on a contribution by Lord Helmchen) - synchronizeTaskIDToHierarchy clears list of tasks - PrimaveraPMFileWriter throws Exception at write(..) - Parent task is always null when reading a Primavera XER file - Ensure that Task.getSuccesors() and Task.getPredecessors() return an empty list rather than null. |
|
From: Jon I. <pac...@go...> - 2015-08-30 15:01:48
|
I’m pleased to announce that version 5.1.9 of MPXJ is now available from SourceForge, NuGet, Maven, and RubyGems! >From the changelog: - Ensure Resource BookingType is read correctly from MPP files - Added basic custom field attributes to JSON output - Added Ruby methods to work with custom field aliases - Fix to infinite loop condition when writing calendar (contributed by lobmeleon) - MPXJ getNotes() API returns garbled value for multibyte characters - Unsupported encoding error when reading resource notes - Incorrect resource types are read (contributed by Colin Rodriguez) - Symmetry between Primavera PM reader/writer (contributed by lobmeleon) - Added UDF support to PMXML file reader and writer(contributed by lobmeleon) - Updated to rtfparserkit 1.4.0 |
|
From: Jon I. <jon...@bc...> - 2015-08-22 14:03:10
|
I have some time tomorrow, I'll take a look and hopefully provide you with pull request or plain diff on GitHub so you can see what I've done. > On 22 Aug 2015, at 14:10, Jonas Tampier <jo...@ta...> wrote: > > Hello fellow MPXJ developers, > > Since I noticed, that several Fields are missing from the > ResourceAssignment (the ones I need are Stop and Resume). I wondered how > one would be able to add these to the code. Currently I am quite clueless. > > If someone could explain how to add a field to the right place and or > reverse engineer other fields correct position, that would not just > enable me to add these two fields, but help in supporting reading the > newer MS Project file formats as well. > > Thanks > Jonas Tampier > > ------------------------------------------------------------------------------ > _______________________________________________ > Mpxj-developers mailing list > Mpx...@li... > https://lists.sourceforge.net/lists/listinfo/mpxj-developers |
|
From: Jonas T. <jo...@ta...> - 2015-08-22 13:28:07
|
Hello fellow MPXJ developers, Since I noticed, that several Fields are missing from the ResourceAssignment (the ones I need are Stop and Resume). I wondered how one would be able to add these to the code. Currently I am quite clueless. If someone could explain how to add a field to the right place and or reverse engineer other fields correct position, that would not just enable me to add these two fields, but help in supporting reading the newer MS Project file formats as well. Thanks Jonas Tampier |
|
From: Jon I. <pac...@go...> - 2015-05-06 21:29:04
|
I’m pleased to announce that version 5.0.0 of MPXJ is now available from SourceForge, NuGet, Maven, and RubyGems! *PLEASE NOTE* There are API changes! In particular the ProjectFile API has changed. Details of the changes are listed in the notes below. >From the changelog: - Added project properties to the JSON output - Added support for project properties to the Ruby wrapper - Added support for reading data from a standalone Primavera P6 SQLite database - Fixed SourceForge #267: XXE security vulnerability - Fixed SourceForge #266: Task Number fields not saved to file if the value would floor to zero - Fixed SourceForge #255: Not all project calendars are read in for Project 2013 files (based on a contribution by Colin Rodriguez) - Renamed TaskContainer class to ChildTaskContainer - Renamed ProjectHeader class to ProjectProperties - Introduced ProjectConfig class - Introduced TaskContainer class - Introduced ResourceContainer class - Introduced ResourceAssignmentContainer class - Introduced ProjectCalendarContainer class - Renamed ProjectFile.getProjectHeader to getProjectProperties - Renamed ProjectFile.getCalendar to getDefaultCalendar - Renamed ProjectFile.setCalendar to setDefaultCalendar - Renamed MppReader.getReadHeaderOnly to getReadPropertiesOnly - Renamed MppReader.setReadHeaderOnly to setReadPropertiesOnly - Renamed ProjectFile.getCalendarUniqueID to ProjectConfig.getNextCalendarUniqueID - Renamed ProjectFile.getResourceUniqueID to ProjectConfig.getNextResourceUniqueID - Renamed ProjectFile.getTaskUniqueID to ProjectConfig.getNextTaskUniqueID - Renamed ProjectFile.getAssignmentUniqueID to ProjectConfig.getNextAssignmentUniqueID - Renamed ProjectFile.getResourceID to ProjectConfig.getNextResourceID - Renamed ProjectFile.getTaskID to ProjectConfig.getNextTaskID - Renamed ProjectHeader.getApplicationName to getShortApplicationName - Renamed ProjectHeader.setApplicationName to setShortApplicationName - Renamed ProjectHeader.setCalendarName to setDefaultCalendarName - Renamed ProjectHeader.getCalendarName to getDefaultCalendarName - Moved ProjectFile.getProjectFilePath to ProjectHeader.getProjectFilePath - Moved ProjectFile.setProjectFilePath to ProjectHeader.setProjectFilePath - Moved ProjectFile.getApplicationName to ProjectHeader.getFullApplicationName - Moved ProjectFile.setApplicationName to ProjectHeader.setFullApplicationName - Moved FileCreationRecord.setDelimiter to ProjectHeader.setMpxDelimiter - Moved FileCreationRecord.getDelimiter to ProjectHeader.getMpxDelimiter - Moved FileCreationRecord.setProgramName to ProjectHeader.setMpxProgramName - Moved FileCreationRecord.getProgramName to ProjectHeader.getMpxProgramName - Moved FileCreationRecord.setFileVersion to ProjectHeader.setMpxFileVersion - Moved FileCreationRecord.getFileVersion to ProjectHeader.getMpxFileVersion - Moved FileCreationRecord.setCodePage to ProjectHeader.setMpxCodePage - Moved FileCreationRecord.getCodePage to ProjectHeader.getMpxCodePage - Moved ProjectFile.getMppFileType to ProjectHeader.getMppFileType - Moved ProjectFile.setMppFileType to ProjectHeader.setMppFileType - Moved ProjectFile.getApplicationVersion to ProjectHeader.getApplicationVersion - Moved ProjectFile.setApplicationVersion to ProjectHeader.setApplicationVersion - Moved ProjectFile.setAutoFilter to ProjectHeader.setAutoFilter - Moved ProjectFile.getAutoFilter to ProjectHeader.getAutoFilter - Removed ProjectFile.getAliasTaskField, replaced by ProjectFile.getTaskFieldAliases().getField() - Removed ProjectFile.getAliasResourceField, replaced by ProjectFile.getResourceFieldAliases().getField() - Removed ProjectFile.getTaskFieldAlias, replaced by ProjectFile.getTaskFieldAliases().getAlias() - Removed ProjectFile.setTaskFieldAlias, replaced by ProjectFile.getTaskFieldAliases().setAlias() - Removed ProjectFile.getResourceFieldAlias, replaced by ProjectFile.getResourceFieldAliases().getAlias() - Removed ProjectFile.setResourceFieldAlias, replaced by ProjectFile.getResourceFieldAliases().setAlias() - Removed ProjectFile.getTaskFieldAliasMap, replaced by ProjectFile.getTaskFieldAliases - Removed ProjectFile.getResourceFieldAliasMap, replaced by ProjectFile.getResourceFieldAliases - Removed ProjectFile.addTable, replaced by ProjectFile.getTables().add() - Removed ProjectFile.getTaskTableByName, replaced by ProjectFile.getTables().getTaskTableByName() - Removed ProjectFile.getResourceTableByName, replaced by ProjectFile.getTables().getResourceTableByName() - Removed ProjectFile.addFilter, replaced by ProjectFile.getFilters().addFilter() - Removed ProjectFile.removeFilter, replaced by ProjectFile.getFilters().rmoveFilter() - Removed ProjectFile.getAllResourceFilters, replaced by ProjectFile.getFilters().getResourceFilters() - Removed ProjectFile.getAllTaskFilters, replaced by ProjectFile.getFilters().getTaskFilters() - Removed ProjectFile.getFilterByName, replaced by ProjectFile.getFilters().getFilterByName() - Removed ProjectFile.getFilterByID, replaced by ProjectFile.getFilters().getFilterByID() - Removed ProjectFile.getAllGroups, replaced by ProjectFile.getGroups() - Removed ProjectFile.getGroupByName, replaced by ProjectFile.getGroups().getByName() - Removed ProjectFile.addGroups, replaced by ProjectFile.getGroups().add() - Removed ProjectFile.addView, replaced by ProjectFile.getViews().add() - Removed ProjectFile.setViewState, replaced by ProjectFile.getViews().setViewState() - Removed ProjectFile.getViewState, replaced by ProjectFile.getViews().getViewState() - Removed ProjectFile.getResourceSubProject, replaced by ProjectFile.getSubProjects().getResourceSubProject() - Removed ProjectFile.setResourceSubProject, replaced by ProjectFile.getSubProjects().setResourceSubProject() - Removed ProjectFile.addSubProject, replaced by ProjectFile.getSubProjects().add() - Removed ProjectFile.getAllSubProjects, replaced by ProjectFile.getSubProjects - Removed ProjectFile.fireTaskReadEvent, replaced by ProjectFile.getEventManager().fireTaskReadEvent() - Removed ProjectFile.fireTaskWrittenEvent, replaced by ProjectFile.getEventManager().fireTaskWrittenEvent() - Removed ProjectFile.fireResourceReadEvent, replaced by ProjectFile.getEventManager().fireResourceReadEvent() - Removed ProjectFile.fireResourceWrittenEvent, replaced by ProjectFile.getEventManager().fireResourceWrittenEvent() - Removed ProjectFile.fireCalendarReadEvent, replaced by ProjectFile.getEventManager().fireCalendarReadEvent() - Removed ProjectFile.fireAssignmentReadEvent, replaced by ProjectFile.getEventManager().fireAssignmentReadEvent() - Removed ProjectFile.fireAssignmentWrittenEvent, replaced by ProjectFile.getEventManager().fireAssignmentWrittenEvent() - Removed ProjectFile.fireRelationReadEvent, replaced by ProjectFile.getEventManager().fireRelationReadEvent() - Removed ProjectFile.fireRelationWrittenEvent, replaced by ProjectFile.getEventManager().fireRelationWrittenEvent() - Removed ProjectFile.fireCalendarWrittenEvent, replaced by ProjectFile.getEventManager().fireCalendarWrittenEvent() - Removed ProjectFile.addProjectListener, replaced by ProjectFile.getEventManager().addProjectListener() - Removed ProjectFile.addProjectListeners, replaced by ProjectFile.getEventManager().addProjectListeners() - Removed ProjectFile.removeProjectListener, replaced by ProjectFile.getEventManager().removeProjectListener() - Removed ProjectFile.addGraphicalIndicator - Removed ProjectFile.getGraphicalIndicator, replaced by ProjectFile.getCustomFields().getCustomField().getGraphicalIndicator() |
|
From: Jon I. <pac...@go...> - 2015-05-01 15:01:21
|
Hi,
If you use the code now in Git, or use the next release version of MPXJ
when it becomes available, you will be able to read project data from a
SQLite database.
Jon
On 1 May 2015 at 14:50, Arash Bizhan zadeh <ar...@gm...> wrote:
> Thanks Jon,
> I don't have the database handy to test it, but I think there was some
> other problem with this database type.
> Would you be able to load a project after the fix you were suggested?
>
> On Thu, Apr 30, 2015 at 4:42 PM, Jon Iles <
> pac...@go...> wrote:
>
>> Hi,
>>
>> I’ve checked some code into Git which will allow you to read P6 data from
>> a SQLite database. You will need to set a property on the database
>> connection in order to avoid the error you encountered, as shown by this
>> example below.
>>
>> import java.sql.Connection;
>> import java.sql.DriverManager;
>> import net.sf.mpxj.ProjectFile;
>> import net.sf.mpxj.primavera.PrimaveraDatabaseReader;
>>
>> ...
>>
>> //
>> // Load the JDBC driver
>> //
>> String driverClass=""org.sqlite.JDBC";
>> Class.forName(driverClass);
>>
>> //
>> // Open a database connection. You will need to change
>> // these details to match the location of your database file.
>> //
>> String connectionString="jdbc:sqlite:C:/temp/PPMDBSQLite.db";
>> Properties props = new Properties();
>> props.setProperty("date_string_format", "yyyy-MM-dd HH:mm:ss");
>> Connection c = DriverManager.getConnection(connectionString, props);
>> PrimaveraDatabaseReader reader = new PrimaveraDatabaseReader();
>> reader.setConnection(c);
>>
>> //
>> // Retrieve a list of the projects available in the database
>> //
>> Map<Integer,String> projects = reader.listProjects();
>>
>> //
>> // At this point you'll select the project
>> // you want to work with.
>> //
>>
>> //
>> // Now open the selected project using its ID
>> //
>> int selectedProjectID = 1;
>> reader.setProjectID(selectedProjectID);
>> ProjectFile projectFile = reader.read();
>>
>> Please also note, I’m about to release a new version of MPXJ which
>> includes API changes to the ProjectFile class, so you may need to update
>> your code slightly to work with the latest version from Git.
>>
>> Jon
>>
>>
>> On 26 March 2015 at 19:48, Arash Bizhan zadeh <ar...@gm...> wrote:
>>
>>> I was trying to read a P6 R8 database with MPXJ, and I faced this
>>> problem:
>>> net.sf.mpxj.MPXJException: Error reading file
>>> at
>>> net.sf.mpxj.primavera.PrimaveraDatabaseReader.read(PrimaveraDatabaseReader.java:126)
>>> at
>>> ca.kapanak.pmt.lib.data.MppProjectReader.read(MppProjectReader.java:46)
>>> at examples.GanttChartDemo$1.doInBackground(GanttChartDemo.java:242)
>>> at examples.GanttChartDemo$1.doInBackground(GanttChartDemo.java:233)
>>> at com.jidesoft.utils.SwingWorker$1.call(Unknown Source)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at com.jidesoft.utils.SwingWorker.run(Unknown Source)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Caused by: java.sql.SQLException: Error parsing time stamp
>>> at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:332)
>>> at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:351)
>>> at net.sf.mpxj.primavera.ResultSetRow.<init>(ResultSetRow.java:81)
>>> at
>>> net.sf.mpxj.primavera.PrimaveraDatabaseReader.getRows(PrimaveraDatabaseReader.java:366)
>>> at
>>> net.sf.mpxj.primavera.PrimaveraDatabaseReader.processProjectHeader(PrimaveraDatabaseReader.java:177)
>>> at
>>> net.sf.mpxj.primavera.PrimaveraDatabaseReader.read(PrimaveraDatabaseReader.java:111)
>>> ... 9 more
>>> Caused by: java.text.ParseException: Unparseable date: "2010-02-11
>>> 09:53:11"
>>> at java.text.DateFormat.parse(DateFormat.java:366)
>>> at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:329)
>>>
>>> Just wondering if it is a known problem, and how can I solve this.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>> sponsored
>>> by Intel and developed in partnership with Slashdot Media, is your hub
>>> for all
>>> things parallel software development, from weekly thought leadership
>>> blogs to
>>> news, videos, case studies, tutorials and more. Take a look and join the
>>> conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> Mpxj-developers mailing list
>>> Mpx...@li...
>>> https://lists.sourceforge.net/lists/listinfo/mpxj-developers
>>>
>>>
>>
>
|
|
From: Arash B. z. <ar...@gm...> - 2015-05-01 13:51:01
|
Thanks Jon,
I don't have the database handy to test it, but I think there was some
other problem with this database type.
Would you be able to load a project after the fix you were suggested?
On Thu, Apr 30, 2015 at 4:42 PM, Jon Iles <pac...@go...>
wrote:
> Hi,
>
> I’ve checked some code into Git which will allow you to read P6 data from
> a SQLite database. You will need to set a property on the database
> connection in order to avoid the error you encountered, as shown by this
> example below.
>
> import java.sql.Connection;
> import java.sql.DriverManager;
> import net.sf.mpxj.ProjectFile;
> import net.sf.mpxj.primavera.PrimaveraDatabaseReader;
>
> ...
>
> //
> // Load the JDBC driver
> //
> String driverClass=""org.sqlite.JDBC";
> Class.forName(driverClass);
>
> //
> // Open a database connection. You will need to change
> // these details to match the location of your database file.
> //
> String connectionString="jdbc:sqlite:C:/temp/PPMDBSQLite.db";
> Properties props = new Properties();
> props.setProperty("date_string_format", "yyyy-MM-dd HH:mm:ss");
> Connection c = DriverManager.getConnection(connectionString, props);
> PrimaveraDatabaseReader reader = new PrimaveraDatabaseReader();
> reader.setConnection(c);
>
> //
> // Retrieve a list of the projects available in the database
> //
> Map<Integer,String> projects = reader.listProjects();
>
> //
> // At this point you'll select the project
> // you want to work with.
> //
>
> //
> // Now open the selected project using its ID
> //
> int selectedProjectID = 1;
> reader.setProjectID(selectedProjectID);
> ProjectFile projectFile = reader.read();
>
> Please also note, I’m about to release a new version of MPXJ which
> includes API changes to the ProjectFile class, so you may need to update
> your code slightly to work with the latest version from Git.
>
> Jon
>
>
> On 26 March 2015 at 19:48, Arash Bizhan zadeh <ar...@gm...> wrote:
>
>> I was trying to read a P6 R8 database with MPXJ, and I faced this problem:
>> net.sf.mpxj.MPXJException: Error reading file
>> at
>> net.sf.mpxj.primavera.PrimaveraDatabaseReader.read(PrimaveraDatabaseReader.java:126)
>> at ca.kapanak.pmt.lib.data.MppProjectReader.read(MppProjectReader.java:46)
>> at examples.GanttChartDemo$1.doInBackground(GanttChartDemo.java:242)
>> at examples.GanttChartDemo$1.doInBackground(GanttChartDemo.java:233)
>> at com.jidesoft.utils.SwingWorker$1.call(Unknown Source)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at com.jidesoft.utils.SwingWorker.run(Unknown Source)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.sql.SQLException: Error parsing time stamp
>> at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:332)
>> at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:351)
>> at net.sf.mpxj.primavera.ResultSetRow.<init>(ResultSetRow.java:81)
>> at
>> net.sf.mpxj.primavera.PrimaveraDatabaseReader.getRows(PrimaveraDatabaseReader.java:366)
>> at
>> net.sf.mpxj.primavera.PrimaveraDatabaseReader.processProjectHeader(PrimaveraDatabaseReader.java:177)
>> at
>> net.sf.mpxj.primavera.PrimaveraDatabaseReader.read(PrimaveraDatabaseReader.java:111)
>> ... 9 more
>> Caused by: java.text.ParseException: Unparseable date: "2010-02-11
>> 09:53:11"
>> at java.text.DateFormat.parse(DateFormat.java:366)
>> at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:329)
>>
>> Just wondering if it is a known problem, and how can I solve this.
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for all
>> things parallel software development, from weekly thought leadership
>> blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Mpxj-developers mailing list
>> Mpx...@li...
>> https://lists.sourceforge.net/lists/listinfo/mpxj-developers
>>
>>
>
|