ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. 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.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 07-06-2012
Stephan Seidel's Avatar
Stephan Seidel Stephan Seidel is offline
Flexsim User
 
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 36
Downloads: 20
Uploads: 0
Thanks: 26
Thanked 22 Times in 8 Posts
Rep Power: 150
Stephan Seidel will become famous soon enough
Default Saving as .fsx works fine - Loading from .fsx doesnt!

Hi Forum,

I've got a question regarding saving and loading .fsx files. Right now I'm looking into ways on how to use version management in Flexsim. The XML approach with using distributed fsx files looked promising but when I am trying to load my model from a previously saved fsx file Flexsim crashes and comes up with the following error messages (system console):

Flexsim 6 (loading a fsx file from 5.1.2, as well as loading a fsx from 6.0):
exception: Exception caught in flexscript execution of VIEW:/nodefunctions/menucommands/File/openmodel line 40 instruction 97. Discontinuing execution.

Flexsim 5.1.2:
exception: Exception caught in linkedlist::loadxml()
exception: Exception caught in flexscript execution of VIEW:/nodefunctions/menucommands/File/openmodel line 44 instruction 109. Discontinuing execution.

This points to a function called:
cmdloadbyextension(str filename, num silent)

I forgot to mention that loading the same model as .fsm works fine. Any ideas on how to tackle this issue?

Cheers,
Stephan
__________________
---
You can't have it both ways.
  #2  
Old 07-06-2012
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Send sample model files to tech support (or post them here) and we'll see if we can figure out the issue.
The Following User Says Thank You to Anthony Johnson For This Useful Post:
Stephan Seidel (07-09-2012)
  #3  
Old 07-10-2012
Stephan Seidel's Avatar
Stephan Seidel Stephan Seidel is offline
Flexsim User
 
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 36
Downloads: 20
Uploads: 0
Thanks: 26
Thanked 22 Times in 8 Posts
Rep Power: 150
Stephan Seidel will become famous soon enough
Default Solution the .fsx loading error

I sent my model to tech support and although the did not find the problem straight away they pointed to the UserCommand which caused the problem. The reason is that I used hardcoded strings in my model that did not only contain letters and numbers but also control characters such as STX (0x02) and ETX (0x03). The string was used for communication with an external application.
So once I removed these characters from the string the loading procedure from .fsx works fine. The workaround to include these characters in a string is also quite easy. Instead of declaring

Code:
string str = "STX_Hello_World_ETX";
where STX and ETX are ASCII characters, the same string can be declared by using

Code:
string str = concat(strascii(2), "_Hello_World_", strascii(3));
Hope this helps if anyone encounters a similar problem.

Cheers,
Stephan
__________________
---
You can't have it both ways.

Last edited by Stephan Seidel; 07-10-2012 at 02:01 AM.
The Following 4 Users Say Thank You to Stephan Seidel For This Useful Post:
Steven Hamoen (07-10-2012)


Thread Thread Starter Forum Replies Last Post
Which version of Visual Studio Express works best with FlexSim 6 Vadim Fooks Q&A 1 05-02-2012 12:49 PM
Problem in saving as fsp David Chan Q&A 3 10-18-2011 09:46 AM
How to use Global Table as orderlist to move output works? harry qin Q&A 9 05-24-2010 08:53 AM
About saving files Fernando Igor Q&A 3 01-18-2010 03:11 AM
State doesnt change on Combiner Stephan Korte Q&A 2 08-14-2009 05:18 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.