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 Origin C
 Attaching files to 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

Mike Buess

USA
3037 Posts

Posted - 12/06/2003 :  08:46:04 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Can a file be programmatically attached to an Origin 7.5 project using Origin C or LabTalk?

Mike Buess
Origin WebRing Member

rdremov

USA
28 Posts

Posted - 12/08/2003 :  4:26:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can use info storage for this. Pages, layers and columns all have the info storage. E.g. if you want to put file "myfile.exe" inside currently active layer, you can do this (LabTalk):
1. Put file into compressed storage:
Layer.Info.LoadFromFile(MyFileStorage1, "c:\myfile.exe", 1)=;
Layer.Info.=;
2. Save OPJ, close Origin.
3. Run Origin, open saved OPJ
4. Get file from storage:
Layer.Info.SaveToFile(MyFileStorage1, "c:\myfileCOPY.exe")=;

This way you can put multiple files into Page, layer or worksheet columns. If you want to go with uncompressed storage, please ommit 3rd argument in step 1.

Thanks,
Roman.


Edited by - rdremov on 12/08/2003 4:27:04 PM
Go to Top of Page

peter.cook

UK
356 Posts

Posted - 12/09/2003 :  04:02:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

This wouldn't then be the same as attaching files via the code builder such that they are automatically accessible on opening an OPJ?
Would that be preferable (at least for origin files)?

Cheers,

Pete

Go to Top of Page

rdremov

USA
28 Posts

Posted - 12/09/2003 :  10:38:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

This wouldn't then be the same as attaching files via the code builder such that they are automatically accessible on opening an OPJ?
Would that be preferable (at least for origin files)?



Correct. Info storage does not care of the file you put in. Can be of any type. Code builder folders is for OGS/OC files primarily, so that you can execute some code after OPJ is loaded. We are planning to support programmatic access to the folders as well in the next version.

Another difference is that info storage is forward compatible with Origin 6.1 and earlier, while project folders are supported only starting with 7.5 (Forward compatibility means your files will not be lost if you open newer OPJ in the older Origin and save it there open back again in the newer version.)

Roman.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 12/09/2003 :  12:13:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Roman,

Aren't there issues concerning page structure (3KB limit) that could crash previous versions of Origin if a large file were stored on a page or layer? I recall having such problems with large page.info storage in Origin 7.0.

Mike Buess
Origin WebRing Member
Go to Top of Page

rdremov

USA
28 Posts

Posted - 12/09/2003 :  1:46:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

Aren't there issues concerning page structure (3KB limit) that could crash previous versions of Origin if a large file were stored on a page or layer? I recall having such problems with large page.info storage in Origin 7.0.



Only page info storage had this problem in the past. Layer and column info storages are ok. Page crash has also been fixed, but its forward compatibility is now the same as user project folders if it exceeds 3kB.

Thanks,
Roman.
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