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: 

Scripting reference Error for Sequencer Script

1 REPLY 1
SOLVED
Reply
Message 1 of 2
McVey.Matthew
422 Views, 1 Reply

Scripting reference Error for Sequencer Script

I am currently trying to use a action script on creation that creates a numbering sequence. But everytime I go to test the action script through the script editor I get a reference error of "item" undefined on line 10(in red).

 

var DCOSeqID = '4835';

 

if (item.DCO_NUMBER === null){

 

    //set the new number  

    var newDCONumber = nextSeqNumber(DCOSeqID);

 

 

    if(newDCONumber !== null){

         item.DCO_NUMBER = newDCONumber; }

} //end if

 

When testing in the script editor I input the WorkspaceID for the work it is for. 

1 REPLY 1
Message 2 of 2
gasevsm
in reply to: McVey.Matthew

mmcvey,

The script as shared below has an undefined item context to run - the 'item' variable is not defined based on the snippet. 

 

To access item.*, a PLM script must run in the context of an item dmsID. For testing purposes, you may try one of these two:

  1. At minimum, provide a dmsID of an existing item in the test dialog. The workspaceID is optional since the editor will implicitly discover its ID from the provided dmsID. The userid (username) is also optional as the editor will run as you implicitly.

  2. Write code to spawn a new item, and then once created, access its item.DCO_NUMBER to set its newly generated DCONumber from the sequence.

 

Hope this helps,

--

Martin Gasevski | Product Manager | Autodesk PLM 360

 


Martin Gasevski | Fusion 360 Team Product Manager

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

Post to forums  

Autodesk Design & Make Report