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: 

Add relationship after creating item

2 REPLIES 2
Reply
Message 1 of 3
Raid.n.t
418 Views, 2 Replies

Add relationship after creating item

Hi Again,

I seem to be finding all the bugs at the moment, although I hope I am wrong.

It doesn't look like I am able to create a new item through a script and Add It to the relationships tab at the same time

 

(Using the createNewItem library of course)

 

if(item.CREATE_CHANGE_ORDER === "Yes"){

var newProperties = [];

newProperties.LINKED_CAPA = item.descriptor.descriptor;

createNewItem('WS_UPGRADE', newProperties);

item.ASSOCIATED_CHANGE_ORDER = newItem;

item.relationships.addRelated(item.ASSOCIATED_CHANGE_ORDER,'Cross-Reference','Bidirectional','Link Change Order to CAPA');

 

}

 

each segment of the script works fine by itself however doesn't work together, my thought where I need to Add a delay to the item.relationship section however this didn't seem to help.

 

thanks again

 

James

 

 

 

2 REPLIES 2
Message 2 of 3
sarychev
in reply to: Raid.n.t

Hi JamesI too try decide this issue...

You get error (java.lang.RuntimeException: Unable to save script results) ?


P.S. Maybe this features not supported, like a "scrypting-based" change owner (before last update) ?

Message 3 of 3
dkeeley
in reply to: Raid.n.t

Hi James,

 

Maybe this would work?

 

if(item.CREATE_CHANGE_ORDER === "Yes"){

var newProperties = [];

newProperties.LINKED_CAPA = item.descriptor.descriptor;

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

item.ASSOCIATED_CHANGE_ORDER = newItem;

item.relationships.addRelated(item.ASSOCIATED_CHANGE_ORDER,'Cross-Reference','Bidirectional','Link Change Order to CAPA');

 

Regards,

 

David.

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

Post to forums  

Autodesk Design & Make Report