Author |
Topic  |
|
juergenkemeter
Germany
Posts |
Posted - 11/10/2006 : 04:32:18 AM
|
Origin Version (Select Help-->About Origin): 7.0300 Operating System: Windows XP
Hi,
My aim is to create a "Standard" plot - template which are based on table data. These plots should be unchangeable, in regards to validation issues - Every plot created out of this "Standard" template should have the same axes, scales, names, ranges etc. on it. Only the data table should be changeable from the user.
Perhaps with an automatically created pdf - file which contains the plot? For example: The user uses the new "Standard" template, chooses the data set and then creates the plot with the help of the "Standard" Template. Then a pdf - file is automatically created, so the user may not change the plot.
Or is it possible to restrict user access to a plot, created with the help of a template?
Cheers Jürgen
|
|
easwar
USA
1965 Posts |
Posted - 11/11/2006 : 3:49:48 PM
|
Hi Jürgen,
You could create a tool/script-behind-a-custom-button that will allow user to select data and then your script plots the data using a custom template that is your standard. Then aftet the plot is made, your script could set the page.noclick property to disable clicking on various objects on the page. As long as your end user does not know to change this property they cannot/will not (accidentally) change objects in the graph. There is currently no password protected locking of the graph etc.
The LabTalk language reference chapter in the programming help file has the following info on page.noclick: (thus for example setting page.noclick=63 will disable clicking on all things in the graph)
Disable mouse clicking on various objects: 1 = on axes and column headings, 2 = on data plots and cells, 4 = on labels, 8 = on objects, 16 = on layer frames, and 32 = on tick labels. Values are cumulative, so page.noclick = 5 disables clicking on axes and labels.
Easwar OriginLab
|
 |
|
additive
Germany
109 Posts |
Posted - 11/15/2006 : 04:29:03 AM
|
Hi Jürgen; there are a few possibilities to do this: - As Easwar did propose, lock elemets in Origin -- disadvantage is that any advanced Origin user can reset these - Use an Origin script to create a PDF from the standard template - Use Origin Automation server to create the standard plot as Origin project and then run Origin viewer to display it
Additive is OriginLab distributor in Germany providing tech support and professional services in German speaking part of Europe. Please contact us to discuss this further: ralf.rosenberger@additive-net.de, +49-6172-5905-27
Viele Grüße -- Ralf Rosenberger
|
 |
|
Mike Buess
USA
3037 Posts |
Posted - 11/15/2006 : 1:29:29 PM
|
Hi J�rgen,
Another possibility combines Easwar's suggestion with a graph theme...
1. When your graph template is formatted as you want it, right-click on graph area and select Save Format as Theme.
2. In the Formats to Save box select All and give it a name. I'll call it MyTheme.
3. Add the following OC function to CodeBuilder. (See this link for instructions.)
void ResetFormat() { Page pg = Project.Pages(); pg.ApplyFormat(GetAppPath() + "themes\\MyTheme.OTH"); }
4. Add a text label to the graph layer. Contents are irrelevant because it will soon be invisible.
5. Select the label and then Format > Label Control. Configure the dialog as follows and then click OK. Script, Run After: All Events Script: ResetFormat; Visible: Unchecked
6. Select File > Save Template to update your template file.
Now the format of a graph created from your template cannot be changed by mouse-click or menu command because your theme is reapplied by the text label whenever the graph is changed. You can use the template as suggested by Easwar... page.noclick may not be necessary but is useful for limiting the number of times the text label script must run.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 11/15/2006 3:23:09 PM |
 |
|
juergenkemeter
Germany
Posts |
Posted - 11/16/2006 : 02:33:19 AM
|
Thank you for all the fast and good help provided. I will try several solutions proposed by your answers.
Jürgen |
 |
|
|
Topic  |
|