Can FlexSim has its input in XML and output in XML?

Can FlexSim has its input in XML and output in XML?

chanykE2WUT
Enthusiast Enthusiast
118 Views
3 Replies
Message 1 of 4

Can FlexSim has its input in XML and output in XML?

chanykE2WUT
Enthusiast
Enthusiast

[ FlexSim 16.1.0 ]

Hi,

I have a question regarding Flexsim functionality. I would like to create a supply chain simulation model using software, but I want my simulation model to receive an XML file as the input and generate XML file as the output also.

Can Flexsim do that?

Rgds,

David (Asking on behalf of Iskandar Halim)

0 Likes
Accepted solutions (1)
119 Views
3 Replies
Replies (3)
Message 2 of 4

sam_stubbsYXX86
Community Manager
Community Manager

So the quick answer is that FlexSim does not have any built in XML parser. However using certain FlexScript commands it is possible to read in from an XML file and extract data, and also to use commands to write to a file (which you could write XML as the output).

When importing or extracting data, you would open a file using the fileopen("FileName") command, and then you can use the filereadline() commands to parse through the file line by line. (Likely you'd want to write a "for" or "while" loop to do this.) And you can write to files using the fpt() command. Then close the file using the fileclose() command.

For more information regarding reading from and writing to files via FlexScript, look in the command help documentation, (In the top menu under Help > Commands) and look under the Output section in the command help library.

0 Likes
Message 3 of 4

Ben_WilsonADSK
Community Manager
Community Manager
Accepted solution

As @Sam Stubbs noted, FlexSim does not have a built-in XML parser. However, FlexSim does allow you to compile C++ code (with Visual C++ installed) or link to external DLLs. In both cases you could find an existing XML parser that you could incorporate into your project.

Here is a quick Google search to get you started. This is for C++ XML parsers. If you link to a DLL, you are not limited to C++.

If you go down this road and get stuck or have questions, start a new question here at Answers!

Message 4 of 4

matt_long
Not applicable

The DLL Maker Visual Studio project/files can be downloaded from BitBucket:

https://bitbucket.org/flexsim/flexsim-dll-maker

0 Likes