Skip to main content
1-Visitor
May 29, 2011
Question

Script Output to a vector

  • May 29, 2011
  • 1 reply
  • 3329 views

Hello All,

I am new to this community and have a question regarding script output to a vector. I have searched existing discussions and cannot seem to find exactly what I want.

I have a worksheet containing a `list box` of steel sections and wish to output the properties of a selected section into a vector. A `list box` will only allow four outputs and I require seven, hence the vector. So I only have one output, into a vector of seven elements - but I can't for the life of me work out what the line of script should contain to do this. The vector is called `Props` and contains the seven elements.

This is the line I am trying to use -

Outputs(1).Value = Worksheet.getvalue("Matl").GetElement(Sel,5)

My question is, what do I need to add to the line to get it to put the appropriate value into the Props vector?

Many thanks,

Regards Ned

1 reply

1-Visitor
June 15, 2011

Hi Neil,

Sorry for the late reply, I have been away with work.

Yes, this can be done. Can you provide a worksheet to work with please?

Mike

NedMoran1-VisitorAuthor
1-Visitor
June 15, 2011

Thanks for your input Mike,

Since I posted my question and after much trial and error I have managed to find the solution myself. This turned out to be very simple in the end, but is never obvious when first confronted with it.

Outputs(1).Value (n) = Worksheet.getValue ("Matl") -------------------------- etc. Where `n` = the nth row of the vector - how simple is that?

Regards Ned

19-Tanzanite
June 15, 2011

There are a lot of example scripts here:

Extra Components.mcd