question

Mark S3 avatar image
0 Likes"
Mark S3 asked Phil BoBo edited

some flexsim function is not available in Dll-Maker

when I bulit the Dll file by using Dll Maker,I met a problem.

In Visual studio,the "setanimationvar()"function could not be used.But "startanimation()" and other flexsim function could be used accurately.

In Visual studio,I searched the entire solution, I could not find the declaration and definition of the "setanimationvar()" function.

I need to use "setanimationvar()" function .How can I solve this problem?

Thank you in advance

FlexSim 17.1.6
dll maker
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

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo edited

Try adding its declaration to your declaration.h and FlexsimFuncs.h:

declaration.h:

  1. inline void setanimationvar(TreeNode* theObj, int animNr, char* varName, const Variant& toVal)
  2. {return setanimationvaralias1(theObj, animNr, varName, toVal);}
  3. inline void setanimationvar(TreeNode* theObj, char* animName, char* varName, const Variant& toVal)
  4. {return setanimationvaralias2(theObj, animName, varName, toVal);}

FlexsimFuncs.h:

  1. typedef void (*_setanimationvaralias1)(treenode theObj, int animNr, char* varName, const Variant& toVal);
  2. typedef void (*_setanimationvaralias2)(treenode theObj, char* animName, char* varName, const Variant& toVal);
  1. DECLARE_FLEXSIM_FUNCTION_3(setanimationvaralias1, "?setanimationvar@FlexSim@@YAXPAVTreeNode@1@HPADABVVariant@1@@Z", "?setanimationvar@FlexSim@@YAXPEAVTreeNode@1@HPEADAEBVVariant@1@@Z")
  2. DECLARE_FLEXSIM_FUNCTION_3(setanimationvaralias2, "?setanimationvar@FlexSim@@YAXPAVTreeNode@1@PAD1ABVVariant@1@@Z", "?setanimationvar@FlexSim@@YAXPEAVTreeNode@1@PEAD1AEBVVariant@1@@Z")

setanimationvar3.png (188.2 KiB)
· 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.