question

Lawrence Liang avatar image
0 Likes"
Lawrence Liang asked Jeanette F commented

How can I use storage.system class to call findslot method by dll maker?

Now I want to use dll marker to realize most business logics, but I can't find assignslot and findslot methods in FlexsimFuncs.h file.


How can I use storage.system class to call findslot method by dll maker before UNLOAD Task as below?


treenode ts = createemptytasksequence(rmg, 0, 0);

inserttask(ts, TASKTYPE_UNLOAD, unit, yardBlock,0,0,0,0);

dispatchtasksequence(ts);

FlexSim 24.1.0
c++dll makerstorage
· 1
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

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Jordan Johnson commented

I don't think you can access the storage system through the dll maker. From the manual:

Generally you can only access FlexSim's global user commands, not FlexSim's dot syntax methods and properties.

https://docs.flexsim.com/en/24.1/Reference/DeveloperAdvancedUser/ConnectingToExternalCode/ConnectingToExternalCode.html#building

The Storage system API counts as "dot syntax" as dots are used to access methods and properties:

  1. Storage.system.findSlot()

So you can't use that API from the DLL maker.

However, you can access that API from the Module SDK:

https://docs.flexsim.com/en/24.1/Reference/DeveloperAdvancedUser/ModuleSDK/ModuleDevelopment/ModuleDevelopment.html

The FlexScript API is loosely related to the C++ API. C++ handles namespaces a little differently, and sometimes patterns in FlexScript aren't available in C++. So the line of code you need in the module SDK looks like this:

  1. auto slot = FlexSim::StorageSystem::getInstance()->findSlot("WHERE ...");


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