question

xiaocheng xie avatar image
1 Like"
xiaocheng xie asked xiaocheng xie commented

How to add trigger codes in ProcessFlow User Library?

hello all

My question is similar to this post,but my focus is on the processflow userlibrary. When I drag my pf module to pf model,I want to do some user defined functions. I have read the manual:Reference / Developer and Advanced User Reference / Custom Libraries / Model Libraries Node. and i think the dropscript is key to my question. but when i tried this method for several times,I found the dropscript does't trigger in the pf library not like normal uselibrary. Hope my question is clear.

FlexSim 18.2.3
processflowuserlibrarydropscript
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered xiaocheng xie commented

Because the CustomFlow1 object has the userLibrary node with a value of ProcessFlow it is skipping the dropscript function. If you delete that userLibrary node it will start calling the dropscript function.

Then, to get it to actually add the process flow activities to the view you need to put this code in the dropscript function:

  1. treenode droppedObj = dropnodefrom();
  2. treenode view = param(5);
  3.  
  4. function_s(view, "dropUserLibraryObject", droppedObj);
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.