DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

delete data using band cursor

Solved!
Go to solution

Hi,

I have some log files which I need to process. For some of these files I will need to delete the beginning and the end of them. To do this I am planning to plot the the log and set 2 cursors, then the user will move the cursors in a way that he would leave the unwanted data out of the band and then he would click a button to proceed to delete the unwanted data from all the channels within the group.

 

So far I have plotted the data and set the band using the following script:

view.ActiveSheet.Cursor.Type = "band"

view.ActiveSheet.Cursor.Mode = "graphPoints"

view.ActiveSheet.Cursor.X1 = CMin("Y_Accel")+0.25*(CMax("Y_Accel")-CMin("Y_Accel"))

view.ActiveSheet.Cursor.X2 = CMin("Y_Accel")+0.75*(CMax("Y_Accel")-CMin("Y_Accel")) 

 

Now I would like to use the positions where the cursors have been moved by the user to delete the data but I don't know how to read the cursor position. With it, I would use a function as DataBlDel or similar.

Does anyone have an idea of how to do this?

I am just starting with DIAdem so if someone spots that there is an easier way to do this please let me know.

 

Thanks,

Leo

0 Kudos
Message 1 of 5
(6,381 Views)
Solution
Accepted by topic author Leillo

Hi Leo,

 

If you're just starting out with DIAdem and scripting then the following article is a great resource. It discusses both user interactions and cursor data.

 

DIAdem - Using scripting to perform File Dialog, User Interaction, using Frame Cursor data, and much more!

https://decibel.ni.com/content/docs/DOC-5771

 

Have a read and let me know if you have questions.

 

Best Regards,

 

Chris

National Instruments - Tech Support
0 Kudos
Message 2 of 5
(6,362 Views)

Thank you Chris

0 Kudos
Message 3 of 5
(6,349 Views)

Hi Chris,

I have made a script base on what you told me, it works. My issue now is that I want to update or refresh the View display in DIAdem View and I don't know how to do it. When I use "Debug VBS Script" the View display is refreshed after I finish the interaction and I can see what has been done but if I use "Run VBS Script" it won't refreshed the View display so I can not double check what has just been done.

Is there a command to do this?

 

Thanks.

Leo

0 Kudos
Message 4 of 5
(6,326 Views)

Hi Leo,

 

I have to confess to not being an expert in DIAdem. Fortunately, this does seem to be a documented issue. The following knowledge base article describes why the values don't refresh automatically and what command you can use to fix it.

 

http://digital.ni.com/public.nsf/allkb/86256F0E001DA9FEC12571A7002D9DA5?OpenDocument

 

Regards,

 

Chris

National Instruments - Tech Support
0 Kudos
Message 5 of 5
(6,322 Views)