Programmat​ically Inserting search directory

Hi Ppl,
I tried programmatically inserting a search directory. I used the method Engine.SearchDirectory.Insert. After calling this method I called the SearchDirectory.Reload method. Despite calling this method the newly added directory was not displayed in the search directories list in sequence editor. When we change Mytypes.ini or other configurations external to sequence editor I get the pop up to reload them. But when I inserted search directory It didnt ask for reloading. I had to restart sequence editor for the new directory to be listed. How do I reload without restarting sequence editor ?
Below is the code that I used .
Solved!
Go to Solution.

Sathish -
I believe the behavior you are seeing is expected. When you call the VI stand-alone outside of TestStand, you are creating a different instance of the engine. Thus, you have one instance of the TestStand Engine in the Sequence Editor process, and one instance of the TestStand Engine in the LabVIEW process.
Now, when you call SearchDirectories.Reload() from the LabVIEW VI, you are telling the LabVIEW instance of the TestStand Engine to reload the SearchDirectories that it has cached from the SearchDirectories on disk, however, this has no effect on the Sequence Editor instance of the TestStand Engine.
Now, if you were to call your VI as a code module from a sequence that you execute within the Sequence Editor, and you pass the Engine as an input to the VI (RunState.Engine), then you would see the behavior you are expecting.
You could also try the following as a test: With the Sequence Editor open, run your VI as you have been. Then, in the Sequence Editor, execute a step that calls RunState.Engine.SearchDirectories.Reload() (if you're in TestStand 4.0 or newer, you can simply call this in a Statement step). Then check the Search Directories... have they updated?
Hope this helps.
Manooch H.
National Instruments

Similar Messages

  • How to programmatically add a search directory path

    Is there a way to do this from a CVI program?

    Hello,
    As stated in the previous answers there is no way using the API to do this. However, you can write some code to add a search directory programatically. What you need to do is as follows:
    1. Get a reference to the config file. You do this by calling Engine.ConfigFile. This will return to you a reference to the TestExec.ini file.
    2. Clone one of the elements of the Search Directory list. The search directories are stored in an array, in which each element is a container that has the following fields: Disabled (Boolean), SearchSubDirs (Boolean), FileExtRestrictions (string), Path (string).
    3. Insert the cloned element into the end of the Search Directories array.
    4. Once the element is in the array, you can change any one of the fie
    lds listed above.
    5. Increment the change count and save the config file.
    Note: The changes that you make to the config file will not take effect until you restart the Sequence Editor. This is due to the fact that we cache the config file when the Sequence Editor is loaded.
    I have attached a sequence file that will do this. Depeneding upon the programming environment you are using, you can mimic the actions performed in this file in your code.
    Hope this helps.
    Attachments:
    ModifySearchDir.seq ‏19 KB

  • Removing search directory by name dynamically

    I have been using the SearchDirectories.Insert method to add search directories in TestStand dynamically.
    Now I am required to remove a search directory dynamically. The problem is that the SearchDirectories.Remove method lets me specify which directory to remove by inputting the index in the list instead of the name/path of the search directory. This is a problem because I will not know at which position is the directory I want to remove in the list.
    Any suggestions??
    Thanks
    Anuj

    Ray,
    Thanks for your reply. I did not think about this. I started implementing your solution by first retrieving the number of directories using the Count property of SearchDirectories, then calling the Item property for each index, then accessing the Path property for each item. I somehow don't see the path getting returned and I can't figure out why.
    I have isolated that code into this VI. Can you look at this and tell me what I am doing wrong?
    Thanks
    Anuj
    Attachments:
    Test.vi ‏12 KB

  • Custom Icon can be loaded from search directory

    Currently Custom Icon can only be placed under 
    C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)\Components\Icons
    and
    C:\Program Files\TestStand 2014\Components\Icons
    and also from 
    search directory option for icon (New Idea)
    If icons can also be loaded in path mentioned search directory, It help a lot in handling things among a large ATE Team (50 Test Developers)
     

    I made the zip file with WinZip in the same directory as the class file,
    as directed by the previous thread, and uploaded it to my server.
    It still does not load the applet.
    Here is my webpage:
    http://www.geocities.com/shaolin_bi/scopeApplet.html
    Can someone please take a look and tell me what I am doing wrong?
    Thanks.

  • Setting Search Directory with LabVIEW RTE

    Hi,
    I've LabVIEW 8.0.1 run time engine installed on target computer and would like to run LabVIEW executable on target computer.  I also have required low level support VIs for developed VIs. 
    Question is: how do I set the search directory for low level VIs with LabVIEW run time engine installed on the system.
    Suggestions/comments are appreciated.  Thank you.

    If your hierarchy is the same as was in the IDE, then there won't be a need to search for the VIs. If the VIs are not found where they are expected to be, then LV (including the RTE) starts to search for them first in the folder where the VI\application is and then in the folders in its list. To change the list, you need to place the viSearchPath key in your application's INI file. You can copy this key from the labview.ini file and then modify the paths listed in it.
    Try to take over the world!

  • Programmatically download/export search usage reports

    Hi all,
    With Sharepoint 2013 enterprise (on premise) ... is there a chance to Programmatically download/export search usage reports ( with Powershell for example) ?
    These reports are requested
    every two weeks by some users who do
    not have access to the Web Administrator.
    Thanks for your help

    http://social.technet.microsoft.com/Forums/sharepoint/en-US/dc719361-50bc-40ba-bd6b-5035c5a876ca/export-report-from-sharepoint-over-powershell
    $wc = New-Object System.Net.WebClient
    $wc.Credentials = [System.Net.CredentialCache]::DefaultCredentials
    $url = "your url here"
    $file = "d:\temp\output_file_location_and_name.csv"
    $wc.DownloadFile($url, $file)
    Or 
    http://radutut.wordpress.com/2013/01/27/how-to-get-search-analytics-reports-programmatically-in-sharepoint-2013/
    SPSecurity.RunWithElevatedPrivileges(delegate
    // You can use SPContext.Current.Site.ID if you have HttpContext
    using (var site = new SPSite(siteId))
           var context = SPServiceContext.GetContext(site);
           var searchProxy = context.GetDefaultProxy(typeof(SearchServiceApplicationProxy)) as SearchServiceApplicationProxy;
           var topQueries = searchProxy.GetSearchReport(1, Guid.Empty, Guid.Empty, startDate, false, maxRows);
           foreach (var query in topQueries)
                  //process top search term
    http://www.sharepointtalk.net/2014/02/query-sharepoint-search-analytics-using.html

  • ICal quick search list

    Is it possible for the iCal quick search to list events from future dates longer than 2 years in advance?
    Having set events within iCal for a variety of future dates, some 3+ years, I am only seeing a list upto approx. 2 years in advance.
    Thanks
    iMac G5   Mac OS X (10.4.3)  

    After some searching it looks like To Do items don't sync. Events do. In-freaking-credible. Can it be that hard to do? Who's in charge at Apple on this? I don't think they use a productivity system like GTD...

  • Configuring dynamically loaded VI's search directory for both 64 and 32bit

    Background:
    I have an application that has been developed, built in LV2012 32bit.  It needs to run on a 32bit and 64bit machine (Win7, I understand the application itself will only ever be 32bit, but it needs to run in both environments).  The application dynamically loads a bunch of VI's which are raw vi's on disk (think just copy directory of files over from developer machine to the target machine that already has a exe running -- and just a copy, not a build of any sort).  All of these dyanamically loaded vi's at some point reference vi.lib, so I have a few things I need to do to the application to get it to work
    a) within the .ini file for the running exe viSearchPath=......C:\Program Files (x86)\National Instruments\LabVIEW 2012\<<bunch of directories>>\*
    b) within the VI object cache directory, I have a lvDistPath.txt file that includes C:\Program Files (x86)\National Instruments\LabVIEW 2012
    This works just fine for when I deploy these files and run the application on a 64bit version of Win7.  However, when I try to run the application on a 32bit version of Win7, it breaks -- LabVIEW is installed in C:\Program Files\.... (no (x86)).
    I am stuck with the dynamic loading architecture we have, and I can't start making changes to my code because it's not my code that is specifying where to find the files -- it's LabVIEW's internal searching algorithm.
    What can I do (short of managing two separate .ini & .txt configuration files, one set each for x86 and 64bit and managing two separate installers) to get around this problem?

    It sounds like you really don't have a problem with a 32 bit app vs. a 64 bit app.  It sounds like a problem with file paths being different on a 32 bit app on 32 bit windows vs. a 32 bit app on 64 bit windows.
    Two things you could do.
    1.  (Not sure this would work.)  Put 2 paths in the search directory, one for c:\program files path for 32 bit windows, and one for c:\program files (x86) for 64 bit windows.  One or the other will exist.  I don't know if something will hangup if it searches the other path that doesn't exist.
    2.  Since you are dynamically loading the VI's, you should specify the path when you are dynamically loading them rather than having LV search for them.  There is a function called Get System Info in the File I/O >> File Constants palette that will return the path to the Program Files folder for you environment so that you can build on that to get to your dynamic VI path.

  • How to build a TestStand 2012 workspace ( insert a project / insert a folder) programmat​ically using LabVIEW 2012 and the TestStand API.

    Hi everybody!
    I am just trying to find out how to create a TestStand workspace … in LabVIEW using the TestStand API.
    To create a new workspace was quite easy. Unfortunately I am not successful to insert a new or existing project to the workspace.
    Furthermore I have to insert a folder from disk to the new or existing project in the way that I can use an absolute path for the directory …  
    Maybe someone had already solved this problem, in any case  I am thankful for any hint.
    Greetings from Germany,
    Norbert

    Have you find out how to add a folder to a project? I'm looking for this to... I tried WorkspaceObject.NewFolder[Name]whitout success...
    For creating Workspace and project see the newer resolved thread I created.
    Martin

  • Programmat​ically searching vi's for functions or text

    How can I programmatically search vi's present in different sub folders for the occurance of a particular text or a function?

    I have to backup Mike's opinion on this Q.
    Programatic searching is something I have never heard mentioned prviously.
    Now if you are just trying to serach for something in a set of VI's used in an app then using a "Tree.vi" (a non-functional VI that contains all top level and dynamic VI) is useful.
    I use Tree.vi"s for all of my applicaitons that involve dynamic entities.
    Can you explain a bit more about what you are attempting that prompts this query?
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Setting up Wiki Calendars in iCal with Active Directory Accounts

    I'm Having a little trouble wrapping my head around our Wiki Calendar Solution,
    Id like to find a way to get the 10.6 Wiki Server Calendar's in iCal Client - using our active directory authentication.
    I have a test 10.6 Server bound to our Active Directory with Wiki's up and running and am able to log in with AD account's and view and manage the Wiki Calendar - I can see how to subscribe to the calendar's - But I need full integration with iCal and maybe even Outlook - subscribing only provides read access.
    anyone have any idea how his can be accomplished in and active directory setting - my searches have lead me to OD solutions and thats not going to work.

    I don't know how much I'll be able to help, but I do have AD accounts using wiki services. Can you verify a few things:
    1. The AD group is listed in the "Wiki Creators" box in Server Admin, yes?
    2. If you open Terminal and run "sudo serveradmin settings teams:enableClearTextAuth", does it return "teams:enableClearTextAuth = yes"?
    3. If you open System Preferences -> Accounts and then edit the directory servers, does the AD domain show as working normally?
    Also, have you worked to isolate the problem? Have you tried creating an OD user to test against the wiki? Are the logs showing anything?

  • Insert a directory path and file name option

    I built a program that runs three tasks when a voltage triggers the data acquisition. I would like now to insert an option/control for two issues: selection of the directory where the data will be saved, and selection of the file name. How can I do this such that after I press 'start' I should be asked which is the directory where I want the data to be saved and then what is the file name?
    Another option would be the following: After I press 'Start' I will have a control where I can write or browse for the folder where I want to save the data; then I have another controller where I write the new file name. So in this case I should not be prompted except the case when I am trying to use the same file name.
    Where should I con
    nect this new subvi in my loop - before the tasksand before the trigger, or after the tasks and before the trigger?
    Thank you.

    Programming with LabVIEW might be fun but it is quite time consuming�
    OK, here is what I want to do.
    I have to monitor a machining process. I have to record cutting forces, power consumed, vibrations, and temperature. From each of these sensors I get a voltage as output and I used �Measurement and automation� and NI-DAQmx to program my tasks (I have LabVIEW Express running in Windows XP).
    The triggering of DAQ is generated by the input of a 4.5V DC when the CNC program starts; the stop occurs when CNC program ends and the output voltage becomes 0V. I have finished all the connections and now I have to build the vi.
    The �small picture� could be described this way:
    I want to record the parameters and save them in files that I could process later using specific vi.
    The �big picture� would be the following:
    I would like to build a stand alone program that will do the following: when I run the program [ i. e. double-click the shortcut (or the file)] a panel should come up in the center of the screen � in this panel I would like to be able to select what process am I going to investigate: grinding, turning, milling, drilling, tapping etc.
    Once I selected what process I am going to investigate, the front panel of a vi should come up � In this panel I should be able to select what parameters I am going to record: forces, power, vibrations, and temperature. On the front panel I should be able to see the waveform of the acquired data. A start/stop button and a led green/red for each parameter should show me the status of the acquisition (green is on, red is off). The start/stop button should allow me to �manually� start or stop the program at any time. Additionally, on the front panel I should also have icons with a choice for directory (folder) path, file name, and comments regarding the experiment. The date and time should be recorded in the file that is saved. There should be an option (check box or selection icon) for saving the data in binary or ASCII format.
    Similar to any program, the front panel should have a toolbar containing File, Operate and Help options. The File option should contain �Clear graphs�, �Setup DAQ� and �Exit� and the Operate option should contain: Use digital alarm, Use digital trigger, and Write data to disk with the option to be selected or deselected. The main front panel should close when I select File -> Exit.
    The File -> Setup DAQ selection should bring up another front panel in which I should be able to see the acquisition control panel (device, channels to get, buffer size, units � English or metric) and the calibration factors (for the tasks, including triggering voltage) including sampling rate.
    Well, that�s almost all. I understand I cannot do this all at once. Unfortunately, I have a very close due date in getting the system up and ready. I am hoping that I could get some help setting up a simple program and I could develop the rest step by step later...
    Can anybody help me with this program? I have attached a first attempt that would allow automatic triggering and stopping as well as displaying of forces, power and acceleration.
    Thank you in advance.
    Radu
    Attachments:
    Acq_Graph_Voltage-Int_Clk-Dig_Start_Ref_TRIAL1.vi ‏201 KB

  • Insert, search, delete performance overhead for different collections

    Hi,
    I am trying to create a table which compares performance overheads for different collections data structures. Does anyone want to help me out? I want to put a number from 1 - 9 in each of the question marks. 1 being very poor performance and 9 being very good performance (the reason I am doing this is that I had this question in a job interview test and I didn't pass it)
    anyone have any comments?
              Searching     Inserting     Deleting     
    ArrayList ? ? ?
    LinkedList ? ? ?
    TreeSet ? ? ?
    TreeMap ? ? ?
    HashMap ? ? ?
    HashSet ? ? ?
    Stack ? ? ?

    sorry the formatting has screwed up a bit when I posted it. It should have a list of the collection types and three columns (inserting, deleting, searching)

  • Podcast New Episodes Not Showing in Search Directory Listings

    I have added new episodes and changes to my current episodes in my XML files and pinged the iTunes store to update. If you are subscribed to the podcast, you get the updates and new episodes so it seems everything is fine. However, I can't get the search listings to update the new information...does the directory refresh at a different time span than the others...it's been about 3 days...
    http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=216603459
    http://www.theconnection1055.com/podcasts/podcast.xml

    Changed entire XML RSS feed

  • Can I programmat​ically control USB with LabVIEW?

    I have a requirement to test a USB device. The test includes powering several of the devices off and on, i.e., power cycling for several hours. My plan is to accomplish by using a USB hub, breaking out the power circuit and running it through a relay inside of a DAQ. A neater solution would be to programmatically turn the USB device off and on. I know that the computer communicates with the device under test via USB and not the USB port itself. So I’m wondering if it’s possible with LabVIEW to accomplish this.
    Thank you.

    I'm not exactly sure what Eric was referring to as far as ActiveX. If it's with respect to the operating system, you're not going to find any ActiveX interface with the OS to do this. Unless he was referring to software programmability of the hub? Don't know.
    With respect to power-cycling, a USB port can be disabled using OS calls. Thus, if you want to just turn off the whole hub you can disable the USB port that the hub is connected to. On Windows you can use a command-line utility called devcon to do this (search the forum as this has been mentioned before). The limitation is that devcon is not redistributable. This means that you cannot include it if you're giving this software to a customer. If, on the other hand you need to selective turn off the ports on the hub (i.e., to test individual devices), then you'd have to go back to the manufacturer of the hub and find out if they have a software interface to do this. Otherwise, it's the external power on/off approach via a relay or via a regulator as suggested by SnowMule.
    EDIT: Additional caveat: devcon may not work under Windows 7. You did not indicate what operating system you're using. However, the OS calls that devcon makes are still there.

Maybe you are looking for

  • Organising word templates

    I've happily and relatively easily made the transition from Appleworks to Pages for word-processing and other things, but what I miss is the ability to organise my templates into different categories, letter templates, financial templates, dvd/cd cov

  • Deleting songs from hard driive not in iTunes library with iTunes 10

    I have multiple user profiles on my computer so in order to prevent loss of hard drive space from duplicate songs we keep all our music in 1 folder and tell itunes not to copy songs when importing. The problem I have now is that any time a song has t

  • Small doubt in select query

    i want to count the no. of employees whose endda = '31/12/9999' and stat2 = '3'. tables are pa0000. can anyone tell me the select query?

  • Elements 12 and Windows Vista Camera Raw

    Is there a way to get my Elements 12 to work with Vista in camera Raw for my D610?

  • The passive node should not be shared by any other SQL instance.

    Dears, the customer has SQL cluster  with multiple instance for many technology.  Can I install new instance to host Lync backend database or not ???  I found in the below URL "SQL Clustering support is for an active/passive configuration. For perfor