Setting flags in scripts

Hello,
I am aiming to automate the process of selecting a data range in DIAdem VIEW (with band/frame cursor), then flagging the data, and copying the flagged section.
Whilst I can automatically set the position of the cursor, I don't believe I can use the ChnFlagSet command as this requires that the row number and number of values is known, effectively I want to just select/copy all the values that fall within the framed section, however the data points are not in chronological order.
Its something that I can easily be done manually in VIEW, however when I record this action in SCRIPT nothing is recorded.
Any help would be much appreciated
Thanks
Ben

Hi Ben,
Welcome to the NI Forums!
Just to check that I have a good understanding of your situation, can you please just clarify that I properly understand your requirements:
You're wishing to automate the process of making a selection across a range of data. The selected data then must be flagged and the data needs to be copied to the clipboard.
Do you programatically define which columns to be selected? If so, we could base not only the column of data to be selected but also the selection length on internal variables. We could use this information to infer which Row Number and Number of Values to use when using the ChnFlagSet command.
Would it be possible for me to take a look at what you have written so far?
Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Similar Messages

  • How to work with flags in scripts

    Hi all,
    I'm trying to automate the process of evaluating data in Diadem View using flags. So far I can set the flags through script commands (chnflagset) , but after that I need to change to interactive mode to replace the flagged data by NoValues (Flags: Remove data points). Is there a way to call this command from within my script so that I don't need the user interaction?
    Thanks,
    Marcel
    Solved!
    Go to Solution.

    Hi Marcel,
    I see, and now I fully understand what you're doing and why you need to automate flags and flag actions.  The functions to set and delete flags are documented, but we do not have any documented functions to fit, delete, or copy the flagged points.  These functions do exist, and are called when you interactively press the VIEW buttons.  There is a way to call them, but since it is not documented, that means that code you write today might not work in a later DIAdem version.  However, I do have code that works up to the latest version of DIAdem now available, 11.1 Beta1.  Feel free to email me at [email protected] to request these commands.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Programati​cally set flags in a DIAdem View

    Is there a command to set flags for a 2D axis system in a view? I would like to automate the process of setting flags for a curve, copying the points, and creating a report with a graph of the copied data and a table of that data. I can do the report I just need to be able to set the flags prgramatically once the users sets the band cursors where he/she wants.
    Thanks,
    AJL

    Hi AJL,
    Currently it is not possible to set VIEW flags via script. But, if your customer has selected the band width you know all necessary parameters.
    View.ActiveSheet.Cursor.X1
    View.ActiveSheet.Cursor.X2
    With pno you can determine the row in a data channel with contents closest to a given value. Example:
    iRowStart = pno(NameOfXChannel, View.ActiveSheet.Cursor.X1)
    iRowStop = pno(NameOfXChannel, View.ActiveSheet.Cursor.X2)
    Then you can use DataBlCopy to copy the selected area.
    Greetings
    Walter

  • Insert date sent in flag email script

    I need to insert the date sent into this flagged email script to make it more useful, just not sure how to do it:
    set newline to ASCII character 12
    set finalText to "EMAIL REMINDERS:" & newline
    tell application "Mail"
              set theMessages to every message in inbox whose flagged status is true
              repeat with i from 1 to number of items in theMessages
                        set thisMessage to item i of theMessages
                        set fromMsg to (sender of thisMessage as string)
                        set subjMsg to (subject of thisMessage as string)
                        set finalText to finalText & "FLAG: " & word 1 of fromMsg & " : " & subjMsg & " : " & newline
              end repeat
    end tell
    finalText

    Hi,
    The E-mail template is actually works as an HTML or CSS page. You need to use the HTML/CSS formats to send these values in the format as you want. Use <tags> to do the formating of Email template. 
    Use function to store multiple values and thn use them into Email 
    I hope this will help. 
    Thanks~ Giriraj Singh Bhamu

  • Need help setting up measurementLog scripting

    I'm gruadually getting better at creating script but for some reason I can't get my brain around this one.  I'm trying to set up a script to take measurements of a series of 64 marquees created from an equal number of paths then export that log after the 64th marquee dimension is recorded.  So I"m making a selection from path, recording it's width and height, performing some operations, saving a file, making a new selection from the next path, and repeat.  Ideally I'd like to also record the location of the upper lefthand corner of each marquee at the same time.  I figure one challenge at a time.
    Part of the confusion is the Object Model Viewer and support PDF's are saying one part of the process is accessed from the Application and another is accessed from the Document.  I'm not sure how that would look or what should come first.  Also I've not entirely got my brain around using file path locations in script and how to set those up so that they're universal between Mac and Windows.
    All this combined is causing too many possible reasons for the dreaded ESTK "Undefined is not an object" error so I can't narrow down the reason for my test script failing.  I'm certain if I see the correct way once it'll all make sense, the clouds will part, angels will sing and all will be right... until the next hurdle or the conditions change slightly.
    Please help!  Thanks!
    P.S. I can post my script this is going into if it'll help.  It's a mixture of my stuff, with a Frankensteined mish-mash of contributions I've gotten from others along the way.

    Getting an answer at PS-scripts.  Feel free to post anyway if  you desire.  thanks!  Extra info is always good.

  • What is the Max. Limit of ICM Script Nodes that can be set in ICM Script 8.0

    I am trying to  out the maximum number of Script Nodes that can be set in ICM Script editor , is there any limit on that ?
    I am using ICM 8.5 Version
    I have read that the  value for maximum number nodes that can be executed is configurable as seen in hkey_local_machine\software\geotel\icr\\routerX\router\currentversion\configuration\script\MaxNodesExecuted
    By editing the value help me to increase the No. of Script nodes  in ICM Scripts ?? Appreciate your reply asap.

    Hi,
    Looks like the max. length described in the forms help only applied to actual database column. But if I am defining a non database column, what is the max. limit?
    I tested it by setting to 32K (i.e.32767) and the form accepts and run ok. However, I am not sure whether there will be other side effect or not.
    Kelly.

  • Parameter field still editable after setting flag 'PropFlags​_NotEditab​le'?

    Hi,
    Parameter field still editable after setting flag ‘PropFlags_NotEditable’?
    I have defined a step type with a string parameter. (MyParameter). This parameter field has to contain custom generated data, stuffed from a code module.
    I want to have ‘MyParameter’ read only for all instances of the step in my sequence.
    I have set the property flag ‘PropFlags_NotEditable’ for ‘MyParameter’ in my step type definition, because I want to have this parameter read only in all instances.
    When I try to edit ‘MyParameter’ field in an instance of the step in the sequence in the variable pane ‘Step’ - ‘MyParameter’, it still works?
    What is wrong here, I suppose this should work?
    Best regards

    1) Make sure you have show hidden properties turned on in the station options, preferences tab.
    2) In your step type expand the variables to the place where the expression is stored for the parameter argument. In the .NET adapter this would be something like the following:TS.SData.Call.Params[0].ArgVal. Right-click on ArgVal and select the Properties menu item.
    3)  Click on the advanced button and select flags.
    4) When the edit flags dialog pops up, click on the Type Flags button.
    5) Check the PropFlags_NotEditable flag for the Instance Default Flags section. Click OK on this dialog.
    6)  If you want the change to effect currently open instances I think checking the "Reset Flags... " checkbox on the edit flags dialog will do this, otherwise this change will only effect new instances of your step type. Press ok on the remaining dialogs.
    7) New instances will now not allow editing that value. NOTE: This only works for the sequence editor module panel though. It does not work for the dialog version used by the user-interfaces.
    One thing I want to make sure you are aware of for step types is that using a default code module like this has drawbacks versus using postsubsteps. Setting the default code module doesn't keep the user from changing the specification after they insert the step, also updating existing steps if you want to change the prototype is more problematic. You might be better off with a design more like the step types that ship with teststand like the message popup step type (which also ship with source code so you can see how they are implemented) which instead use post-substeps and edit-substeps and instead designate the none adapter for the step type so that the step type can never have a code module. What they do instead is their edit substeps display a dialog that gets the settings/parameters to the operation that the step type performs and stores those as subproperties of the step. Then at runtime the post-substep gets this information and executes the necessary code. Unlike the default code module setting, changing the substeps in a step type automatically effects all existing instances of the step. Changing the code module only effects new instances, and loaded instances if you check the checkbox for that.
    Hope this helps,
    -Doug
    Message Edited by dug9000 on 04-16-2010 09:58 AM

  • How to do changes in Layouts setting and SAP scripts to meet requirment?

    hi SD gurus,
    Please explain me how create and work with Z output .
    where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
    pls forward func spec of Z output
    points will be rewarded
    thanx & regards

    you need ABAP skills to do this.
    basically you need:
    1) draw the layout on a piece of paper
    2) define the fields you need and find out the corresponding SAP fields
    3) check the document with the customer
    4) give this specification to the developer
    5) the developer will give you a program name and form name: place them in the message for the document.
    Roberto

  • Create document set using ECMA Script

    Hi,
    I want to create a document set in SharePoint 2010 document library where i have already included document set content type.
    Is there any way to create a document set using ECMA Script?? If yes, then please provide the sample code for this...
    Thanks.
    -Prashant

    Hi Prashant,
    Although this post is aimed at SP 2013 and the App model, it should give you the object model references you need to complete your goal:
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    In particular the following function should be of use:
    function CreateDocumentSet() {
    var ctx = new SP.ClientContext("http://yourSharePointSite");
    var parentFolder;
    var newDocSetName = $('#txtGetDocumentSetName').val();
    var docSetContentTypeID = "0x0120D520";
    var web = ctx.get_web();
    var list = web.get_lists().getByTitle('DocSetLibrary');
    ctx.load(list);
    parentFolder = list.get_rootFolder();
    ctx.load(parentFolder);
    var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);
    ctx.load(docsetContentType);
    ctx.executeQueryAsync(function () {
    var isCreated = SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
    ctx.executeQueryAsync(SuccessHandler('Document Set creation successful'), FailureHandler("Document Set creation failed"));
    }, FailureHandler("Folder loading failed"));
    ctx.add_requestSucceeded(function () {
    $('#txtGetDocumentSetName').val('');
    alert('Request Succeeded');
    ctx.add_requestFailed(function (sender, args) {
    alert('Request failed: ' + args.get_message());
    // Failure Message Handler
    function FailureHandler(message) {
    return function (sender, args) {
    alert(message + ": " + args.get_message());
    // Success Message Handler
    function SuccessHandler(message) {
    return function () {
    alert(message);
    Keith Tuomi | Twitter: @itgroove_keith | Blog:
    http://yalla.itgroove.net
    Please click "Propose As Answer" if a post solves the problem or "Vote As Helpful" if a post has been useful to you.

  • How to add a file in Document Set using ECMA script?

    Hi,
    I want to upload a particular file into Document set using ECMA script.
    I can do it easily through C# but unable to achieve the same using ECMA Script.
    Any pointers or piece of code will be helpful.
    Thanx in advance :)
    "The Only Way To Get Smarter Is By Playing A Smarter Opponent"

    The following blog post provides a way to create a document set using ECMA:
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    The following blog post provides a way to upload files into a document set using CSOM:
    http://www.c-sharpcorner.com/Blogs/12139/how-to-create-document-set-using-csom-in-sharepoint-2013.aspx
    See if you can follow the logic in the CSOM example to apply it to ECMA. Let me know if you have specific problems with it.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • Wht is  ALV setting/flag to deletes the preceeding zeros in doc #s,?

    Hi Experts,
    am displaying doc #s in my_alv, so the zeros r coming as prefix........i wanna to truncate zeros......so, can use FM conversion exit..........but, pls. let me know that,
    Is there any  ALV functionality in SAP, which deletes the preceeding zeros in Sales doc, delivery doc #s?
    (Wht is  ALV setting/flag to deletes the preceeding zeros in doc #s,?)
    thanq
    Edited by: Srinivas on Feb 8, 2008 4:40 PM

    While defining field catalougue , define it as
      fieldcat_ln-no_zero  = 'X'.
    preceeding zeros of documents nos will not be displayed in ALV list.
    anya

  • IMAP setting flags for DSN message problem

    Hi,
    I have a question about processing DSN flags using Java Mail.
    We are trying to set SEEN and FLAGGED flags also for DSN messages (for any other messages it is working perfectly fine).
    The problem is that no flags are set, no IMAP commands are issued.
    For any 'normal' messages the IMAP command is issued (for example: A27 STORE 13 +FLAGS (\Seen)).
    We are using Exchange Server 2007 with IMAP support enabled on the mailbox.
    The strange thing is that i can manualy set SEEN and FLAGGED flags from Outlook on this DSN message and then print flags for this message from Java Mail.
    Is there any standard for FLAG processing for DSN messages? Is this a problem in Java Mail / Exchange or some limitation? As I believe DSN in also a javax.mail.Message from the implementation point of view...
    Regards

    Hi Bill,
    This was a good point, about calling setFlags method on the wrong message.
    The problem is because, we are dealing with Exchange bug described here:
    BODYSTRUCTURE with "multipart" "signed" not parsing
    and using workaround described here:
    http://www.oracle.com/technetwork/java/faq-135477.html#imapserverbug
    However, we were setting flags on message created using following code
    SharedByteArrayInputStream bis =  new SharedByteArrayInputStream(bos.toByteArray());
    MimeMessage cmsg = new MimeMessage(session, bis);not on original message from the mailbox.
    Regards

  • Where do we set flag -D... for embedded and standalone oc4j?

    hi,
    I want to set flag -Doc4j.formauth.redirect=true in embedded and standalone oc4j. Where should I add this definition for both environments?

    Hi,
    stand-alone its
    java -jar -Doc4j.formauth.redirect=true oc4j.jar
    in embedded OC4J,
    double click the project node in JDeveloper and select the Run/Debug option. Then press edit on the "Default" configuration and add -Doc4j.formauth.redirect=true to the "Java Options" field
    Frank

  • Nice set of perl scripts for h264 encoding stuff

    I have found a nice set of perl script written for flexible h264 related encoding. They were originally developed for gentoo but they also run fine under Debian. I guess running them under arch will work as well.
    Here is the original thread over at the Gentoo Forum:
    http://forums.gentoo.org/viewtopic-t-74 … 444a855600
    Here is the webpage from the author plus a newly build install bash script which will download and install the encoding suite:
    http://blog.fangornsrealm.eu/
    May be someone likes to build a package ?
    I am not using arch this much the last few month. So I am kind of the wrong guy for building such a package
    -D$

    I have found a nice set of perl script written for flexible h264 related encoding. They were originally developed for gentoo but they also run fine under Debian. I guess running them under arch will work as well.
    Here is the original thread over at the Gentoo Forum:
    http://forums.gentoo.org/viewtopic-t-74 … 444a855600
    Here is the webpage from the author plus a newly build install bash script which will download and install the encoding suite:
    http://blog.fangornsrealm.eu/
    May be someone likes to build a package ?
    I am not using arch this much the last few month. So I am kind of the wrong guy for building such a package
    -D$

  • VBscript and Process Responding to flag a script exit?

    Hey All
    I work for a small game company called The Good Mood Creators and I am trying to build a software kit that can be handed to someone, and with minimal effort on their part. Copy the folder to their PC, plug in an xbox controller, click the BEGIN.*** and play
    while our testing tools and streaming software have a chance to successfully start.
    FYI I do not program for our game..
    The tool I am including with this kit is a controller emulator (XBCE) that allows us to print controller input directly to the screen.
    I am using Open Broadcasting Software to stream gameplay to a private twitch channel via a simple batch called in this vb.
    My problem is that XBCE often hangs, and with some computers requires reinstalling .NET frameworks as well as the full directx distribution before updating again to get it to start. When it works however, XBCE will hang once started 1/10 times or so, then
    randomly a few times in a row. I don't want the remote playtester to start recording video before the tools are started. So I wrote a script that checks to see if the program is running a short time after its been started.
    <job>
    <script language="VBScript">
    Option Explicit
    On Error GoTo 0
    Dim os
    Dim wmi
    Dim procs
    set os=CreateObject("WScript.Shell")
    set wmi = GetObject ("winmgmts:")
    os.CurrentDirectory = "C:\Users\Public\TESTPC-remote\"
    os.run "XBCE.exe"
    While True
        Set procs = wmi.ExecQuery("select * from Win32_Process Where Name = 'XBCE.exe'")
        If procs.Count > 0 Then
            Wscript.echo "Initiate Good Mood?"        
            os.run "DATA\Mekazoo.exe"
            WScript.Sleep 1000
            os.run "DATA\obsSTART.bat"
            WScript.Sleep 1000
            WScript.Quit
        Else
            WScript.Echo "Good Mood Initialization Had Failed! Please Close All Running Applications And Try Again"
            WScript.Quit
        End If
    Wend
    </script>
    </job>
    But when its hung and not responding to the task manager, the process XBCE.exe is still getting listed in Win32 Processes. The script believes all is good and initializes the stream, but XBCE wont show up on the recording because it has crashed and windows
    is waiting for me to wait or close.
    I have searched but to no avail have I found a way to check if the task manager thinks if XBCE is hung, then proceed to quit the script. That's all I really need. If its not hung proceed, if it's hung quit. Can someone please help?
    Edit
    I have updated the code above to reflect my current progress with this question and so you dont have to dig through my terrible formatting.

    I have a few questions that I haven't got the vocabulary to figure out I guess.
    -Is there anyway to automate changing the execution policy?
    I tried sending powershell two commands from a ps1. Set-ExecutionPolicy Restricted and Set-ExecutionPolicy Unrestricted. Obviously it blocks the script from running to change from restricted. So I either needed a way through the problem or around it. I could
    ask the person playtesting to Win+R powershell.exe and type Set-ExecutionPolicy to Unrestricted and then include a line in the script to change it back once everything has started. The problem with this is the user having to change the executionpolicy
    every time they try to play, and the biggest reason I dont like this is that the user has to mess with powershell at all. That was my way around the problem.
    My way through the problem was to find a way to bypass the execution policy. I tried running a few lines of code I picked up here in cmd as a batch file and a javascript file. The line I ran was:
    http://stackoverflow.com/questions/9271681/how-to-run-powershell-script-even-if-set-executionpolicy-is-banned
    powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File <C:\Users\Public\TESTPC-remote\switchrun.ps1>
    Batch through cmd gave me bad syntax, JS basically said the same thing and suggested adding semicolons to fix the problems.
    -What is the script syntax to start a diagnostic process and then check to see if its true?
    I can not figure out how to write the script to both start XBCE as a diagnostic process and then immediately after see if its responding. I can send the command to start but powershell doesnt move to the next line.
    $p=[System.Diagnostics.Process]::Start('C:\Users\Public\TESTPC-remote\XBCE.exe')
    While $p.Responding = True
    Invoke and start both cause powershell to stop..
    -Can I use this command and chain the start commands together?
    While writing the script I have now I thought about the possibility of running a program, check to see if responding equals true as a case to start the next program, or else stop the previous process and close the session. Here's my gibberish with that:
    $p=[System.Diagnostics.Process]::Start('C:\Users\Public\TESTPC-remote\XBCE.exe')
    While $p.Responding = True
    $p=[System.Diagnostics.Process]::Start('C:\Users\Public\TESTPC-remote\Mekazoo.exe')
    Else Stop-Process ('XBCE.exe')
    Exit-PSSession
    While $p.Responding = True
    $p=[System.Diagnostics.Process]::Start('C:\Users\Public\TESTPC-remote\OBS.exe')
    Else Stop-Process ('Mekazoo.exe', 'XBCE.exe')
    Exit-PSSession
    I have more questions but honestly with how many people have viewed my question vs answered it's clear I'm just an idiot and need to read more.. but Ill keep posting.
    Youneed to drop back andlearn a bit more about how software based systems wotj and how progrmming systems work.
    THe code you posted cannot funciton because it makes no technical sense.
    We cannot answer every little questionfor you. You need to spend time learning the basics and ask quesitons when a real issue confuses you.
    You cannot use a non-existent variable in a loop test becase it wil always evaluate to false and the loop will never execute.  This si programming 101.
    Execution policy IS automated via Group Policy. Please as you domain admmisn or Netowrk Admmin to explain the to you. 
    Your original question has been answered.  If you have another issue please open a new topic.
    ¯\_(ツ)_/¯

Maybe you are looking for