Selective startup (Windows only)

Problem:

ME10 is no longer merely an advanced drawing program, it has become a platform on which it is possible to build and run a multitude of specialized applications. Many companies have thousands of macros - but only use a few percent at any one time. So, instead of loading all of them at once why not start ME10 with just those few macros the user needs?

Easier said than done!

The "normal" answer would be to install ME10 2 or 3 times in separate directories and adapt each and every startup file to load different macros depending on the needs of the user. For each startup routine there would have to be a shortcut for example on the Windows desktop each one pointing to the appropriate me10f.exe in its appropriate directory. Fine. But who wants to have 2-3-4-5....ME10's lying around?

No one. Right! So here's the answer:

Solution:

Phase 1

What we need to do is find a means of communicating to ME10 before it starts some kind of parameter which it can interpret and use to decide on a particular course of action.

So, we need to use a parameter that can be passed to ME10 directly from the Windows shortcut.

Hiding behind this shortcut is this set of instructions. It can be accessed by clicking once on the shortcut (icon) with the right-hand mouse button and then selecting Properties:

In the field where it says: "C:\ME10\ME10F.EXE" it is possible to add COMMAND LINE OPTIONS which tell ME10 what to do. For example if the PELOOK environment should be started.

Examples of some other options that are available are pelook, font, title, locatorport etc. 

Those users with a reasonably advanced knowledge of ME10 will be aware that changing these options will have a profound effect on the behavior and look of ME10 and should therefore not be changed.

But there is ONE option that can be changed without altering ANYTHING about ME10 itself!

tmpdir  !!!

Tmpdir tells ME10 where it can place temporary files. No big deal really.

The point is we can vary the value of tmpdir in the ME10 shortcut and read its value while ME10 starts.

Note that in version of ME10 using the me10.ini file must have the METMPDIR parameter deleted completely. Otherwise the value included in it will be read by ME10 EVERY TIME it is started. The upper portion of the me10.ini file will then look like this:

[ME10 SETUP]
MEDIR=c:\me10
METMPDIR=
TEMP=
LANG=
MEBREAKCOUNTLIMIT=
MEBREAKWAITTIME=
MEDEMOMODE=0
ME_WORKING_DIR=
DXFDIR=d:\me10_10\dxf

Adding the tmpdir command line option:

This forces ME10 to use the directory "c:\temp\quality" for temporary files. ME10 would then load a limited number of macros that only the quality control department needs.

Another shortcut could be given "c:\temp\design". This would perhaps indicate to ME10 that the design department wanted their particular macros loading.

Remember to save the changes you make to the shortcut with "OK"!!

 

Copies of shortcuts can be made simply by right-mouse clicking on an existing shortcut, selecting Copy, Cancel and then Pasting into the Desktop.

It is a good idea to change the name of the ME10 shortcut allowing the user to distinguish between them. Do this by carefully clicking on the shortcut once and then twice - but not too quickly - S  L  O  W  L  Y... in the text. Make the changes to the name and press Return.

1

2

3

4

Done!

Before going on to Phase 2 remember to create the directories you wish to use for tmpdir! (ME10 will still run - but it's best to do it right.)

Top


Phase 2

When the shortcuts are ready, some changes have to be made to the "startup" file in the ME10 installation directory. Note that from 10.50 the startup file has changed to "startup.m".

Firstly, ME10 has to find out the value of tmpdir.

This is done by running a GETENV command:

LET TMP_DIR_NAME (GETENV "METMPDIR")

Notice how "ME" is added to the option "tmpdir" here.

Then a macro is defined which tests which tmpdir value is being used and starts loading a particular customization file. The last part of the startup file will then look like this:

AUTO_NEW_SCREEN ON

LET TMP_DIR_NAME (GETENV "METMPDIR")

DEFINE SELECT_STARTUP
IF (POS TMP_DIR_NAME "quality")
    LET STARTUP "startup_quality"
ELSE_IF (POS TMP_DIR_NAME "design")
    LET STARTUP "startup_design"
ELSE
    LET STARTUP END
END_IF
INPUT STARTUP
END_DEFINE

SELECT_STARTUP

Finally, the customization files, in this case "startup_quality" and "startup_design" will have to be created. These will normally consist of a list of lines like this:

INPUT "filename1"

INPUT "filename2"


Finally, if all fails - mail me and I'll help you get your Selective Startup running.

Top