Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

LabTalk commands to enable various protections on worksheets and workbooks have been introduced in Origin 9.1. Further modemore, Admin mode has been introduced to allow better protection controls on Origin projects. You may control protection attributes of Origin object (like a book) without involving Admin mode, but such protection is not secured, anyone can run LabTalk command to remove these protections. To ensure secured protection, you must setup Admin password for the Origin project and then Origin Object protections cannot be altered until the correct password is entered. Very often, security is not an issue and you may just want to prevent inadvertent or accidental modification or delete of certain book or sheet, and in such situation, you may add protection without Admin password, which certainly make things easier, not having to remember a password on given OPJ.

...

Code Block
// Import a sample file
newbook;
string fname$=system.path.program$+"Samples\Curve Fitting\Gaussian.dat";
impasc;
// Set password and login - change mypwd to your desired password string
doc -pwa mypwd;
doc -pw mypwd;
// Protect data sheet structure, prevent editing, deleting
lay -lw hex(482);
// Protect page from deletion
page -lw hex(400);
// logout
doc -pwx;
// Now you can save the OPJ and others can view data, graph, and also analyze
// Analysis results can go into new sheets, not new cols in same sheet