I'm trying my hand at a "Hello World"-ish ProcessFlow module. This is to create a new PF delay that multiplies the delay by 1000. I was successful in using the examples provided for vanilla FlexSim, but haven't been able to get anything to work for a ProcessFlow add-on yet.
I am getting a ton of errors when compiling - I think this is the primary error:
- C:\Users\<user>\Desktop\FlexSimDev\FlexSim 2023\modules\MyDelayModule\ModuleDLL\flexsimcontent\processflow\ProcessFlowObject.h(19,1): warning C4275: non dll-interface class 'FlexSim::ObjectDataType' used as base for dll-interface class 'ProcessFlow::ProcessFlowObject'
I got the FlexSim header files and DLLMain.cpp from "/program/system/include",
the FlexSim .lib file from "/program/system/lib",
the ProcessFlow .lib and header files "/modules/ProcessFlow/include".
and my files are:
- // MyDelay.h \\
- #pragma once
- #include "FlexsimDefs.h"
- #include "Delay.h"
- namespace ProcessFlow
- {
- class MyDelay : public Delay {
- virtual void bindVariables() override;
- virtual double getDelayTime(Token* token) override;
- };
- }
- // MyDelay.cpp \\
- #include "MyDelay.h"
- #include "Delay.h"
- namespace ProcessFlow
- {
- void MyDelay::bindVariables()
- {
- __super::bindVariables();
- }
- double MyDelay::getDelayTime(Token* token)
- {
- return 1000 * Delay::getDelayTime(token);
- }
- }
- // module.h \\
- #pragma once
- #include "FlexsimDefs.h"
- #include "allobjects.h"
- // module.cpp \\
- #include "module.h"
- #include "MyDelay.h"
- visible ObjectDataType* createodtderivative(char* classname)
- {
- if (strcmp(classname, "MyDelay") == 0) {
- return new ProcessFlow::MyDelay();
- }
- return NULL;
- }
- visible SimpleDataType* createsdtderivative(char* classname)
- {
- return NULL;
- }
- visible void dllinitialize()
- {
- }
- visible void dllcleanup()
- {
- }
Thank you.