Marco Busatto avatar image
Marco Busatto asked Ben Wilson edited

Hot rolling mill example (v6.0)


I have been checking the available models that you have as examples and I found one that could be very useful for the models I will have to do in the future; the issue is that I can't run it. The model (hot-rolling-mill-v6.fsm) was done in v6.0 and I'm using v18.1. As soon as I open the model and try to run it, I get a lot of Flexscript error messages and nothing happens in the model. In most of the errors, the message is: "Invalid type for parameter 2 in call to command setlabelstr. Expecting char*. Type is int".

I have been looking for information about this command (setlabelnum) to try to fix the errors and see how the model works but I haven´t succeeded for the moment. I would really appreciate it if someone could help me fix this problem so that I can run the model in 2018 and understand the logic behind it. Maybe @Regan Blackett or @Matt Long could give me some guidance as I think you were the ones making the model available in the forum.

Thank you very much in advance and thank you for your time!

FlexSim 18.1.2
flexscript errorexample modelsetlabelnum
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

Ben Wilson avatar image
Ben Wilson answered Ben Wilson edited

Hi @Marco Busatto,

FlexSim has progressed a ton since version 6.0 and the paradigm for model creation has shifted away from adding custom code to model objects to creating process flow logic that defines behaviors across your entire model. This old model was built on the old paradigm, with old FlexScript syntax. You'd probably be better off starting from scratch with process flow.

If you're new to FlexSim, I suggest starting with the tutorials. You can find these in our online user manual.

Matt, Regan, or another community member may still get back to you with some tips for getting the old model working, but in general, look to learn the new methods. This 7+ year old model won't be of much help as an example of how to build simulations using the latest versions of FlexSim.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Regan Blackett avatar image Regan Blackett ♦ commented ·

I built the original version of this in 2007, in version 4 of FlexSim. We kept it up to date until version 6, Unfortunately I don't have any plans to bring it up to date with current versions of FlexSim because I'd basically have to rebuild it nearly from scratch using our modern paradigm.

The specific error you're getting is probably because trying to update directly to a modern version of FlexSim (like 18) is too big a jump with all the FlexScript syntax changes that have happened over the years. Setlabelnum, for example has been deprecated for many years now.

So Like Ben said the best thing to do if you really want to see it run is download version 6 and run it there, but also like Ben said it is not at all typical for how you would go about building a model in version 18 or beyond.

1 Like 1 ·
Ben Wilson avatar image Ben Wilson ♦♦ Regan Blackett ♦ commented ·

@Regan Blackett's comment above:

trying to update directly to a modern version of FlexSim (like 18) is too big a jump with all the FlexScript syntax changes that have happened over the years

Alludes to something that bears further explanation:

As far as general forward compatibility for model files, FlexSim actually does quite well if you take it in steps. For instance, for a FlexSim 6.0 model, you may need to open and save in version 7.5, then 17.0, then the latest and greatest. For almost any model, doing step upgrades in this manner does work to upgrade a model so that it will run in the latest version of FlexSim.

Because of everything else mentioned in all the comments above, we don't feel you should bother with that for this particular model or use-case, but if someone finds this Q&A while looking for info on upgrading an older model to work in FlexSim's latest versions, doing step-by-step upgrades in the manner described does work well.

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Marco Busatto,

Another thought - since the model in question won't be of much use as an example for starting a new model in a current version of FlexSim, but you may still want to view the model, I suggest downloading an older version of FlexSim and running the model there.

FlexSim licenses are backwards compatible, so if you install FlexSim 6.0.2 on your computer alongside your current version, it will be able to use the license already activated to your computer and will start fully licensed with no effort on your part. Also, FlexSim 6 should install in its own directory and not effect your newer installation.

Only licensed accounts can download older versions of the software, but as you are licensed, you can access the brown "more versions" button from your downloads page to see and download older versions of FlexSim, including version 6.0.2.

0 Likes 0 ·