Bad behavior of cancellation with the additional block end no OnNewStep

Hello

I'm working on StepTypes requiring a block structure, as loops in TestStand (using TestStand 2012). I use OnNewStep lower level to insert the end block no during the boot block is instantiated.

I do not manage to get a good behavior of cancellation with it as follows:

  • If I do not use SequenceFile.IncChangeCount in OnNewStep stage, when I select Cancel in the sequence editor, the only stage of boot block is removed, the end block remains. My understanding is the expected behavior: motor TestStand don't know that the no end block has been added, she has no reason to remove it.
    However, I prefer to remove both start and end block as follows, as do with While TestStand, DoWhil or for loops.

  • If I do a SequenceFile.IncChangeCount in the OnNewStep stage, when I select Cancel in the sequence editor, I get the following error, and nothing is deleted or cancelled the sequence:

I guess TestStand increments the ChangeCount when I insert a step, and OnNewStep also increment the ChangeCount, while the operation should be considered as a single action.

I found in the documentation of the UndoStackclass with the method AggregateTopUndoItems method, I suppose, may be the solution. But UndoStack seems to be available only from ApplicationMgr and SequenceFileViewMgr (which are not accessible from the context of the sequence).

Any idea to get similar behavior at the correct stage of control of native stream, with cancellations?

Best regards

Well, I found a solution by looking at what is happening in CommonFlow.cpp (\National Instruments\TestStand 2012\Components\StepTypes\FlowControl).

For your information, here is the code:

Insert a corresponding END step after step again
' public static void OnNewStepWithEndStepFunction (SequenceContextPtr & sequenceContext)
{
If (! sequenceContext-> sequence-> HasMismatchedBlocks)
return;

PropertyObjectFilePtr file = sequenceContext-> SequenceFile-> AsPropertyObjectFile();
StepPtr endStep sequenceContext-> engine =-> NewStep ("", gEndStepTypeName);
UndoItemCreatorPtr undoItemCreator sequenceContext-> engine =-> NewUndoItemCreator (EditKind_InsertStep, file, L"" ");

undoItemCreator-> BeginEdit (endStep-> AsPropertyObject());
sequenceContext-> sequence-> InsertStep (endStep, sequenceContext-> StepIndex + 1, sequenceContext-> StepGroup);
undoItemCreator-> EndEdit();

_variant_t ;
endStep-> name = (char *) sequenceContext-> engine-> GetResourceString ("FLOW_CONTROL_STEPS", "END_DEF_STEP_NAME", "", &found);)

file-> IncChangeCount();

to do this, or the step type will not be displayed immediately as being used by the file
file-> TypeUsageList-> AddUsedTypes (endStep-> AsPropertyObject());

undoItemCreator-> CreateAndPostUndoItem (CreateUndoItemOption_NoOptions, TS::ApplicationSite_DefaultSite);
}

So the trick is to instantiate a UndoItemCreator that points to the current SequenceFIle, to call BeginEdit with, as an argument, the step to insert as PropertyObjetct, before calling the InsertStep method, then call the EndEdit method. Increment the file change, add the step as PropertyObject in the TypeUsedList file and finally call CreateAndPostUndoItem method.

... Happy!

Tags: NI Software

