ATTENTIONThis 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 |
#1
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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 |