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: 

Advanced Print View Script Problem

8 REPLIES 8
Reply
Message 1 of 9
dkeeley
821 Views, 8 Replies

Advanced Print View Script Problem

Hi,

 

I have a test script that I use to send an email containing an advanced print view to a all the members of a group. When I try and run the script I get a script timeout error message (the group contains two members). I have attached the error message. The script is as follows;

 

var email = new Email();
email.subject = 'Emergency Problem Report Notification';
//email.body = 'Test';
email.body = getPrintView('Emergency Email');
var users = Security.listUsersInGroup('ST Test');
for (var index in users) {
    email.to = users[index].email;
    //email.to = '[personal]@hotmail.com';
    email.send();
}

 

When I reduce the number of members in the group to 1 person the script works fine. I have tried making the following changes to begus the script but it continues to fail;

 

- change the group members

- change the advanced print view

- change the test dmsID

 

It seems that I cannot get the script to send the advanced print view to more than one person.

 

When I change the email body from an advanced print view to a text body the script runs fine and sends the email to all group members;

 

var email = new Email();
email.subject = 'Emergency Problem Report Notification';
email.body = 'Test';
//email.body = getPrintView('Responsible Person Email');
var users = Security.listUsersInGroup('ST Test');
for (var index in users) {
    email.to = users[index].email;
    //email.to = '[personal]@hotmail.com';
    email.send();
}

 

Please can you assist?

 

 

8 REPLIES 8
Message 2 of 9
bastien.mazeran
in reply to: dkeeley

Hi, 

 

I have not been able to reproduce the script error with a group of 4 users using an advanced print view found in my Items and BOMs workspace. Testing the action script showed that it executed successfully.

 

Is your advanced print view very complex? Could you try to call the advanced print view from one of your item and see if that works outside of the scripting environment? Could there be something unique about the group? I understand you have tried changing various parameters but not sure if you have tried changing the group itself. Also please look into whether issue is reproducible in another browser.



Bastien Mazeran

Technical Support Specialist

Tags (1)
Message 3 of 9
dkeeley
in reply to: bastien.mazeran

Hi Bastien,

 

I performed the following further tests. In each instance I continue to get the same script timeout error.

 

1. I tested the script in IE, Firefox & Chrome

2. I tried using two different users in the group

3. I tried using a completely different group

4. I tried using a very simple test advanced print view (see attached image 'Simple APV)

 

I also checked to see if I can generate the print views within the item view by pressing 'print' (i.e. outside of scripting). In each case the print view generated correctly and without any problem.

 

Regards,

 

David

Message 4 of 9
dkeeley
in reply to: dkeeley

Hi,

Any updates on this?

David
Message 5 of 9
bastien.mazeran
in reply to: dkeeley

Hi David,

No updates at this present time. I will follow-up and update you as soon as possible.

Thank you.



Bastien Mazeran

Technical Support Specialist

Message 6 of 9

Hi David,

 

Upon further review of your script, we believe we found an issue. Could you please try this new script instead and let me know if that works better for you? Notice the + sign for append in the if / else loop within the for loop.

 

var email = new Email();
email.subject = 'Emergency Problem Report Notification';
email.body = getPrintView('Emergency Email');
var users = Security.listUsersInGroup('ST Test');
var emailsTo ='';
for (var index in users) {
if(emailsTo === ''){
emailsTo = users[index].email;
}else{
emailsTo += ',' + users[index].email;
}

}
email.to = emailsTo;
email.send();



Bastien Mazeran

Technical Support Specialist

Message 7 of 9
dkeeley
in reply to: bastien.mazeran

Hi Bastien,

 

I just tested the script. Same error message ;-(

 

David.

Message 8 of 9
dkeeley
in reply to: dkeeley

Hi,

 

Can someone provide me with an update on this issue?

 

David.

Message 9 of 9
bastien.mazeran
in reply to: dkeeley

Hi David,

I will follow-up with you shortly.

Regards,



Bastien Mazeran

Technical Support Specialist

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

Post to forums  

Autodesk Design & Make Report