The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Run script after opening project
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 08/26/2003 :  05:05:17 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I don't know whether to be delighted or annoyed...

I have had personal discussions awhile back with OriginLab about running script after opening an .opj file. This could be done (version 6.1) by redefining the endopen macro BUT this only worked when the .opj file was part of a command line eg \\..\Origin61\Origin61.exe temp.opj. The ideal was to open Origin by double-clicking on an .opj file (as the user would prefer to do) but no code could be set to run after the project had actually opened. However, in testing a beta version. I noticed a commented out DocAfter macro in the macros.cnf file. Lo and behold, I can now define this to do
exactly what I want. It is and would have been extremely useful as we have numerous (1000s) of saved project files that have an associated string variable eg ProjectID that I can now pick up by script and load the associated macros and menus eg
def DocAfter {
%T=ProjectID[1]$;
run %Tmacros.cnf;
};

Especially useful with a server-client set-up and where we have multiple versions of the same application eg Linear_v1, Linear_v2.

All this with the user just double-clicking on an .opj file!

This code works for Origin 7 but I'm not sure for which (SR) versions.

I can find no documentation or mention in the help files either.

I think the DocAfter macro will run after an Origin project file is opened however and the endopen macro still only works if the opj file is passed via a command line.

DocAfter macro runs before EndOpen macro.

Regards,

Pete

Mike Buess

USA
3037 Posts

Posted - 08/26/2003 :  07:38:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,

I still have a copy of 6.1 on my old laptop and just tried DocAfter there... doesn't work. Perhaps DocAfter was implemented in 7.0 as a result of your discussions w/OriginLab and they just forgot to document that fact.

Mike Buess
Origin WebRing Member
Go to Top of Page

peter.cook

UK
356 Posts

Posted - 08/27/2003 :  03:27:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

Thanks for note.

Maybe..

I sent the note to advertise what I regard as a very useful function particularly in the context of managing multiple versions of multiple applications for multiple users (could be clearer!) and to drop a hint..

Cheers,

Pete

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000