question

royjuventus29 avatar image
0 Likes"
royjuventus29 asked Jason Lightfoot commented

an error in connecting the dllmaker

I have generated the dllmaker and put it in the same directory of my flexsim model, but there is an error when I try to import the DLL in script.

I write the script like this:

/**DLL path: */ /**/"DllMaker.dll"/**/
/** \nFunction name:*/ /**/"mydllfunction1"/**/

The error is like this:

Flexscript Error VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/ToolTabPane/TabControl/ScriptConsole/Script>script Line 2 syntax error, unexpected string, expecting end of code

How to solve this issue?


FlexSim 22.2.4
flexsim scriptdllmaker
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

·
Harald Emsbroek avatar image
1 Like"
Harald Emsbroek answered Jason Lightfoot commented

You should store the dll function information in a treenode, and toggle that treenode as DLL function.

1706534392184.png

Then you can execute that node (for instance using the nodefunction command or the treenode.evaluate method).

Model.find("Tools/MyDllNode").evaluate()

1706534392184.png (31.8 KiB)
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Or set up a user command to use external code which will do that for you.

1 Like 1 ·
royjuventus29 avatar image royjuventus29 Jason Lightfoot ♦ commented ·
Is it possible to link the .dll file and execute its functions in my customized button in flexsim? How to achieve this?
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ royjuventus29 commented ·
Set up a user command and invoke it in the button press.
0 Likes 0 ·

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.