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-04-2009
Dane Lee's Avatar
Dane Lee Dane Lee is offline
Flexsim User
 
Join Date: Jun 2009
Location: Beijing China
Posts: 23
Downloads: 187
Uploads: 0
Thanks: 6
Thanked 0 Times in 0 Posts
Rep Power: 134
Dane Lee is on a distinguished road
Question o(Separator, current).v_unpack

if(o(Separator, current).v_unpack)
{
if(getrank(parnode(1)) == 1)
return containerport;
else return contentport;
}
This code is written "send to port" trigger,I don't understand "o(Separator, current).v_unpack", what means? And the code "int drawshape = (CORE->reeltable[(int) b_shapeindex].REELgettablesize() > 1);" is written library/transport/behaviour/cppfounctions/ondraw.
Hope your reply,thank you.
  #2  
Old 08-05-2009
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Dane,

First, it would be nice of you to fill out the "about me" section of your profile so that we can get to know the people asking for help on the forum.

Second, it seems to me that you are relatively new to Flexsim and the questions you are asking are concerning code that is in the library objects themselves. This is highly advanced stuff that you only need to get into if you are going to be making a new install of Flexsim. If you want to make a new object then you will get much farther much faster if you use the BasicTE and BasicFR.

Third, the following code:
int drawshape = (CORE->reeltable[(int) b_shapeindex].REELgettablesize() > 1);"
is basically a shortcut for the "drawobject()" command. There are probably only two or three people that could tell you exactly what everything means. I am not one of them. My guess is that they won't because you would end up doing yourself more harm than good. Especially when it is much easier to use the "drawobject()" command. Don't feel bad, I doubt they would tell me either and I work here.

Fourth, I couldn't find the location of the other code that you referenced. However, I looks like you located it in the library tree again. I am a little confused as to why you are looking into the library objects, but more power to you. Personally, I would stick to the BasicTE and BasicFR. In English, the code says that if the Seperator is currently toggled as unpacking (as opposed to splitting). then if the rank of the object is 1 then send to the container port (usually 1). Else, send to the content port (usually 2).

Good Luck,
Brandon
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Dane Lee (08-06-2009)
  #3  
Old 08-05-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

The o notation is from an old version of Flexsim when everything was C++. The current version of Flexsim uses the getvarnum() and getvarstr() commands to access variables on the object, such as:


if(getvarnum(current,"unpack"))
{
if(getrank(item) == 1)
return containerport;
else
return contentport;
}
else
return 0;
The Following User Says Thank You to Phil BoBo For This Useful Post:
Dane Lee (08-06-2009)


Thread Thread Starter Forum Replies Last Post
simple question about "Separator" Vic Li Q&A 5 01-14-2009 09:45 PM
Problem about Separator wutian Q&A 8 06-18-2008 11:58 PM
[Suggestion] multi tasking combiner/ separator KelvinHo Gripes and Goodies 0 05-20-2008 06:48 PM
How to get a full path of the current open Flexsim model file. Regan Blackett Tips and Tricks 7 04-17-2008 10:39 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.