04-05-2012 03:34 AM - edited 04-05-2012 03:37 AM
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
04-05-2012 03:45 AM
Here is an illustration of what data I want to trace (only selected values) :
04-05-2012 05:03 AM
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
04-05-2012 08:15 AM - edited 04-05-2012 08:25 AM
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.
04-05-2012 09:17 AM
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
04-05-2012 12:02 PM
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):
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
04-11-2012 08:57 AM - edited 04-11-2012 09:00 AM
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)