Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
I have been using MathCAD for about 20 years but never the developer’s programing feature. Recently your company purchase a program the will interface with Python, MatLAB, and C++. The program is Orcaflex and is a FEA program. I have started teaching myself Python seems to be the easiest to learn. The Orcaflex program seems to have a class of variables that can be passed to other programs. My understanding is Python cannot be used for scripting in MathCAD. Orcaflex does have an API to allow for linking and a C++ library that can be used. This is a vague question, but I am looking for guidance on the next step. Some of the options are:
Write a C program that calls a MathCAD worksheet.
Write a Vbasic script to transfer the variables.
I am sure there other options, but guidance for the next step is what I am looking for.
Thanks in advance for the support.
It's not clear to me want you want to do. Control Mathcad from Orcaflex, control Orcaflex from Mathcad, or control both from a third piece of software (e.g. a Python program).
I think it can be done either way, control Orcaflex from MathCAD or pass data to MathCAD from Orcaflex, analyze, and return to Orcaflex. The starting point, I think, would be to pass the data to MathCAD, then back to Orcaflex. Python either control Orcaflex or be called by Orcaflex. Too much flexibilty for me at this time. Just trying to narrow down what may be a good starting point.
The starting point is to decide which piece of software is in the driving seat. Based on a very brief look (so I could be wrong!) at the Orcaflex API and scripting documentation, Orcaflex is not set up to call another piece of software. It is called from Python. So you could either call both Orcflex and Mathcad (using the Mathcad API) from Python, or you could write a VBscipt that calls a Python script that calls Orcaflex (kind of a kludge, but it would work), or you could write a User DLL for Mathcad in C++ that calls the Orcaflex API directly.
As an aside, if you are learning Python, download and read "A Byte of Python". It's free, and a good place to start.
Thanks for the recommendation for the Python book. I will have to try and call Orcaflex from MathCAD. I would like to stay away from multiple calls.
Thanks
Then your best option would be a User DLL. You could then implement all the Orcaflex functions available via the API as Mathcad functions. You would have to write that in C++ though, not Python.
I have requested that when they implement scripting in Prime they include Python as an option. I think my request has a 0.000000000000000000001% chance of success, but I asked anyway