Author |
Topic  |
|
Mike Buess
USA
3037 Posts |
Posted - 12/06/2003 : 08:46:04 AM
|
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
|
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 |
 |
|
peter.cook
UK
356 Posts |
Posted - 12/09/2003 : 04:02:06 AM
|
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
|
 |
|
rdremov
USA
28 Posts |
Posted - 12/09/2003 : 10:38:05 AM
|
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. |
 |
|
Mike Buess
USA
3037 Posts |
Posted - 12/09/2003 : 12:13:39 PM
|
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 |
 |
|
rdremov
USA
28 Posts |
Posted - 12/09/2003 : 1:46:56 PM
|
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. |
 |
|
|
Topic  |
|