I'm trying to create a heatmap of where TE flowitems are walking in my model that uses AStar to direct their travel.
I have the following code:
treenodearray pulledTravelers = getlabel(token,"pulledTravelers"); for(int i= 1; i <= arraysize(pulledTravelers); i++) { treenode person = getlabel(pulledTravelers[i],"item"); if(objectexists(person)) { updatelocations(person); int personNum = getlabel(person,"PersonNum"); addtablerow("HeatMapData"); int row = gettablerows("HeatMapData"); settablenum("HeatMapData",row,1,personNum); settablenum("HeatMapData",row,2,get(spatialx(person))); settablenum("HeatMapData",row,3,get(spatialy(person))); } }
and every time it gets to updatelocations(person) it throws the following error and exits the code so it never captures the data I want to capture
exception: Exception caught in TreeNode::callMemberFunction() c++/dll execution. Throwing... MAIN:/project/exec/commandlist/updatelocations/node c: MAIN:/project/exec/commandlist/updatelocations/node thisClass: MAIN:/project/exec/commandlist/updatelocations/node exception: Exception caught in flexscript execution of MODEL:/Tools/ProcessFlow/ProcessFlow/Update locations>variables/codeNode line 12 instruction 28. Discontinuing execution. exception: Exception caught in TreeNode::callMemberFunction() flexscript execution MODEL:/Tools/ProcessFlow/ProcessFlow/Update locations>variables/codeNode c: /Tools/ProcessFlow/ProcessFlow/Update locations>variables/codeNode i: /Tools/ProcessFlow/ProcessFlow/Update locations>variables/codeNode theclass: /Tools/ProcessFlow/ProcessFlow/Update locations>variables/codeNode exception: Exception Caught in updatelocations(treenode object) exception: Exception Caught in ObjectFunction225__project_exec_commandlist_updatelocations_node object: MAIN:/project/exec/commandlist/updatelocations/node class: MAIN:/project/exec/commandlist/updatelocations/node
Is there a bug in updatelocations that is making it so I'm unable to call it?