cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

VB code in Push Button

Highlighted
Amethyst

VB code in Push Button

Hello all,

I ahve this irritating problem in VB code. I'm trying to add up to arrays of equal dimension via a push button control in MathCad (15 on Win 7) so that the output get's written only on demand to a file. But to no avail. Can't figure out what's wrong - see attached MC file.

Does anybody know enough of the BV in Mathcad to help?

Raiko

14 REPLIES 14

Re: VB code in Push Button

Which summation are you trying to achieve?

Clipboard01.jpg

Mike

Re: VB code in Push Button

Hi Mike,

summation in the sense that I want to extend the array by the array I'm adding up. In the example I have a column array (vector) which I'd like to extend with another vector of equal size so that the result is a two-column vector.

Cheers

Raiko

Re: VB code in Push Button

Oh, so you mean like augment?

Mike

Re: VB code in Push Button

Correct!

Re: VB code in Push Button

I haven't seen that done before and not an expert on VB by any means.

If you don't mind me asking, what is the purpose of augmenting using a push button? Because I have few ideas to get around the issue.

Mike

Re: VB code in Push Button

Hello Mike

whenever I'm computing something and I do change a parameter I can see it with one set of parameters. Changing that changes the results, therfore I want to store the results in an intermediate file and only after I've changed some parameters and settings to add another set of data (i.e. on the click of a button). Later I'd retrieve the data for comparison.

I want to do it in VB as MC computes all the time and I can't control when it is stored in an external file.

Raiko

Re: VB code in Push Button

That's slightly different than what I had in mind.

I think you'll have to wait for one of the VB guru's to get involved. The only thing I could think of is passing multiple inputs and augmenting the data in a way it can be compared. But this is different from what you want.

Mike

Re: VB code in Push Button

Thank's a lot anyhow Mike

Cheers

Raiko

Re: VB code in Push Button

I have a smilar problem, wanting to permute design values and save desireable results for use eslewhere.

Since I know almost nothing about VB, I've taken a different path:

Use a Mathcad file WRITE or APPEND command, but disable evaluation of the command. When I get a result I want to save, I enable the command (which modifies the file), then disable it again immediately. This isn't as elegant as a pushbutton, it requires two right-clicks and two clicks and an enter, but it works. And all that clicking will be good training for Prime!! 😉