DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

[DIAdem] How can I trace a data range from a data channel?

Hello,

 

I am looking for a way to trace a range of data from a data channel using DIAdem script.

Right now, I can only trace an entire data channel.

Is it possible? I do not want to split a data channel in order to trace a part of it...

 

Thank you.

Regards

0 Kudos
Message 1 of 7
(5,311 Views)

Here is an illustration of what data I want to trace (only selected values) :

 

0 Kudos
Message 2 of 7
(5,307 Views)

Hi,

 

Looking at your post I think that the ChnFind function will meet your requirements. You could use ChnFind to give you your indicies of 308 and 320 respectively thus performing your "trace".

 

Regards

 

Matthew

0 Kudos
Message 3 of 7
(5,301 Views)

Thank you Matthew but this function returns line number. I already have the first and the last line numbers.

The term "trace" is not appropriate, sorry I am French.

I need the function or the code which allows plotting (not copying data or calculating on a new channel) only this range of data (time channel + data channel) in the data VIEW.

 

Regards.

0 Kudos
Message 4 of 7
(5,296 Views)

Hi,

 

I'm not sure you can do what you are asking without creating two new channels which contain your data subsets. In a script I would find the start and end rows of the data I was interested in and use the following commands to create two new channels:

 

ChanCopyExt - to create copies of your channels.

DataBlDel - to delete the contents of the two new channels you have copied.

DataBlCopy - to copy only the rows you are interested in from your original channels to your copied channels

 

et voila. There may be variations on this but this is how I currently do it in a script myself. I'm looking forward to reading other forum members responses myself now.

 

Bon Chance.

 

Matthew 

0 Kudos
Message 5 of 7
(5,288 Views)

Hello Tenanio,

 

I believe this will answer your question:

 

I am assuming in my code that you have a VIEW layout with a sheet called "Sheet 0" which has a 2D-graph in the top area (as can be seen from the screenshot below):

 

VIEW.png

 

Copy this Code into SCRIPT and run it, it should display the data the way you had described:

 

View.Sheets(1).Cursor.Type = "Band"
View.CoordinateWnd.Visible = TRUE
View.ActiveSheet.Cursor.X1 = ChD(305,"Date_Mesure")
View.ActiveSheet.Cursor.X2 = ChD(320,"Date_Mesure")
View.Sheets("Sheet 0").Areas("Area : 1").DisplayObj.XScalingMode = "RangeScroll"
call wndshow("View")

 Please let me know if this works for you and if you have any additional question.

 

       Otmar

Otmar D. Foehner
Message 6 of 7
(5,283 Views)

Hello Otmar.

Thank you for the answer.

 

It is working but user can change zoom properties and modify the curve aspect. Is there a way to write the data range directly in the 2D axis system properties ?

Excel can do that (by using cell address)

 

0 Kudos
Message 7 of 7
(5,264 Views)