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 08-08-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default reading from excel

Hi,

I have an excel file with a cell typed within: normal(10,5,0)

I want to read that information to be used as process time.
At process time, I coded like this:

treenode current = ownerobject(c);
treenode item = parnode(1);
/**By Expression*/
/** \nExpression: */

string value1=excelreadstr(2,1);
double value = /**/tonum(value1)/**/;
/** \n\nNote: The expression may be a constant value or the result of a command (getitemtype(item), getlabelnum(item, "labelname"), etc).*/
return value;

What's wrong with the codes? Please assist.

Chieng
Attached Files
File Type: fsm process time distribution.fsm (61.2 KB, 117 views)
  #2  
Old 08-08-2011
Carsten Seehafer's Avatar
Carsten Seehafer Carsten Seehafer is offline
FlexSim Geek
 
Join Date: Oct 2008
Location: Ritterhude, Deutschland
Posts: 230
Downloads: 45
Uploads: 1
Thanks: 474
Thanked 320 Times in 143 Posts
Rep Power: 379
Carsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud of
Default

Hi,

please take a look at the following command:

executestring(str thestring[, node c, node i, obj eventdata])

Description:
Executes the given string as flexscript. Parameters 2-4 are the same as executefsnode.

Example:
executestring("profileevents()");



Greetings

Carsten
The Following 2 Users Say Thank You to Carsten Seehafer For This Useful Post:
michaelsmith (08-09-2011)
  #3  
Old 08-08-2011
Chieng Kai Seng Chieng Kai Seng is offline
Flexsim User
 
Join Date: Jul 2011
Location: Malaysia
Posts: 39
Downloads: 0
Uploads: 0
Thanks: 22
Thanked 0 Times in 0 Posts
Rep Power: 109
Chieng Kai Seng is on a distinguished road
Default

Thanks Carsten! Works great!


Thread Thread Starter Forum Replies Last Post
A Few Misc. Notes while reading through the Book Sean HensleyMSU Flexsim Student Forum 3 08-19-2011 11:41 PM
Reading Tables from a Database !! Nischith Kashyap Q&A 6 03-03-2011 01:05 AM
Excel 2002 vs. Excel 2007 Nico Zahn Q&A 2 04-27-2009 01:47 AM
Reading Stats function from global table David Chan Q&A 4 05-27-2008 08:51 AM
What are you reading? Nico Zahn Q&A 4 05-09-2008 11:46 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.