I need a Solution, how to read an Array from another Project in Visual Studio 2010.
I have one program to do the GUI and one program doing the maths. In this maths program, i generate a 2d-array to save the data of some spheres. Due to some errors i can’t build one program to access and load both API’s. Now i’ve written two seperate programs(projects) in one projectfolder and need to access the Array.
My first solution has been to generate a file with the values of the array, and read it out by the other program. But as my program needs to be fast, max. 20ms per iteration, i don’t think this will help me much.
Is there a way to solve the problem?
Thank you in advance
EDIT:
I solved my problem… I happen to get my program run in just one application. My mistake has been to call the MatLab-Engine within the main function of NXOpen instead of an own function. Thank you anyway for motivate me to find an “one-program-solution” 🙂
To share data between multiple processes, you can use file mapping. Check Sharing Files and Memory and here’s good example: Creating Named Shared Memory.
Although dividing your solution into two applications doesn’t seem to be right. Before you make your solution even more complicated, try to check first whether there is a way how to make it simple again.