Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 10-07-2003 , 01:56 PM
Registered User
Join Date: May 2003
Location: Manchester, UK
Posts: 2

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.


Last edited by dougt; 10-07-2003 at 03:03 PM.
# 2 10-07-2003 , 04:37 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
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...


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
# 3 11-07-2003 , 03:36 PM
Registered User
Join Date: May 2003
Location: Manchester, UK
Posts: 2
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.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads