Re: [Mpxj-developers] Comparing two XER files
Multi platform library to read and write schedule data
Brought to you by:
joniles
|
From: Matthias W. <mat...@gm...> - 2012-03-07 06:17:36
|
Hi, so I inserted the lines and managed to build the mpxj.dll. Problems are: when I unzip MPXJ and link the libraries everything works fine. The libraries and their methods and classes are found properly. When I now apply your changes (insert the line where you told me) and build the MPXJ dll as instructed on the MPXJ website the mpxj doesn't work anymore. I link them to the project and Visual Studio tolds me that it cannot find "net" in for example: using net.sf.mpxj; And if you look at the namespace "net" can't be found actually. The IDE finds junit, java, javax and so on but it cannot find net as the new mpxj.dll seems to miss something. To summarize: the original mpxj.dll contains the namespace "net" (as in "using net.sf.mpxj"). If modify the source code and rebuild mpxj, link the new DLL namespace net is lost. Can you help me or does anybody has experience with building MPXJ for C#? 2012/3/5 Jon Iles <pac...@go...> > Matthias, > > I've looked again at the code in MPXJ... looks lke I've made a mistake in > that I'm loking for the task_code attribute on the Primavera WBS entity, > wheras in fact it's on the Task entity. I will amend the code and check in > the changes tonight. If you want to modify your local version you need to > look in PrimaveraReader.java, the metod you are interested in is called > processTasks. Copy the line: > > > task.setText(1, row.getString( > "task_code")); > and paste it in after the line which reads: > > > task.setTotalSlack(row.getDuration( > "total_float_hr_cnt")); > > You'll find instructions at http://mpxj.sf.net which will explain how to > build MPXJ for .net, if you haven't done this before. > > Jon > > On Mon, Mar 5, 2012 at 10:41 AM, Matthias Wagener < > mat...@gm...> wrote: > >> Thank you very much, Jon. >> >> But I can't get a result. I am using MPXJ 4.3.0 and C# (sorry, I missed >> to say that, maybe this could be the reason?) >> >> I implemented the PrimaveraXERFileReader and instantiated it. All works >> fine. When I now call task.getText1() nothing is shown. >> >> Is there something I have missed? >> >> >> Best regards, >> Matthias >> >> 2012/3/5 Jon Iles <pac...@go...> >> >>> Hi Matthias, >>> >>> you'll find the value you need in the Text1 attribute of a task. >>> >>> Jon >>> >>> On Mon, Mar 5, 2012 at 9:46 AM, Matthias Wagener < >>> mat...@gm...> wrote: >>> >>>> Thanks again, Jon, for your fast answer. >>>> >>>> My client provided two files and one screenshot. It is attached. >>>> >>>> In Primavera the column has the name "Activity ID". This ID should show >>>> up as "task_code" in the file according to Primavera. i have taken a look >>>> by myself on the file and found the task code in the XER file. It is right >>>> before the task name separeted by a '.' >>>> So in the base file it would be ".A1010.Activity 2" for example. A1010 >>>> is the task_code, Activity 2 the task name. >>>> >>>> Best regards, >>>> Matthias >>>> >>>> >>>> 2012/3/5 Jon Iles <pac...@go...> >>>> >>>>> Hi Matthias, >>>>> >>>>> if you look at the XER file itself, can you identify the task code... >>>>> and from that can you see the name of the column it appears in? Based on >>>>> that I can tell you if MPXJ reads it, or if it doesn't, I can extend MPXJ >>>>> to read it. >>>>> >>>>> Jon >>>>> >>>>> On Mon, Mar 5, 2012 at 5:14 AM, Matthias Wagener < >>>>> mat...@gm...> wrote: >>>>> >>>>>> Hi guys, >>>>>> >>>>>> I am challenged by the following problem: i have to compare two XER >>>>>> files. File 1 is the original file and file 2 is the modified file but >>>>>> still the original one (changed task names, calendars and so on via >>>>>> PrimaVera). >>>>>> The problem is if I compare these two files the unique ID differs >>>>>> between these two files. >>>>>> For example: >>>>>> >>>>>> task 3 has the unique ID 35856 in the base file. >>>>>> >>>>>> In the revised file task the now has the unique ID 35860. >>>>>> >>>>>> So a comparison by unique ID won't work. My client talked about that >>>>>> there should be a so called task code, but I couldn't find a method like >>>>>> this in the whole framework (I looked out for activity ID or task code). Is >>>>>> there such a opportunity to read such an attribute or do I have to find a >>>>>> way around? >>>>>> >>>>>> For a better understanding I have attached two text files which show >>>>>> the output when I read in the XER files and apply the following methods: >>>>>> >>>>>> line 1: getID() >>>>>> line 2: getUniqueID() >>>>>> line 3: getWBS() >>>>>> line 4: getName() >>>>>> >>>>>> Could somebody please help me? >>>>>> >>>>>> Best regards, >>>>>> >>>>>> Matthias >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Try before you buy = See our experts in action! >>>>>> The most comprehensive online learning library for Microsoft >>>>>> developers >>>>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, >>>>>> MVC3, >>>>>> Metro Style Apps, more. Free future releases when you subscribe now! >>>>>> http://p.sf.net/sfu/learndevnow-dev2 >>>>>> _______________________________________________ >>>>>> Mpxj-developers mailing list >>>>>> Mpx...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/mpxj-developers >>>>>> >>>>>> >>>>> >>>> >>> >> > |