Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Starting MAYA from c# (https://simplymaya.com/forum/showthread.php?t=6806)

dougt 10-07-2003 01:56 PM

Starting MAYA from c#
 
Hi,

I'm trying to start MAYA 5.0 from a windows C# application. I can make it start ok (I used the System.Diagnostics.Process class) but what I really want to do is to make it run a MEL script on startup so I can pass in a scene to load and various other stuff.

I tried the 'Arguments' property to pass in the script name and / or scene filename but it doesn't seem to do anything, so I guess maybe MAYA doesn't fully support being called like this ?

Any ideas / alternative suggestions anyone ? Sorry if this is the stupidest question ever, I'm more of a programmer than an Animator.

Thanks in advance.

kbrown 10-07-2003 04:37 PM

To be honest, I know nothing about c# but how about waiting until Maya has started up and then sending it key strokes?

` -key will activate the command line and after that you can send the mel commands you need. Lastly send [enter] key to exectute the commands...

... just an idea...

dougt 11-07-2003 03:36 PM

Thanks, I'll have a crack at that. I'm also going to try messing about with the userSetup.mel script to pass things into it.

Cheers.


All times are GMT. The time now is 12:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018