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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Need help on a couple of objects in Mathcad Prime 7 automation API

GT_10672348
4-Participant

Need help on a couple of objects in Mathcad Prime 7 automation API

Hello,

I would like to better understand the object "ValuesSetter". Description says it is for setting multiple values of double or matrix scaled values by alias. What does "multiple values" mean? How can a single alias, which is supposed to represent a single mathcad variable hold multiple values?
And how is this different from Worksheet methods "SetRealValue", "SetStringValue" & "SetMatrixValue"?
If there's someone who could give a sample code in VB using the object ValuesSetter and one of its methods, that would be great.
There is also an object called SetValueResults. Is it related to object ValuesSetter?

 

And, does anyone know if it is possible to create a matrix of "strings"? Or mix of strings and double even?

The method "SetMatrixElement" of the Matrix object and the method "SetMatrixValue" of the object Worksheet only create matrices of type double.

I guess I can send the string one by one to mathcad, then group them into one matrix inside the mathcad but I'd like to know if there's a simpler way.

Oh, I actually need to do the reverse as well, but I would like to figure that out myself after someone teaches me how to send matrix of strings to mathcad first.

 

Thank you and Best regards,

ge

 

 

 

 

2 REPLIES 2

Hii, 

I have some idea related it that the object "ValuesSetter" in Mathcad is designed to set multiple values of double or matrix scaled values using aliases. When it mentions "multiple values," it refers to the capability of setting multiple values in a single operation, rather than setting each value individually. In Mathcad, an alias is a symbolic name that represents a single variable or expression. The concept of aliases allows you to assign values or expressions to a symbolic name and use it in your calculations.

GT_10672348_0-1689065045946.png

Thank you for the reply.

However, the syntax does not illustrate capability to set set multiple values in single operation. I attached the syntax for the ValuesSetter method AddScalarValue above. What do you think? 

Announcements

Top Tags