Quantcast
Channel: PTC Community : Popular Discussions - Other Subjects
Viewing all articles
Browse latest Browse all 5789

VB Script Question

$
0
0
I have spent most of the morning looking through the Developer�s Reference Manual and the Programming Quicksheets; however, I still have a few questions.

I am using MathCAD Controls and Scriptable Objects (ListBox and ComboBox respectively) for a pipeline calculation and I am having issues resolving a particular problem. As I mentioned previously, I am experienced with Visual Basic in the excel environment and I have gone through the Quicksheets and other help option to further understand how Visual Basic is used in the Script Editor. I understand the structure of the script and the order of the event handlers but I do not know how to properly manipulate inputs and outputs. I know how arrays are coded in visual basic so the syntax is not an issue, rather, I struggle interacting with the MathCAD environment.

How do I modify the
�Outputs(0).Value=ListBox.CurSel + 1�
in the Exec handle in the ListBox script editor to return the value of the numeric selection rather than the number of the line?

How do I apply this to a ComboBox? I.E. how do I simply return the value of the selection from the drop-down menu?

Also, how can I input values from a matrix defined in the same worksheet to the values in the ComboBox drop down?

I have accessed MathCAD�s Automation interface but I seem to be going in circles. Once I understand how to read Inputs from the worksheet and display outputs in both ListBoxes and ComboBoxes I know I can progress to more complex problems with my knowledge of VB.

I hope my questions are clear and I thank you for your time.

Viewing all articles
Browse latest Browse all 5789

Trending Articles