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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 OTP files

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
mkoetse Posted - 01/12/2004 : 03:07:51 AM
Hello,

I was wondering whether or calling a OTP file via a shortcut would be possible. I'd like to keep all files concerning one project together and put a shortcut to a OTP-file in the origin folder. (this way I have to change the otp file only once an can use it over a network, e.g.)

regards,

Marc

3   L A T E S T    R E P L I E S    (Newest First)
mkoetse Posted - 01/14/2004 : 1:22:16 PM
Thanx,

I'll certainly try this.....

Marc

Mike Buess Posted - 01/13/2004 : 5:22:11 PM
Hi Marc,

Here's another method that might be closer to a true shortcut.

1. Open any graph template.
2. Right-click on the graph window, select Add Text and type in anything.
3. Select the new text label and then Format->Label Control from the menus.
4. Type the following script at the bottom...

%W=%H; // remember current window name
%Z=full path\name of target template file;
doc -t %Z; // open that template
;win -c %W; // close original graph window

(Note the semicolon in front of the win -c command. Origin will probably crash if you leave it out.)

5. In the 'Run After' drop-down list above your script select 'Window Create'. OK the Label Control dialog.
6. Select File->Save Template As... and give it a name.

Now opening your new 'shortcut' template will actually open the target template regardless of where the shortcut template is stored. I've tried it over the network in WinXP Pro and it seems to work fine if I use proper UNC paths...

%Z=\\computerName\shareName\...\templateName.otp;

...You might want to comment out the final win -c command in the label script until you're sure that everything else is correct. Otherwise you won't be able to edit the script because the window will destroy itself whenever you open it.

...I forgot that text label scripts are disabled in Button Edit mode. You can open the shortcut template for editing like this.

1. Check (select) Button Edit Mode on the Edit menu.
2. Open the shortcut template. (It's script will not run.)
3. Uncheck Button Edit Mode for normal operation or testing.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/13/2004 5:28:38 PM

Edited by - Mike Buess on 01/14/2004 11:15:10 AM
Iris_Bai Posted - 01/12/2004 : 04:07:08 AM
Hi Marc,

If you want to open an OTP file by shortcut? The following are the steps that open it by executing a commad in script window. It is a simple usage like as shortcut.
Would you like to try the follwing?

1. In Code builder window, new a c file named Open and save to Origin installation path.
2. Copy and paste the following codes into Open.c file. Save the modification. And then remove Open.c file in left list window in Code Builder by Right-clicking the file and selection Remove...
 
void OpenOTP()
{
GraphPage gPage;
gPage.Create("3D.otp"); //assume 3D.otp is your OTP-file in the origin folder
}

4. Open your project in Origin window. In Code Builder window, right-click Project folder in the left list window
and choose Add Files to add Open.c from Origin installation path.
5. Save your project. Close and reopen the project.
6. In your project, each time you can open your OTP file just by executing "OpenOTP" in Script window.

Edited by - Iris_Bai on 01/12/2004 04:25:30 AM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000