This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks

Tips and Tricks Share helpful modeling ideas

Old 01-22-2016
Axel Kohonen
Posts: n/a
Downloads: 22
Uploads: 0
Default DLL change between Flexsim 7.5 and 7.7 - Returning strings from dll/C++


I noticed that my .dll file stopped working when I changed from Flexsim 7.5 to 7.7 and after asking Phil from Flexsim I got the answer, which is that the stringreturn function is deprecated, but instead you can return strings directly from the dll/C++ function instead of using the stringreturn function. There are also a few changes to the function definitions in the dll
In your function, return a Variant, and change visible into __declspec(dllexport). For example:

__declspec(dllexport) Variant dllcommand1(FLEXSIMINTERFACE) {
// test passing parameters in usercommand
string par1 = parstr(1);
pt("string parameter ");pt(par1);pr();

return par1;
Also, on the dll side the param() declaration does not work yet, but
parstr(), parval(), and parnode() should continue to work for the foreseeable future. If you update your flexsimcontent so that you have the param() declaration, you should be able to change them into param() if you want.
The Following 3 Users Say Thank You to Axel Kohonen For This Useful Post:
Jing Chen (01-22-2016)

c++, dll, flexsim 7.7, string, stringreturn

Thread Thread Starter Forum Replies Last Post
Returning multiple num's from a user commands Benjamin Cohen Q&A 1 05-27-2015 07:25 AM
FlexTips: Returning a License in FlexSim Markus Cueva FlexSim Media 0 09-04-2013 12:29 PM
Returning elevators to a certain position when idle Christian Norregaard Q&A 1 10-25-2011 02:09 PM
Read strings separated with a semi-colon from an Ascii file Tom David Q&A 4 03-15-2010 01:24 PM
Passing strings into a usercommand Nico Zahn Q&A 6 01-13-2010 11:20 AM

All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.