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
 LabTalk Forum
 Save folder as project

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
LarsVSA6 Posted - 06/03/2008 : 09:02:06 AM
Origin Version (Select Help-->About Origin): 7.5SR6
Operating System:Win2000

Hello,

how can i save a folder from Project Explorer by script automatically?

I start a project with importing a lot of measured data out of excel sheets, make some extractions and calculations and put these new data to new worksheets, then create some folders with pe_mkdir and move only the measured data with pe_move to these folders, while the extracted data remains in the root directory. Unfortunately, the file size of the whole project increases to very high values (about 60MB and more), i want to save the folders and afterwards delete them with pe_rmdir to decrease the size of the project but still keeping the measured data in a different project, so i can have a look at a later time at the measured data in an origin format, if i need. Needless to say doing this with mouse (right click on folder name and save project) it works. I identify the menu -ID for this operation (ID=41012), but using the command menu -e 41012 does not work. So how can i do this, eventually including a button to append again automatically the project with the measured data and after finishing closing/removing the folder again?

Lars
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 06/10/2008 : 4:51:00 PM
You cannot do this from LabTalk, but you can from OriginC so you could make an OC function that is callable from LabTalk with a simple wrapper like this one derived from the example in the Help file for the SaveAsProject method of the Folder class:

#include <Origin.h>

void Folder_SaveAsProject_Ex1(string strPathFileName)
{
Folder fldSave = Project.ActiveFolder();
string strPath = strPathFileName;
bool bOK = fldSave.SaveAsProject(strPath, SFC_INCLUDE_SUBFOLDERS);
out_int("bOK = ", bOK);
}

Create a c file in Code Builder with the above code and build. You can then use

Folder_SaveAsProject_Ex1(D:\My Files\)

The saved project will contain the current folder and subfolders and windows therein.


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