Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save graph properties (like cwx files in Measurement Studio for C++)

Hi,

I would like to know if it's possible to save the properties of one Graph in a file (collection of axis, customs divisions, etc...) like we can do in Measurement Studio for C++ when we put a NI OLE object, we can save in a CWX file.

Thanx
Xavier
0 Kudos
Message 1 of 5
(4,316 Views)
any idea ?

I have read a lot about how to print graph in this board but nothing about save properties of graph between 2 runs of an application. Somebody has methods ?
0 Kudos
Message 2 of 5
(4,297 Views)

Hello,

You can save the current state of a graph in a file by using CNiGraph::ExportStyle() function :

Declaration

void ExportStyle(
    LPCTSTR fileName);

Description

Exports the style of the control to a file.

A style is the complete current state of a control. For example, on a CNiSlide control the current values of pointers, all colors, all fonts, and all imported images are examples of a current state that is saved as a style.

Use ExportStyle to save the style of a control after you have configured it. For example, if you often create a new CNiGraph control and set properties such as tick colors, axes ranges, and background colors, you can save the style of a graph once you have configured it. Then, when you want to create a graph of the same style, create a new graph, access the property pages, and import the exported style.

You can import or export a style from the property page or you can import it or export it programmatically using ImportStyle or ExportStyle.

Parameters

fileName

The name of the style file to save.

Regards,



Message Edité par Maxime MULLER le 08-04-2008 02:41 AM
0 Kudos
Message 3 of 5
(4,263 Views)
I Work in .NET C#, i don't think we can do that no ?
0 Kudos
Message 4 of 5
(4,260 Views)
up
0 Kudos
Message 5 of 5
(4,208 Views)