question

Szymon Marek avatar image
2 Likes"
Szymon Marek asked Matthew Gillespie edited

Creating ProcessFlow with flexscript code

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.

FlexSim 17.1.4
processflowflexscriptcode
· 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.

Matt Long avatar image Matt Long commented ·

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

1 Like 1 ·
Szymon Marek avatar image Szymon Marek Matt Long commented ·

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 0 ·
Szymon Marek avatar image Szymon Marek commented ·

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 0 ·

1 Answer

·
Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Matthew Gillespie edited

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.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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