SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / Starting MAYA from c#
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 10-07-2003, 01:56 PM   #1
dougt
Registered User
 
Join Date: May 2003
Location: Manchester, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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.
dougt is offline   Reply With Quote
Old 10-07-2003, 04:37 PM   #2
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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!
kbrown is offline   Reply With Quote
Old 11-07-2003, 03:36 PM   #3
dougt
Registered User
 
Join Date: May 2003
Location: Manchester, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
dougt is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Maya Hair/Polygon Error ingram_no.7 Members Lounge 13 10-12-2010 10:27 AM
Simply Maya Resources Online Miss_Nova Site News & Announcements 1 08-12-2010 08:36 PM
LayoutTools for Maya 2011 is here... ctbram Members Lounge 1 06-12-2010 10:32 PM
Open a Lightwave file in Maya 2011 radiant777 Maya Basics & Newbie Lounge 2 04-12-2010 02:45 AM

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.