13-Aquamarine
September 5, 2025
Solved
Pass on variable as string to another Prime Sheet
- September 5, 2025
- 3 replies
- 838 views
Yes, there should be a way to pass variables by name, or at the very least convert between strings and variables.. A possible conceptual problem in Mathcad with such a proposal is that a variable would appear in a workspace without having been explicitly created (going the other way wouldn't be an issue). However, this might not be an actual problem once people had got used to the idea. And, certainly, going from variable name to string should not be a problem.
Like many other capabilities, this feature has been the subject of a long-standing request. It should be possible to programmatically create variables with, for example, sequential suffix numbers.
However, depending on your use case, it may be possible to achieve what you want through Automation. This would mean using, say, an advanced control to write or rewrite a region in a worksheet.
See, for example, https://support.ptc.com/help/mathcad/r11.0/en/?utm_source=mathcad/index.html#page/PTC_Mathcad_Help/API/example-7_send_sexpressions.html#
Stuart
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.