Author |
Topic  |
|
asenv
35 Posts |
Posted - 12/05/2009 : 1:49:50 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.063.988 SR6 Operating System:Windows 2000 SP4 I have created user-defined colour map (scale) for a contour-colour fill plot. I would like to create a .pal file from this colour scale so that I can use it as template. How can I do that? I know that I can save the graph winodws as tempalte (.otp file), but this does not quite do what I want. |
|
sandysong
2 Posts |
Posted - 12/07/2009 : 02:49:27 AM
|
Hi,
Thank you for contacting OriginLab.
I am sorry that Origin 8 cannot support the creation of a .pal file from the color scale.
However, our current version Origin 8.1 offers straightly saving and loading colormap to palette file by Labtalk script:
layer.cmap.save(full path of file);
layer.cmap.load(full path of file);doc -uw;
I hope that you can consider upgrading to Origin 8.1. You can download the Origin 8.1 demo from the following webpage and have a try first. http://www.originlab.com/index.aspx?s=12&lm=62
Sandy Technical Service OriginLab |
Edited by - sandysong on 12/07/2009 03:52:44 AM |
 |
|
asenv
35 Posts |
Posted - 12/09/2009 : 08:11:44 AM
|
Thanks for your reply Sandy. Actually we just upgraded our 7.5 license to this new one 8. It is server license. Is there a workaround, a way that I can access this colour map object through labtalk and write my own script that defines every time the same colors at the indizes. I am still reading the labtalk documentations and experimenting with it. I would like just some hints if it is possible, the rest I will try do by myself. In the moment I am trying to do a automated creating of a report with labview. So far I have experimented with the ActiveX classes and the communication, between the two applications is ok. I can create, load, save ... projects, workbooks, worksheets (graph, matrix ...). What I have realized (correct me if I am wrong) is that to access and alter the properties of this objects I have to use labtalk.
Best Regards Asen |
 |
|
easwar
USA
1965 Posts |
Posted - 12/09/2009 : 11:17:17 AM
|
Hi Asen,
Can you provide some more specifics on what you are looking for?
For example, is this what you want: 1> you want to create a particular zvalue-color relationship 2> you then want to use that map of value-to-color on new data so that the same z value is shown with same color in the new plot
Thanks,
Easwar |
 |
|
asenv
35 Posts |
Posted - 12/09/2009 : 12:33:43 PM
|
Hi Easwar, that is exactly what I want. The Layer with the z-value looks like this [Mx1Messdaten]MSheet1!1(Z)[1*.440*]. There I have defined manually the Level (index) and the Fill (custom colours). Iwould like this colour palette to be the same when I create new projects. Basically I have to create automation software for creating reports. There are two ways (I think) to acomplish this. Either create the porject and all workbooks, graphs, matrices manually with the Origin 8 programm, save it as template then just change the data and some of the scales (maybe smth else too) with the automation software (labview). This seems easier, but not so flexible. The second way is to write a program that creates every time a project from scratch all the objects and fills in the data.
P.S I have found this script and been able to read all the properties of my colour palette (contour):
Layer1.cmap.COLORABOVE=; Layer1.cmap.COLORBELOW=; Layer1.cmap.COLORHIGH=; Layer1.cmap.COLORLOW=; Layer1.cmap.COLORMISS=; Layer1.cmap.COLORMIXMODE=; loop(ii,1,Layer1.cmap.numcolors) { Layer1.cmap.Z$(ii)=; Layer1.cmap.COLOR$(ii)=; } Layer1.cmap.ZMAX=; Layer1.cmap.ZMIN=; Layer1.cmap.ZMISSING=;
I think I will be able with commands like this:
LAYER1.CMAP.Z1=70 LAYER1.CMAP.COLOR1=26960025 ... ...
to set the colours to a new contour. Haven't tried it yet though.
|
 |
|
asenv
35 Posts |
Posted - 12/12/2009 : 09:02:59 AM
|
OK I tried it it works that way and when you make changes to the colour palette use layer.cmap.updateScale(); this function at the end to update the view. |
 |
|
|
Topic  |
|
|
|