question

Aravind D avatar image
0 Likes"
Aravind D asked Aravind D edited

how to make a dll run in flexsim to get the result displayed in flexsim

Hi,

I have a DLL that returns a float from a custom DLL built in code-block using c++ language.

The codes that are written in DLL header files, Functions called all are shown in the pictures below

I am getting the results in the C++ program as shown in image in cmd

How can use the same dll to get the same result as in the cmd in flexsim

Where can i write the codes to print the output in flexsim to get the results in flexsim

Can someone help regarding this

Thankyou in advance

the first image is dll headers

second image is functions called in dll project main

the third image is code to get output in c++ cmd ( i want to know where i have to type the codes in 3rd image in flexsim to get the results)

the fourth image is result which i got from c++ cmd

FlexSim 19.2.2
dll c++
1.png (17.7 KiB)
2.png (22.7 KiB)
3.png (30.2 KiB)
4.png (9.3 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

tannerp avatar image
1 Like"
tannerp answered Aravind D edited

Hi @Aravind D,

If I understand correctly, you are looking for the best place to output (print) results from your code in FlexSim. I recommend using the Output Console, which can be found under "Debug" at the top of the window. You can output just about anything you want in the Output Console in FlexSim. You can use triggers in 3D objects, custom code activities, etc. to accomplish this. Hopefully this helps.


output-print.gif (54.3 KiB)
· 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.

Aravind D avatar image Aravind D commented ·

@tanner.p Thank you so much sir. This is very much helpful. I have another doubt. In custom code activity after changing the code to c++ can i write c++ format code will it work. For Example i have attached a picture which contains hello world code in C++ format. will it work if i use it exactly as shown in picture ara.png

0 Likes 0 ·
ara.png (6.3 KiB)