The Origin Forum
File Exchange
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 C# saving to new OPJU Format

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 HyperlinkInsert EmailInsert 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 [?]

 
   

T O P I C    R E V I E W
dynamo18 Posted - 10/05/2018 : 10:27:30 AM
Origin Ver.: OriginPro 2018G 64bit SR1 (b9.5.1.195)
Operating System: Win 10 (64 bit)

Hello together,

I programmed an automated conversion and import of some of my measurement files into origin for the purpose of automatic plotting.

As I recently found out that the new opju file format is much smaller and my automatically created opj files are quite large (sometimes several 100 Mbs), I was wondering if there is a possibility to tell Origin to directly save to opju file format using the Interop.Origin.dll.

Best,

Dynamo18
3   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 10/13/2018 : 08:05:23 AM
hi dynamo18

Yes, the saving format is controlled by the file extension, OPJ, or OPJU, from the COM interface.


CP
dynamo18 Posted - 10/13/2018 : 04:49:34 AM
Hey James,

thanks for the reply.

The code I am using to save is the following:

                    String PathName = PathTemp + name + "_dQdV.opj";

                    // Save:
                    if (org.Save(PathName) == false)
                    {
                        Console.WriteLine("Failed to save the project into " + PathName);
                    }
                    else
                    {
                        PrintOutput("Successfully created Origin Project: ", name + "_dQdV.opj" + "\n");
                    }
                    org.EndSession();
                    org.Exit();
                    System.Runtime.InteropServices.Marshal.FinalReleaseComObject(org);
                    org = null;


I just tried what you recommended and indeed Origin is saving it properly as opju by just changing the suffix in the filename

That was a lot easier than I expected.

Thank you very much.

Best,
Dynamo
YimingChen Posted - 10/12/2018 : 3:01:15 PM
Hi,

Would you mind telling us which C# lines you used to save project? Did you specify file extension when saving? Thank you.

James

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