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 11-10-2009
Bill Lank Bill Lank is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 15
Downloads: 13
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 156
Bill Lank is on a distinguished road
Default Trouble with Build All Flexscript

I'm having an issue converting a Flexsim 4.3 library to 4.5.2

The following Fexscript code snippet illustates the issue.

If you run it the code after the mainmenucommand("Build|Build All FlexScript") does not execute. Any idea what I've done wrong?


mainmenucommand
("View|Output Console");
windowmove(systemwindow(1),7,100,768,550,1);
pr();pt("Start Test Build ALL");
mainmenucommand("Build|Build All FlexScript");
pr();pt("End Test Build ALL");
  #2  
Old 11-11-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

I am not sure, but the Main Menu Command is either
Build Flexscript
or
Make All Code Flexscript

I hope this was the problem ...
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #3  
Old 11-11-2009
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Red face

There exist no more entry "Build All Flexscript". It is just "Build Flexscript" or "Make All Code ...".

Jörg

Tom was faster!
  #4  
Old 11-11-2009
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Tom and Jorg:

mainmenucommand() calls functions that were on Flexsim1's original menu. The menu has changed significantly since then, and the command hasn't been updated accordingly. Only certain things work for that command, and you can usually only find what those are by looking at what the code behind what various Flexsim buttons and menus are doing. Some of them use it; others do not.

Bill,

Your code is right, but you are probably calling it from a node that is toggled as Flexscript, which rebuilds that node in the build all flexscript call and thus stops execution. If you run it from a script window, it works fine.

All,

On a side note, for Flexsim 5.0, we've added another command that is more dynamic to make calling the functions on the current menu easier. The syntax is similar, but it uses the current menu rather than an old system.
The Following 5 Users Say Thank You to Phil BoBo For This Useful Post:
Tom David (11-12-2009)
  #5  
Old 11-11-2009
Bill Lank Bill Lank is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 15
Downloads: 13
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 156
Bill Lank is on a distinguished road
Default

Thanks Phil,

You're right if I don't toggle the node as Flexscript it works fine.


Thread Thread Starter Forum Replies Last Post
Trouble with mergesort... Paul Dowling Q&A 6 02-23-2009 11:20 PM
about flexscript Kang Han Q&A 2 10-03-2008 09:21 AM
Static Variables in Flexscript? Joe Allen Q&A 7 09-18-2008 12:43 PM
size of arrays in Flexscript Steven Hamoen Q&A 13 06-23-2008 01:04 PM
Clean Flexscript Steven Hamoen Q&A 1 04-04-2008 07:00 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.