joniles / mpxj

Primary repository for MPXJ library
http://www.mpxj.org/
GNU Lesser General Public License v2.1
250 stars 104 forks source link

Activity codes on tasks #46

Closed robgeurden closed 6 years ago

robgeurden commented 6 years ago

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!

joniles commented 6 years ago

Hi, thanks for the note. Can you give me some context: what's the source of the schedule data you are working with (MS Project, P6 etc.) Can you provide a sample file and an indication of what data you are expecting to find for a particular task. I can dig into it from there.

robgeurden commented 6 years ago

Hi John,

Thanx for the quick reply! Great!

I'm trying to import a XER (p6) file in a .net application. The data in the schedule is confidential, however I've opened the file in notepad++ and I'm looking for the following info:

The type i want to search %T ACTVTYPE %F actv_code_type_id actv_short_len seq_num actv_code_type proj_id wbs_id actv_code_type_scope %R 7885 20 19310 EQPT 15893 AS_Project

The possible values of the type %T ACTVCODE %F actv_code_id parent_actv_code_id actv_code_type_id actv_code_name short_name seq_num color total_assignments %R 652999 7885 NAME IM SEARCHING FOR 21284 0 0000FF 135 %R 653000 7885 NAME IM SEARCHING FOR 2 21284 0 0000FF 2

The link of the values of the type to the tasks %T TASKACTV %F task_id actv_code_type_id actv_code_id proj_id %R 1571982 7883 653921 15893

Do you need some further information? Thanx a lot for your support!!

P.S. I'm trying to fetch the data by reading the file as a delimited file. Splitting on %T and parsing the contents of the ACTVTYPE, ACTVCODE, TASKACTV by using a CSV reader. It looks like this approach will work. However having an option in the MPXJ package would be great.

joniles commented 6 years ago

Just a quick update: I'm working on extended MPXJ to read activity codes, hopefully the work will be complete this week.

joniles commented 6 years ago

The initial version of activity code support is now merged. I'll make a new release tomorrow.

joniles commented 6 years ago

The new release is available. You should be able to work with: task.ActivityCodes.