Property path to the current step running

Hello
I see an "access point" error for a step property path, only when the step is a sequence that is a subsequence call.  When these properties of the stage are access from the sequence of high level (the one that is open when the pass is started), I don't get the error.  These are the same steps, copy / pasted.  The code of step module is actually labview, write values of teststand using the tool 'set the value of property.  The property path that I use is:

ThisContext.RunState.Sequence.Main ["" "].

When executing the step of a sous-suite called by the sequence of high level, I can put a breakpoint on the market, made a right click Navigate to the property of the step and copy / paste the above path.  If the property does not exist whether the top-level or a sous-suite.  When breakpointing in labvew on the error, I can browse the above property at the same time I get the error on also.  I see that there is, but still, I get an error.
I guess my question is, is there a property path that can reference always reliable for the current step, no matter where it is in the hierarchy of the sequence?  I went through and all I can find is the path of the above property.

Thank you
David Jenkinson

Hi Dave,.

After talking with a co-worker of mine, we came up with a way to get the current context of the sequence in your code module.  Basically, we have the frame of the sequence of when the code module was called initially.  Then, you can use the context of the sequence to get running, allowing you to get the current thread.  Of this, you can get the context of the sequence of this thread and have access to everything you need from there.  We have created an example program that has a sequence that launches a VI that passes just a while loop and displays the current name of the sequence.  Here is a screenshot of the code module:

Tags: NI Software

Similar Questions

  • Get the path to the current document. Automation plugin

    How to get the path to the current document? (C++ Plugin)

    I used headset and getter - but I do not see that information.

    I understand that there is something in the opposite direction of:

    FullPathToAlias ('... filename.psd ', aliasValue);

    error = sPSActionDescriptor-> PutAlias (someDesc, keyFileReference, aliasValue);

    But how to someDesc so there is a lot of open document

    I'm sorry.

    the answer is:

    logfilename Char [MAX_PATH];

    Manage aliases.

    error = PIUGetInfo (classDocument, keyFileReference, & alias, NULL);

    AliasToFullPath (alias, & filename [0], MAX_PATH);

  • How can we get the path of the current document?

    Hello

    I want to store the path of the current document file in a string, I tried the AIDocumentSuite, and

    AIAPI AIErr(* AIDocumentSuite::GetDocumentFileSpecification) (ai::FilePath & file).

    His ended in prameter conversion error (c 2664). Can someone guide me to get the current path.

    Thanks in advance

    Farida kaid

    file ai::FilePath.

    Error AIErr is sDocument-> GetDocumentFileSpecification (line);.

    If (error! = kNoError) {}

    There was a problem
    }

  • Path to the current Script

    Is there a way to return the pathname of the script that is running?

    In the instance that you want to be able to run a script from anywhere outside of a hard drive or network by double-clicking it, but have to load files from and the Save to subfolders of the folder which the script is run, instead of hard-coding paths?

    That you will get the folder of the currently executing script...

    alert(File($.fileName).parent);
    
  • Problem with the path of the current script and applescript

    Work in cs3 here

    Here's what I'm trying to achieve. I wrote a script in javascript, but I need the support of shell for some features. I can only run applescript shell so I'm able to run the shell script quite easily to applescript, as long as I have hard the path of the code in the applescript.

    It stops working when I get the activeScript path and then try and pass it in applescript.

    Here's what works

    < code >

    "myScript = 'do shell script \"/users/my_username/myScript.sh\' &------"------" & point 1 of arguments and return. "

    myParams = ['param1'];

    var result is doScript (myScript, ScriptLanguage.applescriptLanguage, myParams);.

    < code >

    It works fine, however I would like to have the shell script live in the same folder as the scripts Panel, so it is easier for others to install

    So here's what I tried to do

    < code >

    myScript = app.activeScript var;

    var thisPath = myScript.path + "/ myShellScript.sh";

    "' myScript =" do shell script------"" + thisPath + "------" &------"------" & point 1 arguments and return. "

    myParams = ['param1'];

    var result is doScript (myScript, ScriptLanguage.applescriptLanguage, myParams);.

    < code >

    It produced an error that says: Indesign can't find the file.

    So I tried to escape all spaces with a replacement of the chain, as follows:

    < code >

    scriptPath var = "\" "+ thisPath.replace(/%20/g,"%5C%5C%20") +" "-" '; "

    < code >

    It still does not work. I also tried to make an object file

    < code >

    scriptPath var = File (thisPath);

    < code >

    Couple other things I've tried include POSIX path in applescript, removing the additional quotes, enveloping the path in quotes.

    It did not work also. Any help would be greatly appreciated that I do not understand what I am doing wrong.

    UPDATE:

    Just after posting, I have corrected this problem. For anyone who wants to know, that's what I did

    scriptPath var = ""' + thisPath.replace(/%20/g,"\\\") "+ '" '; "

  • How can I get the path to the current report of TestStand.

    I need to automatically print a report of failure of TestStand. I have implemented an automatically generated file name in TS Report Options and send it to a default directory on the hard drive. The reports are generated correctly, but on a test failure, that I want to find the name of the last file so I can print it. Does anyone know how to do?

    Thank you

    Dave

    There is a way to print until execution ends.

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/5889

  • How to get the current path of file (jsx) running?

    Hello.

    I want to be saved in the path of the current running jsx file.

    Is there a way?

    Thank you.

    Hi, is it ok for you?

    It seems "app.activeScript" or "$.filename ' is what you wanted.

    #target indesign
    try {
      // not active in ESTK
      // return script path if run from ScriptPanel
      alert(app.activeScript);
    }
    catch(e){
      alert(e);
    }
    
    // return bridgetalk if run with double clicking jsx
    // return script path if run from ScriptPanel
    alert($.fileName);
    
    alert($.includePath);
    

    Thank you

    mg.

  • additional folder added based on the current path of the vi when compiled in executable

    I found a new problem (for me) with the 'current path of vi' work today. When I compile the source code into an executable, I get a strange response from the service.

    I expect to see 'application.exe\application.vi '.  What I see is "application.exe\folder\application.vi. It's ruining my normal routines that address automatically step of removal of additional path that is required when moving between executable files and source code. I understand that I can use the "Application Directory" function and it does not solve this problem. However, as a test, I created a separate program with only the 'path of vi current' function and it worked again normally (application.exe\application.vi). There seems to be something specific to this one application that I don't understand.

    I tried a force all recompile (ctrl-shift-run arrow) and this did not help. I created a new project with the same source, and this did not help. I recorded the source under a different file name file and created a new project for this new source file and it did not help. I was using the function of the path of the current vi twice in top level vi, then I changed to use it only once and it did not help.

    I'm running out of ideas, and it is a project big enough that I really don't want to start over. The extra folder is the path to the file source vi. Any ideas on what would cause additional file information to be inserted in the path returned by the function of the current path of the vi?

    I use LV2012

    Generally, you shouldn't care how exactly screw are stored inside the EXE. If you care, this means that your code relies on it, which is a problem. What follows is general and can be inaccurate, simply because I don't like enough to actually check OK how it is:

    1. The EXE file is basically a folder zipped with the screw and the runtime of LV simply loads and works.
    2. If you use the indicator 8.x, you get a flat structure in the EXE. This is not your case, and I would not recommend it in any case.
    3. If the flag is set to false, LV basically takes all the screws that must go into the exe (static libraries dependencies and included screws) and places them in the EXE file using the same exact folder structure as code. This allows to undress and to build paths and having the code works the same way.
    4. Code that is located in the LV folder (such as the vi.lib code) is placed in a top-level called 1abv1ew folder, so it can be found.
    5. If you need to get the path of the folder, use the app dir VI.
    6. If you need to get a path to VI, use a static reference to the VI and a property node to get its path property. It works in dev and EXE.
    7. Virtual folders are not relevant (that they are not paths). AutoFill files are linked on the disk, so they do not reflect the path, but it's not really relevant. Jeff was simply pointing out that this may reflect the path and that he does not like them.
    8. Most likely your problem (since you say that something is changing) is that you are sometimes a VI that is not in the same top-level VI folder hierarchy, which then changes the top-level folder in the EXE (I'm guessing a VI of another project?). It's pretty easy to check by going to the project files tab and see if you have screws to another folder.

    I hope this helps explain, but as I said, you should generally not care on this issue. The only good reason I can think to need to know is if the paths inside the EXE exceed the limit on the length of path of the operating system, and then you start dealing with that. Except that just use the golden rule that screws inside the EXE will have the same structure as they did before, and to put you outside the EXE should use the app dir VI.

  • Windows path on the desktop of the current user

    Under MacOS ' ~ / Desktop "is the path to the current user's desktop. I would use in Windows? I tried Folder("%username%/Desktop"), but that has not worked. Any suggestions?

    You would use neither Extendscript allows instant access to the office of the current user through the predefined folder class member:

    Alert (Folder.desktop);

    Folder.Desktop is a fully functional pointer in a regular folder, as seen with

    Alert (Folder.desktop.getFiles().join("\r"));

    (see http://jongware.mit.edu/idcs5js/pc_Folder.html#desktop)

  • Pass the current sequence as an argument in customize tool Menu

    Is it possible to spend the full path and file name as argument in the Menu Tools Customize?

    Basically, I have an external tool that works with a movie file, and I would like to call from the Tools menu.  It is a type of order, but I don't know what to put in the arguments.  I found a post where someone said to use '% FILE execute%', but it does not work.

    In addition, if there are other available keywords, where is this list?

    Thank you.

    Hi Richard,

    It seems that it is not a way to do it using the command type.  The problem is that you can't use an expression to specify the arguments for the executable and you use an expression to get the path of the current sequence file.

    However, you can wrap your executable in a sequence file that has only a single step; the call of your executable file.  If you place a not executable call in your sequence, you can specify the argument as the current path by using the expression RunState.InitialSelection.SelectedFile.Path.

    Add a new item in the Tools menu, and then select your sequence of wrapper.

    See you soon,.

  • set a path to the report manually by using &lt; clientfiledir &gt;

    Hi all

    I'm pretty new to teststand so please forgive me if this is an easy question.

    BACKGROUND

    I'm running a sequence (TestGroup) that contains several sequences (tests) that work as a new execution.  It allows me to produce an individual report for each test (the top-level sequence produces a summary report only).

    QUESTION

    I want each of the reports to be stored in a single folder. I have setup report options to calculate the path of the report by using the following expression "\\Reports\\\\SummaryReport [] []".".

    This works very well for the top level, but that this also applies to the subsequences path is recalculated and is different from that of the upper level.

    CURRENT SOLUTION

    I'm currently moving the report path as a parameter to test sequences, but I find the value of the macro (from the sequence of high level) to build the report path.  Can someone tell me how to get this?

    Another solution is for me to take the path of the current report and the name of the file of this band.  It's a better solution?

    Any help would be great.  Thank you

    G

    Hi Jack,

    I use a whole test sequence (seq) group and a running each of my tests as a new execution.  This means that I can apply a different template to each test (which is needed to support the old style of the previous tests developed by my client) and produce a report of individual test for each test.  Then I clear the list of results when the report was drafted and replace it with a link to the report for the test (I hope that this reduces the risk of running out of memory on long series of tests).

    Each of my 'tests' is indeed a full sequence.

    I was hoping to use something similar to macros to move the report path to each of my tests (or model for the test), but have not been able to find these values anywhere in the report options window.  Ultimately I have to now take the string generated for high level sequence 'group' and make a formatted string and then pass it as a parameter testing (an another headache that had some problems).

    I'm not really a fan of this and think it should be possibel to configure the report options different for each model, that I had to do it manually by hardcoding stuff like path .xsl etc names.

    can someone tellme if it seems like the right approach?

    G

  • Installed application behaves differently by the path of the file

    Hi all! I have a problem regarding my application installed on another pc from "My Installer", that I have built my original labview project.

    I wanted to set up a file open/create operation, get the path of the current file of my vi, create the new folder 'report' and the new report file, whose name is composed of the date and time when it is created. With 'Get string date/time', I got the date as '25/05/2015' string and time string like '14:24:20 ', and 'find and replace the string' I have them is converted into '25052015' and "142420" everything simply by replacing "/"and":" with nothing.

    It works fine with the original vi in my pc, but with the application installed on another pc, I got error in the path, that instead of 'C:\...\report\transducer_25052015_142420.txt', I got "C:\...\report\transducer_25052015_14.24.20.txt"!  The colomns are replaced by dots!

    I have no idea why my installed application would give such error. Someone has an idea?

    PS. I tested on the difference between 'Run application path of time' and the file path by default, you can see on the image below.

    You can provide a format if you use the Format Date/time string.  You don't need to replace the then you do not have to worry about getting to be in the way in which the system settings.

  • How to get the full path of the image open in a filter plugin file?

    Hello

    How to get the full path of the current file, including the directory, the file name with the extension. I need information to download the file on a webserver for a plugin. I found an example that can get the name of the document (title property) but without extension and directory. How can they?

    James

    There is no way to get the full path of the active document in a plug-in filter. A plugin automation has access to this information and the file format plug-ins.

  • Open all documents in the current source Active doc

    Hey all,.

    I am writing my first script using ExtendScript. What I would like is for the script open the reference documents for all cards in the current active document.

    I think I'm pretty close, but I'm unable to find the right method to call to obtain the path to the current insert. So far, I have:

    function main()

    {

    var doc is app. ActiveDoc;

    If (! doc.) ObjectValid())

    {

    Alert ("no active document in short");

    return;

    }

    medallion of var = doc. FirstTiInDoc;

    While (in Medallion. ObjectValid())

    {

    Open the source document

    var Cheminaccesfichiersource = insert. InsetFile;           < <-this does not work

    openFile (sourceFilepath);

    move to the next box

    inset = insert. NextTiInDoc;

    }

    return ("Script complete");

    }

    function openFile (filename)

    {

    var openParams = GetOpenDefaultParams();

    var i = GetPropIndex (openParams, Constants.FS_FileIsOldVersion);

    .propVal.ival = constant .FV_DoOK openParams [i];

    I have = GetPropIndex (openParams, Constants.FS_FontNotFoundInDoc);

    openParams [i].propVal.ival = Constants.FV_DoOK;

    I have = GetPropIndex (openParams, Constants.FS_FileIsInUse);

    openParams [i].propVal.ival = Constants.FV_OpenViewOnly;

    I have = GetPropIndex (openParams, Constants.FS_AlertUserAboutFailure);

    openParams [i].propVal.ival = Constants.FV_DoCancel;

    I have = GetPropIndex (openParams, Constants.FS_LockCantBeReset);

    openParams [i].propVal.ival = Constants.FV_DoOK;

    var returnParams = new PropVals();

    var fileObj = Open (filename, openParams, returnParams);

    Return fileObj;

    }

    I tried inset. InsetFile and inset.filePath, but none work. Can someone tell me the correct syntax? Thank you!

    Try TiFile

    -Rick

  • The location of the file for the currently loaded file system.

    How will I know the path of the currently loaded file OS file system?  I'm on and iMac, Snow Leopard, CS4.  Shouldn't be difficult to find, but I'm not.  And if she is not there, it should be.

    What Mr Cox wrote:

Maybe you are looking for

  • Lenovo IdeaPad Z710 questions

    Hello. I have a Lenovo IdeaPad z710. The power jack on the laptop was broken and I had to replace it. When I got the laptop back, I turned on it just to make sure that it is displayed. He made and close the lid. Later that day, I tried to power it up

  • How fire alarm bad state?

    I want to use is "Bad status alarm" alarm was in service the corresponding sensor failure! What should I do to make the experience of alarm "Disrepair" first?  There is no example of a project on the 'bad status alarm '.

  • How do my folders and messages in the queue?

    I can't find anywhere that says I can drop something.  Is there a folder on this new system works?

  • Nothing is open in AM until I have manually restart

    Every morning when I come to my office, nothing opens and I me MSDOE. DLL, not enough errors memory etc. and any program errors. I can not even go to the Control Panel, or start the Task Manager. I can't even stop in the start menu. I have to make a

  • loss of internet access after you download updates from microsoft

    Last night, I got 21 microsoft updates and have been installed just before turning off my computer.  This morning, I had no access to the internet and I had to restore the computer to the past with the help of the assistance service.  Tonight as I wa