question

Zoe Liu avatar image
2 Likes"
Zoe Liu asked Zoe Liu commented

Question about the type of function created in dllmaker

Hi,

I tried to write a simple addition logic in DLL Maker. When I define dllcommand3 as a double, the return value is correct,

but if I define dllcommand3 as int, the return value becomes 0.

What is the reason, thank you !

FlexSim 18.1.1
dll
1.png (39.6 KiB)
2.png (71.4 KiB)
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
1 Like"
Phil BoBo answered Zoe Liu commented

FlexSim node function bindings expect the function to return either a double or a Variant.

FlexSim stores numbers in double format. Just return a double, as in your original screenshot.

If you want to return a value that isn't a number, such as a string, have your function return a Variant.

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

Zoe Liu avatar image Zoe Liu commented ·

Thanks for your help.

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.