Creating ProcessFlow with flexscript code

Creating ProcessFlow with flexscript code

filip_brzeski
Not applicable
29 Views
4 Replies
Message 1 of 5

Creating ProcessFlow with flexscript code

filip_brzeski
Not applicable

[ FlexSim 17.1.4 ]

Hi,

where can I find OnDrop function for library of ProcessFlow activities? In "dropscript" node of for example "/DragDropLibrary/Basic/Delay" there is only text "// do nothing: handled by OnDrop". So now I am searching this "OnDrop" node.

I am trying to create ProcessFlow sequence via flexscript code. Maybe you have better idea how to insert activities into ProcessFlow tab.

As I experimented a bit, "createcopy()" does not work properly because during OnDrop there are some triggers which are inserting additional properties.

Accepted solutions (1)
30 Views
4 Replies
Replies (4)
Message 2 of 5

matt_long
Not applicable

Why are you trying to dynamically build Process Flow activities? This is probably not what you want to be doing.

Message 3 of 5

filip_brzeski
Not applicable

Hi @Matt Long, this is exactly what I want to do. At this moment I have a script for building whole simulation model just by code and I really need to prepare similar application for creating ProcessFlow.

0 Likes
Message 4 of 5

filip_brzeski
Not applicable

UPDATE:

@Matt Long, I have tried reach my aim with dopuserlibrary(),

dropuserlibraryobject(views().find("modules/ProcessFlow/DragDropLibrary/Basic/Assign Labels"),model().find("Tools/ProcessFlow/ProcessFlow"));

but unfortunatelly this solution does not work. I have also tried just paste "Assign Label" node into "ProcessFlow" node but then I had an error:

"exception: Exception caught in TreeNode::callMemberFunction() c++/dll execution. Throwing... VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2>eventfunctions/onDrawCallback c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2 thisClass: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2 exception: FlexScript exception: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2>eventfunctions/OnDraw c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2 exception: Exception caught in TreeNode::callMemberFunction() c++/dll execution. Throwing... VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2>eventfunctions/onDrawCallback c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2 thisClass: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2 exception: FlexScript exception: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2>eventfunctions/OnDraw c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/TabPane~3/TabControl/ProcessFlow2"

I have also tried to fire onDropCallback function but there was no effect. Maybe I've made some mistake in code.

Do you have an idea what should I do now?

0 Likes
Message 5 of 5

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

We do not currently support auto-building Process Flows. You can use Process Flow or code to autobuild a model, but not a Process Flow. This was a design choice we made when developing Process Flow. If you feel there is a need for such functionality please create an idea and lay out your argument and we can have a community discussion.



Matthew Gillespie
FlexSim Software Developer