cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Have Project Management Available Through Scripting

Have Project Management Available Through Scripting

Adding Project Management items in the Project Management tab is tedious at times. Being able to add project items through scripting would allow an automated procedure involving less time consumption and tedious routine work.

10 Comments
jared.sund
Alumni
Status changed to: Future Consideration
This is an item that's already on our list. I've added a link to this Idea Exchange to help give it a little more priority 🙂
scottmoyse
Mentor

There is a slight workaround, if you aren't using it already. You can setup a relationship tab, create all your new task items via that, then when you go to the PM tab you can add linked items & just tick the ones you need to add. However, you still have to go to each individual task item & modify the milestones if they aren't how you would like them to be.

scottmoyse
Mentor

Correction. You can actually do it all from the 'Add Linked Items' button in the PM tab.

dkeeley
Collaborator

Jared. This would be an extremely useful feature. Any ideas of timescales for when we could expect to see it?

jared.sund
Alumni

Unfortunately I'm not able to comment on any time frames for the release of features in the product, however…  I can say that expanding the scripting engine’s reach into Project Management, relationships, workflow items, bom,  …., etc.  is a high focus of my scripting efforts.

jared.sund
Alumni

We're part way there, read access to the project management tab has been added in the Feb. 2013 PLM 360 release.  We'll followup with write access to project mangement in scripting.

troy.hylton
Explorer

Right now there is only read access, but write access is required as well.

jared.sund
Alumni
Status changed to: 投票募集中
New read/write scripting access to project management is now available in the May 2013 PLM 360 release!
jared.sund
Alumni

Here's a simple example of scripting to project management tasks:


//adds tasks to projects

if(item.PROJECT!== null){   // a picklist of projects on the tasks item details page.

     var taskExists = false;
     var project = item.PROJECT.project;

     

     //check to see if the task is already added to the project
     for(var i =0 ; i < project.subTasks.length; i++){
          if(item.descriptor.descriptor === project.subTasks[i].title){
               taskExists = true;
               break;
          }
     }

 

 

     if(taskExists === false){

           //add the task to the project

           item.PROJECT.project.addTask(item, new Date(), new Date(), 10);
    }
}

 

 

Read:

item.project.<FIELD> where <FIELD> is: title, start_date, end_date, duration, progress, predecessors, subTasks, status, statusCode

item.project.subTasks[i].<FIELD> where <FIELD> is: id, title, start_date, end_date, duration, progress, predecessors, subTasks, children, status, statusCode, owner, target, isReadOnly

 

 

 

Write:

item.project.addTask("Task Name", startDate, endDate, progressPct); // Free-form text task
item.project.addTask(targetItem, startDate, endDate, progressPct); // Item linking task or milestone task

nguyentru
Alumni
Status changed to: Implemented
 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report