Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi,
I have an equation that I manipulate in Mathcad and I would like to communicate the resulting expression to an acquaintance as text.
How do I copy/paste my equation as string of ASCII characters?
e.g. expression from math region:
I would like the string that I copy to look similar to this: a^2*(b*x+c)/c
The clipboard content is: "(* (^ a 2) (@PARENS (/ (+ (* b x) c) c)))"
Is this functionality not present by design?
Solved! Go to Solution.
Sorry, but there is no way to do what you want.
Sorry, but there is no way to do what you want.
Actually, the problem might be solvable!
Text has a perfect LISP syntax.
What you need is some kind of lisp to vba code converter as i see...
ccziezerski wrote:
Hi,
I have an equation that I manipulate in Mathcad and I would like to communicate the resulting expression to an acquaintance as text.
How do I copy/paste my equation as string of ASCII characters?
e.g. expression from math region:
I would like the string that I copy to look similar to this: a^2*(b*x+c)/c
The clipboard content is: "(* (^ a 2) (@PARENS (/ (+ (* b x) c) c)))"
Is this functionality not present by design?
That's interesting. I tried looking at the clipboard contents with Mathcad 14 and all I can see is an image of the equation. Is this a Prime thing or does the capability exist to show this in Mathcad 14/15?
If it's possible to paste that string into a variable, then it shouldn't be *too* hard to write a function to convert the prefix notation into infix notation.
One other way of doing it (not sure if it would work in Prime as it doesn't have components(??)) would be to Tag the region(s) containing the equation(s) of interest, do a region search (within a component) for the tag, get the regions; xml string and then convert that string (which is in prefix form, albeit heaving xml-ed) to infix notation. ... although if such a conversion function existed, then it should be just a matter of manually finding the tagged region in a text editor, copying it and pasting into a Mathcad worksheet containing the converter function.
It should really be a built-in capabilty, after all, Mathcad already knows how to do this to display the equation in the first place.
Stuart
PS. There have been many, long-standing requests to do back-and-Forth (programming joke) conversion between Mathcad's display and standard programming formats.
That's interesting. I tried looking at the clipboard contents with Mathcad 14 and all I can see is an image of the equation. Is this a Prime thing or does the capability exist to show this in Mathcad 14/15?
It's a Prime thing.
One other way of doing it (not sure if it would work in Prime as it doesn't have components(??)) would be to Tag the region(s) containing the equation(s) of interest, do a region search (within a component) for the tag, get the regions; xml string and then convert that string (which is in prefix form, albeit heaving xml-ed) to infix notation. ... although if such a conversion function existed, then it should be just a matter of manually finding the tagged region in a text editor, copying it and pasting into a Mathcad worksheet containing the converter function.
Prime does not have tags for regions, does not have components, and the XML is full of non-printing characters (look at a .mcdx file in Notepad, and it bears little resemblance to a .xmcd file). Aside from that, what you suggest should work perfectly
PS. There have been many, long-standing requests to do back-and-Forth (programming joke) conversion between Mathcad's display and standard programming formats.
A real gem (perhaps a Ruby?) of a joke.
Hi All,
thanks for all the answers.
It seems the clipboard output is actually quite useful after all. The structure is always [operator] [operands] with symbolic instructions using '@' and then it's a matter of managing parenthesis levels. I can work with that
PS. Yes, this is Express Prime 3.1
Tell us please, have you this converter to normal form after all?
Hope this webpage could help you, it is writen in Chinese, and use the Mathcad15, and I don't try it in Mathcad Prime.
I spent a lot of time trying to make it work.
There are still some roughnesses, but it's really looks right
Code in txt