question

Daniel avatar image
0 Likes"
Daniel asked Sebastián Cañas commented

FluidGenerator setting by using flexscript

1736239774645.png

How can I set the Refill Mode and Refill Rate for a Source object in FlexSim using FlexScript, similar to how I set the maximum content with setvarnum(newObj, "maxcontent", 10);?

FlexSim 24.2.0
flexscriptproperties setting
1736239774645.png (64.2 KiB)
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

Sebastián Cañas avatar image
0 Likes"
Sebastián Cañas answered Sebastián Cañas commented

Hey @Daniel ,

You can use:

  1. // Refill Mode: 1 Continuous Refill - 2 Complete Refill When empty
  2. setvarnum(newObj, "refillmode", 1 /*1 or 2*/)
  3. //Refill Rate
  4. setvarnum(newObj, "refillrate", value)


· 2
5 |100000

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

Daniel avatar image Daniel commented ·

Thank you so much. How about output port, How can I set the maximum object and maximum port rate in flexscript? Thank you for your help!

0 Likes 0 ·
Sebastián Cañas avatar image Sebastián Cañas Daniel commented ·

@Daniel ,

  1. // Output ports - Maximum Object
  2. setvarnum(newObj, "maxobjectoutrate", value);
  3. // Output ports - Maximum Port Rate
  4. setvarnum(newObj, "maxportoutrate", value);
0 Likes 0 ·