Jump to content
Ventilation & Flow Simulation Forums

Static script: Index outside bounds of array?


Recommended Posts

Hello,

I'm trying to set up an extensive static script.

For the script I'm only changing the fixed WB/DB of a couple of airways. However, I keep getting an error message "Index was outside the bounds of the array". 

image.thumb.png.c02618205a3cf2197a9c175d038971da.png

image.thumb.png.a1ffa1c13f6fa0f3e3f0b389de2a638d.png

Thinking that the extensive nature of the script is at fault, I cut it down significantly (total 172 airways). Still the same issue. I created test script files to see which values change when manually adjusting the fixed values, but everything appeared to be in order. Finally I tried to run a freshly created script without making any changes at all - I still get the error message, which seems a bit odd to me.

What have I overlooked, and how can I fix it? Note that I'm running VS Design Premium 5.4.8.7 64bit.

Cheers!

Fred

Link to comment
Share on other sites

Hi Fred,

You are the second person recently that has experienced this error with the static script. I think a bug has found its way into the static scripting tool sometime late in the 5.4 versions, so I don't think there is an issue with your script in particular.

I'm going to look at this tomorrow and then send you some further feedback on a fix. 

If you would like us to test with your script and file combination you can email it to us at ventsim.support@howden.com. However, I think for now I'll see if I can get a fix in soon for this for the next release.

Regards,
Craig

Link to comment
Share on other sites

Hi Fred,

I have found the bug and fixed it for the next release. There is also a work around for current versions though:

Go to the end of the script file and delete the headers columns that are empty in all of the rows underneath, like the ones marked below:

image.thumb.png.6c82cd9ef7036440ac464beb52dc8d7a.png

With the current versions, you can also delete any columns from the script that contains values that do not change between the scripts, the only ones you must keep are at the beginning columns that store the airway ID values.

So for example if you were just adjusting the size in an airway across the scripts you can remove all the other columns and keep the ID ones and just the size related columns and that will work. 

Regards,

Craig

Link to comment
Share on other sites

  • 2 weeks later...

Hi @Craig Christensen,

I believe I may have found another bug. Not sure whether it is only in my VS5.4 version or also in VS6.

I had the script file set up so that for every script number, there would be a different value for "fix wb" and "fix db" for a particular airway.

Example INPUT:

  • Script 1: fix wb = 20, fix db = 25
  • Script 2: fix wb = 19, fix db = 26
  • Script 3: fix wb = 18.5, fix db = 25.5
  • ...

I believe that I have confirmed that the fields were correct before I made the desired changes to the input file. The scripts in the input file are not separated by empty rows, as this forces the file execution to stop.

image.png.52a66fddaadf47e78d8042a7b8d10353.png

I executed the input file with the following settings ("Selected Output" returns an error)

image.thumb.png.95cc3dd1f1759fa64199e8b85215b6a9.png

The input file was executed ran without errors.

However, the output file showed that only the "fix wb" and "fix db" values of the first script number were used, for every single script.

Example OUTPUT:

  • Script 1: fix wb = 20, fix db = 25
  • Script 2: fix wb = 20, fix db = 25
  • Script 3: fix wb = 20, fix db = 25
  • ...

Any hints, tips or tricks?

Regards,

Fred

Link to comment
Share on other sites

Did I perhaps forget to include some columns in the input file? I noticed that the values found in the columns "newfix db" and "newfix wb" are the same as "fix db" and "fix wb", except for blanks (-99999 for "newfix..." and 0 for "fix...")

Link to comment
Share on other sites

Dear Fred

To change the WB/DB Temperatures of a specific gallery or set of galleries you need to make sure you comply with the following settings:

 

1. The ED column - heat active (if you haven't deleted the rest of the columns) in your script should say True

To achieve this, you can fix a temperature in the gallery or set of galleries where you want to change the temperature in Ventsim and then create your script for that ventsim file.

 

2. The new temperature settings should be changed in the HI - newfix wb columns and HJ - newfix db.

Let me know if that solves your problem.

Kind regards.

Link to comment
Share on other sites

Posted (edited)

Thank you Daniel, I have included the heat active and newfix columns and it appears to have worked.

Clearly haven't paid as much attention as I should have... 😁

Regards,

Fred

Edited by Fred_K
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...