PLM 360 General Discussion

PLM 360 General Discussion

Reply
Contributor
Asingh5
Posts: 27
Registered: ‎09-13-2012
Message 1 of 3 (99 Views)

Scripting Access to Linked Items

99 Views, 2 Replies
11-22-2012 12:07 PM

Hi I just saw that there was a update for Scripting Access to Linked Items. I wanted to know how to exactly use it. The Wikihelp section only tells you that theres a new object array: itemWorkflowItems, it doesnt really tell you how to use it with an example script.

 

Can someone provide an example script using this feature?

Mentor
dkeeley
Posts: 224
Registered: ‎10-04-2012
Message 2 of 3 (92 Views)

Re: Scripting Access to Linked Items

11-22-2012 02:30 PM in reply to: Asingh5

Hi,

 

I was able to get it working over the weekend. The following is a bit of the code that I used;

 

var linked_item = loadItem(item.workflowItems[1].id);
linked_item.ORIENTATION = 'Vertical';

 

Hope this helps.

 

David.

Mentor
dkeeley
Posts: 224
Registered: ‎10-04-2012
Message 3 of 3 (91 Views)

Re: Scripting Access to Linked Items

11-22-2012 02:37 PM in reply to: dkeeley

From my testing you can use the new functionality the following way;

 

item.workflowItems.length                 [Number of linked items]

item.workflowItems                            [Returns entire array]

item.workflowItems[i].id                      [Returns the id of the row number i in the array]

item.workflowItems[i].descriptor

 

Hope this helps,

 

David.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.