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 for Programming
 Forum for Automation Server/COM and LabVIEW
 C# saving to new OPJU Format
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

dynamo18

2 Posts

Posted - 10/05/2018 :  10:27:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

YimingChen

1606 Posts

Posted - 10/12/2018 :  3:01:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

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

James
Go to Top of Page

dynamo18

2 Posts

Posted - 10/13/2018 :  04:49:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 10/13/2018 :  08:05:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
hi dynamo18

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


CP
Go to Top of Page

xiemotian

China
6 Posts

Posted - 11/13/2019 :  04:52:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by dynamo18

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


Can you submit origin.dll to me? I can't find it here
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