Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to programmatically change a scale and save it?

Is there a way to programmatically change a scale created in MAX and save it back to MAX? 
 
Thanks
 
Joe White
0 Kudos
Message 1 of 2
(3,030 Views)
Hello Joe White,

There is a way to programmatically change a scale created in MAX and then save it back.  To create a task from VS and save it, please see the following example program.  If you do want to change an existing scale, you could use something similar to the following code:

LinearScale myScale = (LinearScale)DaqSystem.Local.LoadScale("TestScale");
myScale.Slope = 5;
myScale.YIntercept = 6;
DaqSystem.Local.SaveScale(myScale, "", SaveOptions.OverwriteExisting|SaveOptions.AllowInteractiveEditing|SaveOptions.AllowInteractiveDeletion);

Regards,

Jesse O.
Applications Engineering
National Instruments
           
Jesse O. | National Instruments R&D
0 Kudos
Message 2 of 2
(3,018 Views)