Re: Please Help a student...
- To: mathgroup at smc.vnet.net
- Subject: [mg67422] Re: [mg67414] Please Help a student...
- From: Sseziwa Mukasa <mukasa at jeol.com>
- Date: Fri, 23 Jun 2006 04:31:35 -0400 (EDT)
- References: <200606221021.GAA09418@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On Jun 22, 2006, at 6:21 AM, Kerekes Csaba - Antal wrote: > > I'm a student in Romania, I study informatics. I use Mathematica > and I'm very satisfied with the product. I use it because I work in > the number field theory and experimental mathematics, where I need > big number precision. I am now in my last year and I need to show > my final project. > I have been written an algorithm in Mathematica, and I need to > make a graphical user interface in MS Visual C++ 6.0. I have make > the first step successfully I connected MS VC++6.0 with Mathematica > via MathLink and I can call every function from Mathematica > directly from my VC++ program. > Here comes my question: > I sad I can call every Mathematica function from VC++ via > MathLink but what can I do to call my own written Mathematica > function from VC++6.0? > Please Help I got my finals in one week, and by the university > nobody can help me. I need to do my GUI in VC++ and I have not yet > connected my own function written in Mathematica. > Please send be a good description in a short time: how to call > in MS VC++6.0 via MathLink your own function written in > Mathematica, or youre notebook file. I don't have any code that does this, but this is how I understand one would go about this. First of all to simplify the task, tag all the cells of your notebook that contain expressions you wish to evaluate with something unique then: - From your Mathlink program issue a NotebookOpen ["YourNotebookFileName",Visible->False] this will return a NotebookObject. - Issue a SetSelectedNotebook[NotebookObject] where NotebookObject is the result of the previous expression. - Issue a NotebookLocate[YourTag] this sets the selection to be all the cells of interest. If you did not tag the cells you will have to select each cell of the notebook in turn, examine its contents and evaluate it if necessary, the commands to do this are described in the Built-in Functions->Notebooks->Notebook Operators and Built-in Functions->Notebooks->Notebook Manipulations sections of the Help Browser. - Issue a SelectionEvaluateCreateCell[NotebookObject] where the NotebookObject is the result of the first command. You should now be able to issue commands for the expressions defined in your notebook as with any other Mathematica expression. You can issue a NotebookClose when you're done. Hope this helps, Ssezi
- References:
- Please Help a student...
- From: Kerekes Csaba - Antal <kcsabi2003@yahoo.com>
- Please Help a student...