question

Freeman Wang avatar image
1 Like"
Freeman Wang asked Sam Stubbs commented

Is there anyway to set value to simplenode?

We want to set some values to a simple node. We found a command named "setsdtvalue", but it doesn't work. We'd like to know more about it and more details about the simple node, because we are finding a way to make the model smaller .

FlexSim 16.2.2
simplenode
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Steven Hamoen avatar image
5 Likes"
Steven Hamoen answered Sam Stubbs commented

@Freeman Wang

The sdt stands for Simple Data Type and is only interesting if you are creating your own dll, either for a module or for a standalone dll. If you want to know more about that download the Flexsim SDK. For more information check out this forum, for instance this post How do I convert a script to a dll and then call it

If you want to put a value on a node look at the node commands ( setnodenum() ) or use the labels. They are also nodes but very easy to manipulate and can contain every datatype that Flexsim offers.

· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Freeman Wang avatar image Freeman Wang commented ·

Sorry for replying late. I've tried that,however it didn't work.I can use it to set normal node using command like "setnodenum()" in dll. And still can't use it to set value to sdt node.

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen commented ·

@Freeman Wang You state you want to make your model smaller. Why do you want to make it smaller and what is the size? Because there are 2 things that make your model big which are embedded media like 3D shapes and CAD drawings or large tables with data. Otherwise your Flexsim model is always small. Changes nodes to simple datatype doesn't help you because nodes are already of the simple data type.

You state that "it didn't work" can you explain better what "it" is. So what have you tried to do (provide the code for instance or describe the steps ) and what came out. Because from your current description it is very unclear what you are trying to do.

0 Likes 0 ·
Freeman Wang avatar image Freeman Wang commented ·

@steven.hamoen Thanks a lot for your answers.The process flow and globle lists are also the improtant part we are learning .However we are short of samples about them,so if it's possible to give us some samples,it's will help a lot.

And this picture is what we did in the DLL(vs 2013),the result is we create a SDT calss node sucessfully without any value.

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen Freeman Wang commented ·

@Freeman Wang

Please take some time to read the documentation! You have clearly not read the Flexsim SDK as I proposed! The SDT is a c++ class and has nothing to do with setting values on nodes. The setsdtvalue is a very special function that only works in conjunction with creating SDT classes and its members

In this case just use: "setnodenum( node1, 11)"

If this is not working just use the debugger to see what the values of node1 and node2 are and if this code is ever reached.

Concerning the examples of process flow, there are a lot of those in the Flexsim manual. I propose you go through those tutorials. After that you should have a good idea of what is possible and how to use the different activities in process flow

1 Like 1 ·
Freeman Wang avatar image Freeman Wang commented ·

Maybe I didn't explain clearly. The reason that makes my model larger is larger numbers of data and item. It's just like Flexterm in a way. So I wanted to use sdt to store item details like what Flexterm does. And the "it" is using the dll.

-1 Like -1 ·
Steven Hamoen avatar image Steven Hamoen Freeman Wang commented ·

@Freeman Wang If you have a lot of data in your model, are you using bundles already? And given the fact that you work on a model similar to Flexterm, I think that using the process flow together with the lists would give you big advantages.

But coming back to your questions I now assume you are working with a DLL but are not able to get a value on a SDT my questions are the following:

1 Does your DLL compile?

2 Can you debug a function in the DLL?

3 Have you created a SDT class in the DLL?

If all answers are yes can you than please show the code that is not doing what you think it is doing? Because stating that using the DLL doesn't work is still a bit vague you have to be more specific.

0 Likes 0 ·