Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
The MathCAD code generated by Chatgpt is pasting as text instead of Math input, and due to this issue it need to be manually typed in MathCAD.
Is there any solution exist for this issue.
Solved! Go to Solution.
No, there isn't.
Personally I doubt that any code by ChatGPT (or any other AI interface) will produce valid MathCad input.
Care to show what you've gotten from ChatGPT?
Success!
Luc
No, there isn't.
Personally I doubt that any code by ChatGPT (or any other AI interface) will produce valid MathCad input.
Care to show what you've gotten from ChatGPT?
Success!
Luc
This isn't the first time I've seen someone claim that ChatGPT can produce Mathcad input (that isn't something for an Advanced Controls script), but I have no idea how such a thing can even be possible.
Well, ChatGPT is being used for programming. It apparently is quite helpful to create Python, C and basic code. I would not be surprised if it also does lisp. And Prime equations appear to be stored in a lisp-like language. If ChatGPT would come up with this:
(@EQ (@DERIV t @PLACEHOLDER (@APPLY (@ID V (@SUB x)) (@ARGS t))) (+ (* D (^ (@ID V (@SUB x)) 2)) (* (* M (@APPLY (@ID V (@SUB y)) (@ARGS t))) (@ID S (@SUB y)))))
when pasted into an empty math placeholder it is shown by Prime as
But then... one equation doesn't make a sheet.
Success!
Luc
Thanks a lot.
I appreciate your knowledge of MathCAD and helping all of us. This is really best reply which has open the doors for me to use the conversion of script.
best best regards.
By generating an MP tree of an expression and then using automation to generate/edit a region and plug the tree in?
Alternatively, generate a worksheet with the corresponding XML, open it in MP, then copy & paste the expression into another worksheet.
ChatGPT Query:
convert (f(x)+3*g(sin(x)+cos(y))) to mathcad prime tree
Result:
(@ADD (@APPLY f (@ARGS x)) (@MUL 3 (@APPLY g (@ARGS (@ADD (@APPLY sin (@ARGS x)) (@APPLY cos (@ARGS y)))))))
(ChatGPT does seem to think it's rather Perl-like)
(@ADD
(@APPLY f (@ARGS x))
(@MUL
3
(@APPLY g
(@ARGS
(@ADD
(@APPLY sin (@ARGS x))
(@APPLY cos (@ARGS y))
)
)
)
)
)
As an MP worksheet:
<?xml version="1.0" encoding="utf-8"?>
<MathcadDocument xmlns="http://www.mathsoft.com/mathcad">
<Worksheet>
<MathRegion id="r1">
<Expression format="mathml">
<![CDATA[
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<plus/>
<!-- f(x) -->
<apply>
<ci>f</ci>
<ci>x</ci>
</apply>
<!-- 3 * g(...) -->
<apply>
<times/>
<cn>3</cn>
<apply>
<ci>g</ci>
<!-- argument of g: sin(x) + cos(y) -->
<apply>
<plus/>
<apply>
<sin/>
<ci>x</ci>
</apply>
<apply>
<cos/>
<ci>y</ci>
</apply>
</apply>
</apply>
</apply>
</apply>
</math>
]]>
</Expression>
</MathRegion>
</Worksheet>
</MathcadDocument>
I'm speaking hypothetically - I haven't put it to the test. Well, apart from downloading the suggested .xmcdz file. Unfortunately, conversion fails; I'll let somebody with more time and less-pressing matters work out why. I'm good like that. 😇
Stuart
It is possible and can be done in the following way: https://rutube.ru/video/70d4f544a506b57edc3939be1233a756/
Прикольно, Вячеслав!
I look forward to your Mathcad Prime video of the same. 😈
Stuart
There are many of you, and I am alone. The direction you showed will lead to a practical result. I have already implemented this, but I am not interested in Mathcad in this regard, since I do not use it.
I just wanted to support you. It is much easier to move forward when you already know that success is achievable.
You need a propmt engineer. There is such a profession now. He needs to develop a methodology for interacting with AI. The method that I use is not simple. And you can throw chatgpt in the trash if you want to go this way.
In my implementation, I myself am the developer of some of the system components, so I know the details of the document format implementation. In your case, you need to beg for such details from PTC or study the document format. Why should I do this? You have a lot of people here.
If you want to have a full generation of a Mathcad document, you will find a way.