Similar Questions

  • No problem with the addition of a Kingston SSDNow V300 240 GB SDD to a D7-1245dx?

    A knowledge of any problems with the addition of a Kingston SSDNow V300 240 GB SDD to a D7-1245dx? Its size is 7mm width 69,85 mm x depth 100mm height but not sure of the size of the computer laptop berries/caddy supports

    Decide whether to use the laptop for a little longer so to upgrade the system to a Kingston 240 GB SDD drive and move the current drive to the secondary location (already got 2nd coming of caddy). It lets me do a bit more space on the laptop in addition to increasing performance.  Figure between an SSD and get up to 8 GB ram it should last a little longer.

    You will have a shopping cart for the SSD, but it looks like you have an and get a second wagon. Dv7-1000 series does not use a cable or connector. the hard disk plug right into SATA ports on the motherboard. 7mm drive has the connectors SATA and the mounting holes exactly in the same place as a 9.5 mm drive. All is just shorter so the reader rides low in the caddy. As a swimming pool with 20% water let out. 7mm SSD works perfectly. Windows 7 or 8/8.1 are preferred; Vista is not configured to treat SSDS as well or easily.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • can someone help me with the addition of an account for child microsoft under a perintal account

    need of assistants with you that links child account to perintal for the child account is connected to Xbox live Microsoft account. He is asked to accept the terms of use on the Xbox site. She also asked inter in perinatal password and ID. The perinatal e-mail password was disassociated from the perinatal account. went to account.live.com account add kid account with parental account but how always to choose the option to add an account it takes me to a new page and I don, t know how to navigate the page. Can someone from Microsoft help me please with the addition of my son's account to my account.

    Hello

    Did you manage on behalf of your son using a parent account? You have already set up a parental control using the Windows parental control? If it isn't yet, please visit the link below on how to set up parental controls on your son's account by using Windows parental control:

    Bind the child account for a Parent account

    You can also download the installer of Windows parental control in the link below:

    http://Windows.Microsoft.com/en-us/Windows-Live/Essentials-home

    If you have any other questions, please let us know.

    Thank you!

  • Hi, I had problems with the addition of soundtrack to Adobe premiere elements 13. When I add it or drag it immediately comes crashing windows, where says "Adobe Premiere Elements has stopped working". I can add videos with no problems, but cannot add any

    Hi, I had problems with the addition of soundtrack to Adobe premiere elements 13. When I add or drag it happens immediately windows crash, where says "Adobe Premiere Elements has stopped working". I can add videos with no problems, but cannot add .mp3 files.

    I had Windows 8.1, 2.4 GHz, 6 GB of RAM. How to solve this problem?

    Fixed a problem when converting the mp3 file. WAV...

    some poor Adobe Premiere Elements if there is for example simple bug in the software.  Waste of money for this software.

  • Strange behavior of validation with the fields 'user entered - required '.

    I have a situation where I have a form with several 'user entered - required"text fields  Some required fields are pre-populated by a server process before being presented to a user in the workspace.  When the user fills the remaining fields and submits the form (by clicking the button "Done" in the workspace), the of standard validation 'required' message, even if all required fields contain data.

    The shape where I discovered this problem is moderately complex, so I built a form simple and process to try to understand what is happening.  The simple form contains exactly two text fields, both are user entered - required.  A field is filled by a server process when the task of the associated workspace is called, B field must be filled in by the user.  There is no script customized beyond the bridge of form and a Submit button.  It's about as simple as it gets.

    If the field is filled, and then the user fills B field and click on 'Finish', the message appears saying 'at least one required field is empty... "even if the two fields contain data.

    If I return to the form and remove the B field (and redeploy the form and remember the process), to field is pre-filled and the user clicks on 'Finish', no message is displayed and the form is sent.

    As far as I know, the built-in for required fields validation works correctly only if all fields are pre-filled or none of them are pre-filled.

    Can someone explain what is happening?

    EDIT: I forgot to mention, I also created and configured an extract of the data for the simple form.  The data preview only contains a value for the to field.  When displayed in the preview of the Designer tab, everything works as expected.

    After a little work I have a better understanding of what is happening and a solution.  I have scripted several calls to xfa.host.messageBox (...) on different events.  It turns out that the pre-filled fields are not the culprit - they have values as expected.  The problem is with the non-pre-filled fields, and and a subtle behavior of the event model that causes a problem when using the workspace INTERFACE (at least on SS3).  Field values may not be resolved until a field loses focus (for example when a user moves to another field, or click a button).  Form used outside of the workspace, by clicking a "submit" button causes the focus to move to the button, which causes the values to be bound to the fields.

    Solution: Use an indirect Submit on the form button and submit indirect click handler used (in addition to your normal code):

    xfa.host.setFocus(null);
    xfa.resolveNode("[[fully qualified name of the real submit button]]").execEvent("click");
    

    Working space should detect and then make an Indirect button and run the associated click Manager, claiming in turn the form submit true button.

    This is where begins the next bit of fun: there is a bug in the form bridge (at least in the ES3 version) code prevents him from indirect detection submit buttons when you use JavaScript as a language Manager click of the button and

    Here is my hack to solve this issue:

    1. Open the 'ContainerFoundation_JS' script in the Script of Designer Editor
    2. Ignore the warning at the top of the file
    3. Find the named function: isIndirectSubmitEvent (it's on the line 1512 or something)
    4. Change the line that reads:
      • if (script.indexOf(button.name + ".execEvent") != -1) {
        

        TO:

        if (script.indexOf(button.name + ".execEvent") != -1 || script.indexOf(button.name + "\").execEvent") != -1) {
        
    5. Save and deploy the form

    If there is a better way to achieve this, please share.

  • HELP with the addition of ACR5.6 PSE7

    Hello

    I'm new to this forum. Photography is a hobby for me. I shoot with my Olmpus e450 and the Nikon D90. I write here because I have heard that there are a lot of knowledgeable people here.

    Here's my problem, I can not load O.r.f.s. on my CF card for processer PSE brute. I have not yet tried the Nikon raw files.

    So far, I downloaded from the website of adobe several times and have not been able to get successfully the process works.

    So I deleted all the files Cameraraw.8Bi. If at this stage I do not at all connect.

    I have a Windows vista Home premium 32 bit OS.

    I'm not very computer savy so if you want to help me you're going to be pretty accurate.

    I tried following the instructions in the support section of Adobe (cannot open a raw file in photoshop) or Photoshopelements - but I of course do something wrong.

    So thank you in advance,

    Best regards

    Dave

    Hi Dave,.

    Well, x 64 is 64-bit processing capability.  I have a gateway LX 6200-01 that has four cores processors (as a result, 64-bit) with 8 GB of memory.  It's great!  With x 64 systems, you can always load programs x 86 or 32-bit, you have with the 32 vista system.  The differences only is you have 2 processors and I have four processors.  If you have downloaded the program, you should always be able to re - install as much as keep you it on your computer.  In addition, Adobe should have sent you an email with the license #.  If you still have the e-mail program, you should be well reinstall.  If this is not the case, just call adobe, they should have a record of your transaction.  I don't know why your E420 files are not displayed to the top.   One thing you can do is download the DMG from Adobe file converter and convert all your ORF DMG files.  I had to do it before E620 included in the database.  DMG is just a file format Adobe created for Raw files to make them all universal, which isn't a bad idea.  Just go to the web page of Adobe support and in the search area type in DMG converter and it will lead you to the download page.  Let me know how it goes.

    Dennis

  • PowerState situation - problem with the code block - returns false, but seems real to list extended properties

    If this provision of the code (part of a script a lot bigger) seems to not work properly.  It returns false when it should return true.  Basically I want my script to verify that virtual machines are turned on by the admin of the script running.  There will be a break in case of failure and then press a button to try again.  Here is the block of code (which I have shared out in his own script to test).

    #Import the CSV
    $vmlist = Import-CSV d:\scripts\migration.csv
    
    #validate VMs are powered up on the new vCenter
    foreach ($item in $vmlist) {
      $vmname=$item.vmname
      $powerstate = (Get-VM $vmname).extensiondata.Guest.PowerState -eq "poweredOn"
      IF ($powerstate -eq $false) {
      write-host ""
      write-host "$vmname has failed to start, please confirm the VM is up.  Script will pause." -foreground Yellow
      write-host "Bring $vmname backonline then" -foreground Yellow
      Write-Host "Press any key to retry..." -foreground Yellow
      Write-Host ""
      $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
      }
         ELSE {
      write-host ""
      write-host "$vmname is powered up, script will continue" -foreground green
      write-host ""
      }
    }
    

    To list extended properties, it returns the correct information:

    PowerCLI D:\scripts > Get - VM ATEST-VM002 | format-list *.

    PowerState: receiving

    When I run in the script with the extensiondata. Guest.Powerstat, it returns false.

    PowerCLI D:\scripts > .extensiondata (Get - VM ATEST-VM002). Guest.PowerState - eq "receptor".

    Fake

    What should we not

    . ExtensionData (get - VM $vmname). Runtime.PowerState - eq "receptor".

    But why look in the ExtensionData that same property is exposed as (Get - VM $vmname). PowerState

  • Help with the Mavericks block Photoshop CC & bugs with Illustrator CC?

    I missed an update especially for CC users who have upgraded to Mavericks? Wishing to really I had held off on the upgrade of the operating system - Fortunately my CS4 is still compatible with the update of java, just bought the CC license but wanted to use new applications - now Photoshop CC crashes at launch (have not successfully opened a file in there without having to force to leave it) and Illustrator CC rebounded for a while then stopped. To chance five minutes later the application is started. I left it then reopened to search the GAL seemed even once, good - but then switched between that app and the other, then back to Illustrator CC and took time for her to open. I'm on a 3.4 GHz iMac intel core i7 with 16 GB ddr3 1600 mhz memory, it should not have lag issues and is only a few months old.

    This isn't a crash report, just a report of blocking/freezing (crashes and deadlocks are very different things).

    What this shows is that Photoshop was waiting for the BONE to get police information - and which can take some time if the cache OS font is damaged or incomplete (as you have installed the operating system).

  • How to create a store of data with the small block size

    Hello

    I want to create a data store on two 160 GB drives. All the VI Client allows me to do is to create a data store of whole disc with 1 MB block. But for reasons of performance with the virtualized Oracle RAC, which is 8K organized, I want to go down to a smaller block size. But how?

    Is it possible to split my drive to (lets say) four parts, each with a smaller block size and putting them all together like extends in a data store? To create partitions with fdisk does not work, as the VI Client wants to use the unpartitioned disk. Any ideas?

    Robert

    Hello

    It is not possible. The smallest block size is 1 MB on a VMFS partition.

    Best regards

    Lars Liljeroth

    -

  • [Flex 3] Problem with the additional compiler arguments (cannot open)

    Hello world

    I have a problem with an additional compiler argument:

    Error Msg: can't open 'WEB-INF/flex/service-config.xml'

    This is the error I have to manage.

    I read that it is has to do with the argument of the compiler:

    -Compiler arguments additional properties - Flex compiler:

    -local = en_US, fr_FR, nl_NL-source-path = local / {local} -services "WEB-INF/flex/service-config.xml"

    But what's not here?

    Best regards.

    PS: I tried with a lot of path to the file.

    Hi PLbe,

    Using weborb in your project or any type of remote access in your project.

    Try to give the complete path for argument of services instead of the relative path.

    Thus to specify---> - services "c:\inetpub\wwwroot\weborb30\web-inf\flex\services-config.xml".

    instead of -services "WEB-INF/flex/service-config.xml"

    If you pasted the WEB - INF folder in your Flex application project file in src so no need to specify the full path. But if you have not included the WEB - INF folder (including configuration files) in the folder of your project, then you must include the full path.

    "c:\inetpub\wwwroot\weborb30\web-inf\flex\services-config.xml" is the default path where this file...

    Thank you

    Jean Claude Chari.S

  • More fun with the addition of dates

    It drives me crazy.

    I have a code that works:

    //DateTimeField1 initialisation:
    $.rawValue = Num2Date( Date(), "DD-MM-YYYY")
    
    //Button to add 365 days:
    DateTimeField1.rawValue = Num2Date((Date2Num(DateTimeField1.rawValue,"DD-MM-YYYY") + 365), "DD-MM-YYYY")
    

    I'm changing it works with a date field where the date is entered instead of initalised and auto-calcule another field of date with a date of one year in the future.

    So, I tried to edit it several ways and either get nothing or December 31, 1900. The following code gives to this date, but at least it is in the correct format.

    ContactReviewDate.rawValue = Num2Date((Date2Num($.rawValue,"DD-MM-YYYY") + 365), "DD-MM-YYYY")

    I tried he broke with variables, different display formats, IsoDate2Num instead of Date2Num...

    I tried variations of the following, which worked for me in a form I've tested a few months ago and can't put on, either:

    var d = IsoDate2Num($)
    Date2.rawValue = Num2Date(d + 365)
    

    I think that it is related to date formatting, but it can't nail.

    Attached form. It's in the top section on the right - "Request Date" is the date field is entered and "Request Review/Closed Date" is the field that gets a year added to it.

    Just below here in bright orange, is the field + button of the first block of code above, which works very well.

    Hi Jono,

    I always thought was a bit of a nightmare.

    If (HasValue ($)) then

    var Date2Num = $vdate ($, "YYYY-MM-DD", "en_US")

    var vAddYear = $vdate + 365

    ContactReviewDate = Num2Date (vAddYear, "YYYY - MM - DD", "en_US")

    endif

    I know that the regional settings are optional, but I find that if I in and model the value of "YYYY-MM-DD" regardless of the reason for the field, it works.

    Good luck

    Niall

  • Laptop warns constantly bad hardware Insertion/withdrawal with the noise and the icon

    My laptop uses repeatedly insert/remove hardware alert when I did nothing. The Windows materiel.wav audio file is played and immediately followed by a materiel.wav Windows. In this case completely randomly and when making external hardware usb. Alerts are becoming increasingly common and is accompanied by appearing and disappearing immediately remove device icon.

    I disabled the sounds related to insertion and removal of hardware and sounds have disappeared, but the icon blinks always upward. This can only mean that the computer detects incorrectly insertion/deletion of material.

    Anyone know what this might be or how to fix?

    Thank you

    Hey Karena R,.

    Thank you for your help. I worked on that it's actually a problem of material in this particular brand of laptop Dell. I did things you suggested and used Device Manager to uninstall the USB etc. root hubs, and in doing so I noticed a mistake in the MMC disk section. The icon and the alerts flashing to the top has momentarily said MMC device.

    I checked online and found that the MMC device or the memory on this particular laptop card reader is at the front under the touchpad, that the sensors for the memory card are inadvertently set off by the movement and pressure on the keyboard itself. The sensors have been in contact with the "Virgin" card that comes with the laptop to go out when not to use a memory card. So why the sensors seem to not notice and then immediately realize he is not a real map.

    Thanks for your help, and if you see someone having this problem again, I suggest to correct errors on the device of the MMC or removing the blank card. I removed and I have not had the problem since.

    JumpXav

  • Problem with the addition of bluetooth for PhoneGap connection

    I have similar issue to the topic found on this forum, I am trying to use the same library of don/BluetoothSerial to connect my phone (Redmi Note 3) with PhoneGap app for mobile robot based on the atmega. I have already programmed robot to move in response to orders received and tested on the terminal application. Now, I need to achieve this with the mentioned plugin.

    I created the project by default, installed the plugin with CLI and modified files:

    Index.html: http://pastebin.com/8FA4DTtW

    Index.js: http://pastebin.com/ivbmMZPa

    config.XML: http://pastebin.com/mFdmr0Tv

    Then I executed cordova platform add android (I don't know if this is necessary in this case) :

    AndroidManifest.xml: http://pastebin.com/iNTXF1hh

    I run the browser application to check the logs from the console, everything seems to be fine fine browser does not support bth:

    Received the event: deviceready

    (index): 68 bluetoothSerial.connect: 98:D3:31:40:06:5 C

    When I try to run it on App Developer PhoneGap, scripts are broken and I am not getting any event neither success nor failure. I would be very grateful if someone teaches me how to call this function correctly.

    Version of Cordoba:

    5.2.2 Android

    browser 4.1.0

    Thanks for your reply, the real problem turned out be the version of phonegap. I followed the steps in this thread and it allowed me to build and install the plugin correctly.

  • Is it possible to create a contact with the API block filter?

    I use the API block to export contacts and would like to create a filter by using the API.

    Is this possible?

    If so, is there an example?

    I use a POST at .../contact/filter and get an error HTTPNotFound.

    Any guidance would be appreciated.

    Thank you

    Frank

    Of course

    You send a http request using the POST method when creating the export. In the message body, you include a JSON encoded string. Here is my code PHP to create the appropriate table:

    $a_requestbody = array)

    "filter" => $a_filter.

    'name'-online 'export'.date ('Ymdhis'),

    "secondsToRetainData"-online '3600',

    "fields"-online $a_fieldmapping

    );

    The $a_filter variable is an array, which is set up like this:

    $a_filter = array)

    "FilterEnsemble"-online "valueEqualsComparisonValue."

    -Online $a_fieldmapping ['C_EmailAddress'], 'value',

    'comparisonvalue' => ' [email protected]'

    );

    I assume that you know how to configure the mapping of the fields, so I did not include here.

    Other types of filters are available here: http://secure.eloqua.com/api/docs/Static/bulk/1.0/doc.htm#FilterRuleType

    Hope this helps,

    Wouter

  • Problem with the text block, put in place when it is used on the page number marker

    Hello!

    I would use the text block on the marker page number on the master page in Indesign. The text block should change width when increases the page number. It does not work. What happens is that when the number of page moves a two-digit figure, the numbers tightened itself (compressed on top of each other) and the block of text changes size unless I drag on it (which means I have to manually unlock the master page first).

    I'm doing something wrong, or is this a bug?

    Thank you!

    Altogether! So, you can use a rule of Pará to simply do it!

Maybe you are looking for