Hi all,
I currently trying to write a condition so that based on what an excel file provides to Mathcad, "Yes" if there are variables, "No" if there isn't any variables. The goal is that instead of have multiple writes to Excel I can go to 1 write. However there is no way currently to predetermine how many circuits will be needed. So my plan is for Mathcad to get a variable from excel to determine if there is any content in the variables and if not load a 0 in its place.
@Johnruehlz wrote:
Hi all,
I currently trying to write a condition so that based on what an excel file provides to Mathcad, "Yes" if there are variables, "No" if there isn't any variables. The goal is that instead of have multiple writes to Excel I can go to 1 write. However there is no way currently to predetermine how many circuits will be needed. So my plan is for Mathcad to get a variable from excel to determine if there is any content in the variables and if not load a 0 in its place.
Let's see:
This template is created for eight feeders however this windfarm only has four feeders. Remaining cells not being used in excel should remain zeros.
As far as I can see, if you passed the "Mathcad Export" sheet to Mathcad, it would tell you there are 21 x 250 variable values present. You could strip out the zeros; but such a procedure would also strip any valid zero in the data.
Both Mathcad and EXCEL understand "NaN" (Not a Number). Maybe you could use that. But I can't tell, from what you sent, what you want to have happen.
The variables are all achieved through importing to Mathcad.
My goal is create one write function to Excel, since the write function takes so much time to achieve if I can cut by 1/10 I would be greatly increasing efficiency. However since each Wind farm can have numerous amounts of different circuits. I'm looking for a way for Mathcad to able to "ignore" the circuit and leave the areas in the matrix as zeros. If this makes sense.
My idea was to use global variables to initialize each "Circuit" with zeros so that if no value was entered the Mathcad would just use those values, however I realized that if there is an uninitialized variable set equal to that variable underneath of the global variable, the variable will still be uninitialized still!
See below where I'm working with only two circuits.