Hello everyone, I m a noob in C++, but I ve programing experience in rhinoScript and MayaMel. I m trying to write a C++ program that can:
1.start Maya + open a specific file
2.start Mel + execute some code
for the moment I was able to write a Win32 program, and using the shellExecute command I was able to start Maya + open specific file but still no clue about starting and excuting Mel code
apperantly the best way is to write an application that opens a maya environment and use maya API without passing through the GUI of maya.
Could anyone help please, any instructions or directions what this application could be or where to look would help me a lot.
For the fist one, you could try ShellExecute(... ,"file that is by default opened with maya", ...);
or CreateProcess("maya.exe", "somefile", ...);
or system("maya.exe somefile");
The second one is most likely impossible (unless you consider simulating few mouse clicks at certain coordinates an option).
Thank you so much for your help...I did manage to do the first task namely:
Open Maya and Open a specific file :)
Now the impossible task!!! Could you tell me how does this simulation of mouse clicks work ? or where I can find some information about it?
I also thought may be to get your opinion on my whole approach to what I want to do, because may be is not the best way!!!
well I m trying to build a software the manages flowing informations between other softwares. These softwares are mainly 3D softwares (Maya and Rhino) and a structural analysis software.
In other words my goal is to create a loop (genetic algorithm) that basically takes the geometry built in the 3D software and test it in the structure analysis software and gives the feedback information back to the 3D software so the new generation of geometries produced are fitter.
for now I have the mel code to generate the geometry in maya and the rhinoscript to test this geometry in rhino, but the two programs are totally disconnected. so I m trying to build a bridging C++ program to automize the flow of information between the two or later more softwares.
I m sorry to bother you with all that, I just thought I should get the opinion of someone more familiar with developping softwares...
So in your opinion what do you think of first the feasibility of the idea and second my approach to the problem?
I did some research following the link you sent me.
apperantly the best way is write an application that opens a maya environment and use maya API without passing through the GUI of maya.
I ll post a thread asking if anyone know how to do that, but I thought may be you have a tip about that?