Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Project Management Scripting

8 REPLIES 8
Reply
Message 1 of 9
dnaugle
1078 Views, 8 Replies

Project Management Scripting

Looking to see if anyone has tried to develop a script that could create a series of task records from a predefined list. For example; if a phase of a standard project plan always uses the same tasks is there a way to create these tasks via scripting automatically any time that a new record of that project phase is created?

 

This would then allow us to give ownership of these tasks to a specific resource as a means of supporting project management without having to re-create the taks manually each time.

 

Thanks!

 

 

8 REPLIES 8
Message 2 of 9
jpiggee
in reply to: dnaugle

Hi Dan,

 

Yup your right, you can script task into the proget management tab, Attacted is a handy guilde for working with task in the Progect Management tab.

Joseph Piggee
Fusion 360 Administrator
TPI Composites
jpiggee@tpicomposites.com
Message 3 of 9
dkeeley
in reply to: jpiggee

Hi Joe,

 

Can scripting not be used to add a task to the PM tab? The text below is taken from the help section;

 

Methods on the item.project Object
item.project.addTask(); item.project.addTask(TASK_NAME, START_DATE, END_DATE, "PROGRESS_PCT"); item.project.addTask(TARGET_ITEM, START_DATE, END_DATE, PROGRESS_PCT)
Method to add manual or linked tasks to the item's Project Management tab. You can pass task property values in a task object, as an array of values, or in a related item. Properties passed are TASK_NAME=title, TARGET_ITEM=target, START_DATE=start_date, END_DATE=end_date, PROGRESS_PCT=progress.

 

David.

Message 4 of 9
jpiggee
in reply to: dkeeley

Dan,

 

Sorry, not sure what I was thinking about in the earlier reply, I have edited to give a correct answer.

Here’s how you could go about completing what you are looking for.

 

You could complete this one of two ways: As a for loop, or as a hardcode if statement.

A great example of how to complete this task can be found in your tenant already under the script: CAPAMileStones with its library, createMileStones. The basic concept of the script is the same which is the Script sets what needs to be added and calls on the function for how and where to add it. This will very much translate into what you are looking for.

 

Joseph Piggee
Fusion 360 Administrator
TPI Composites
jpiggee@tpicomposites.com
Message 5 of 9
dnaugle
in reply to: dkeeley

Hello David and thank you very much for your reply.

 

For reasons I will not get into here I have moved to attempting to spawn a new item record in a seperate workspace in support of project management. The script below runs about half way. By that I mean it creates the new item record as desired but does not carry over the data from the existing TITLE field to the new PROJECT_TITLE field like I would like it to.

 

I feel like it should work having reviewed some standard scripting. If you have any thoughts that you could spare they would be greatly appreciated.

 


if(item.CREATE_STATION_TASKS === 'Yes'){
        
    var newItem = createNewItem('WS_STATION_1_TASKS', newProperties);
    
     var newProperties = [];
    
    newProperties.PROJECT_TITLE = item.TITLE;
        
    if(newItem !== null){
            item.CREATE_STATION_TASKS = newItem;
    }
}

 

 

Regards,

 

Dan

Message 6 of 9
dkeeley
in reply to: dnaugle

Dan,

You need to create the item AFTER you you define the newproperties array. That will correct your problem.

David.
Message 7 of 9
dnaugle
in reply to: dkeeley

Hello David, thank you for your reply.

I have tried it both ways but cannot get the field data to transfer or even populate with text from within the script. Are there any specific permissions / settings I should need to make this work? I have review the permissions and the workspace fields several times and it feels like this should work. Here is my latest attempt...

if(item.CREATE_STATION_TASKS === 'Yes'){
var newProperties = [];

newProperties.PROJECT_TITLE = item.TITLE;
newProperties.TASK_NAME = 'Design Creation';
newProperties.TASK_DETAILS = 'Testing';

var newItem = createNewItem('WS_STATION_1_TASKS', newProperties);

if(newItem !== null){
item.CREATE_STATION_TASKS = newItem;
}
}

Thank you again for your time, greatly appreciated!

Best Regards,

Dan Naugle

https://www.surveymonkey.com/s/NP2W9CT




----------Legal Disclaimer----------
The information contained in this message may be privileged and confidential, and is intended solely for the use of the named addressee. No other person is authorized to access, copy or re-use this message (or any information contained herein). If you are not the intended recipient, please notify us immediately by replying to this message and delete it from your computer.
Message 8 of 9
dkeeley
in reply to: dnaugle

Hi Dan,

 

Make sure that the fields are all compatible with the types of values you are writing into them. The easiest way to verify is to make all of the target fields into ‘single line text’ type with a 100 character length. Fields do not need to be editable to be able to write to them using a script.

 

Also, use a println line in your script to check that you’re script logic isn’t the issue.

 

Regards,

 

David

Message 9 of 9
brian.olson
in reply to: dnaugle

Is it possible through scripting to change the dates in a project management task? I have a tasks workspace with start date and end date. The items in this workspace are tasks in the pm tab of another workspace. Ideally, if the start or end dates in my tasks workspace are modified, a script would sync the new dates to the pm tab in the other workspace. The only documented method on the project item is addTask(). Is what I'm trying to do even possible? 

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

Post to forums  

Autodesk Design & Make Report