For times when there is more than one occurrence of maya running on a machine, is there a method of determining an enumeration for each? For example, if two maya's are running on a single machine, the MEL script would be able to return Maya.1 when run on the first instance, and Maya.2 when run from the second instance?
The reason for this is that I have startup scripts on machines that establish commandport numbers. When the second maya runs, it fails to execute anything in it's start script after the commandport() because that port number is already taken (by the first maya instance). I'd like the command port to increment by one for each instance of maya that is running.
Any help, greatly appreciated!