Deploying library programmatically

i am getting problem related with programmatically deploying library . getting error saying that :
LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
NI-488:  Command requires GPIB Controller to be Controller-In-Charge.
Method Name: Libraryeploy Library
Attachments:
error msg.jpg ‏111 KB

Hi preet_singh,
So let me try to understand: your subVI should write the values to the Temp11 and Temp21 in the subVI front panel and at the same time, the indicator for Temp11 and Temp21 in your main VI should read the change as well?
From what I see from your code, I do not see anything which writes to the shared variable as they are all reading from the shared variables Temp21 and Temp11 respectively. I did not see anything that is written to those shared variable. Second, the shared variables in your main VI is not in the loop and therefore they are updated once (from what I can see from the screenshot below)
In order to tranfer data from 1 VI to another using Shared Variable, the subVI has to write to the shared variable while at the main VI, it reads from the shared variable. The example is shown at the below screenshot which was taken from the example "Shared Variable.lvproj" which I have mentioned in my previous post (to make a shared variable to write, right click on the shared variable >> Access Mode >> Write): 
At the loop which the random number is writing to the Monitor Value 1 and Monitor Value 2, you can create an indicator so that you can detect what value is writen to the other VI.  
Another possibility is that both of your VIs should be set to be non reentrant and at normal priorities (go to VI Properties).  
Sorry, I may need to look into that VI of yours. As for now, I can come out with this possible cause of the problem you faced.
May I ask why don't you extract the values from the subVI directly instead of using shared variables?: http://www.ni.com/white-paper/7593/en/ 
Warmest regards,
Lennard.C
Learning new things everyday...

Similar Messages

  • How to add a new Shared Variable programmatically to an existing and deployed library?

    Hi there!
    I am trying to accomplish this on both LabVIEW 8.6 and LabVIEW 2010 and seems like it's not any different in this situation.
    My case: A project has a library with 4 Shared Variables (SVs). The library and the variables are deployed (visible in Distributed System Manager 8.6/2010). I want to add 2 more variables into this library. It is possible to do this manually from Project Explorer window's options menu. But while running an application it has to be done programmatically. Can I provide the library reference to the one currently existing without creating a new one?
    "Create Or Add Library To Project" function in the Datalogging and Supervisory Control (DSC) toolkit does not help in this case. That function, as the name suggests, just tries to create a new library in the project.
    Two possible methods:
    The function "Add Shared Variable To Library" (DSC>EngineControl>Libraries & Processes) needs a library reference, which could be provided via "CreateOrAddLibraryToProject" function, but this function tries to create a new library, and if I provide the path of the existing library it throws an exception that the library already exists in the project (yes, as I wrote above, I need to add new variables to an existing and deployed library).
    OR
    The function "Create Shared Variable" (DSC>EngineControl>Variables & I/O Servers) will add Shared Variable in a process, and not physically in a library file, and the problem (limitation) with this approach is that it doesn't allow to add complex data type Shared Variables (for example in LabVIEW 8.6 it has only 4 datatype options in input parameter, and even in LV2010 it does not have "Image" datatype that I need).
    The scond method is my preferred method as it allows to work on Online Shared Variables and doesn't create them physically in libraries (and this is good as the variables' scope remains only till the Variable Engine is running). But it doesn't support advanced data types, and the first method is powerful in terms that it supports to virtually any datatype, it just seems tricky to get that reference to the library.
    Any tips?
    Thanks ahead!
    Vaibhav

       <<<<>>>>   
    As the above two images show, while a library does not exist, it is easy to use the "CreateOrAddLibraryToProject.vi" which will add a new library to the project (if it doesn't exist on file system, a new library will be created) and that way, using the reference (the green wire going out from the function and the Case Structure, can be used to add Shared Variables to the library. The problem was what to do when a library already exists in the project, how to add more variables to it. I was looking for a way to get a library reference, and somehow I could not see it inside a Project's property (VI Server functions). Hence I posted the question. And upon continuing my search, I found it on the Application's property list.
    I hope it was useful for someone else as well. And thanks for the replies. Please share a better idea if you have.
    Vaibhav

  • How to programmatically Deploy Library of Variables binded to Custom IO Server?

    Hello,
    I'm developing an application where I've created a Custom Periodic IO Server  doing  special custom scaling of values read from  CompactFieldPoint module.  Then I've created a Library of Network-Published variables, where each variable is binded to a different item on Custom Server.
    Now I want to do a programmatic deployment of server and variable library at the start-up of application,because I need the customer to get a list of all variables from variable library to select which one he will be using in a measurement. The idea is to set various properties of selected variables, like enable logging, set alarm values etc. I can get a list of variables only from deployed libraries.
    The problem is that I can not deploy a library of binded variables neither with Deploy Library.vi or Libraryeploy method. I receive an error code 1, Invoke Node in PRC_Deploy.vi->Deploy Library.vi<APPEND>
    If I manually deploy the same library from Project Explorer, everything works as expected and no error is thrown. I'm using DSC 8.0.1 on XP Prof
    Can you give me some tips or advise how to achieve this. Is this approach OK or do you have better idea?
    Thank you,
    Roman

    Hello,
    I found the answer to my own question. Solution is very simple. When you create a data binding on a shared variable, you need to browse for item in Network Items and not on Project Items, doesn't matter if item is actually inside the same project.
    This solve my problem and I can now successfuly deploy library using Deploy Library.vi
    So far, my problems are solved, until the next one, of course
    Good luck,
    Roman

  • Hide Upload Document button in a sharepoint library programmatically

    Hi,
    How to hide Upload Document button in a sharepoint library programmatically?
    Thank you,
    AA.

    Hello,
    hope these references will help you out
    http://www.solwebsolutions.com/blog/entry/css-for-hiding-upload-options-in-sharepoint-library-ribbon
    http://sharepoint.stackexchange.com/questions/32606/remove-button-from-ribbon-in-a-specific-toolbar
    Good luck,

  • How to upload a video into Asset Library programmatically using server side code in sharepoint 2013

    How to upload a video into Asset Library programmatically using server side code in sharepoint 2013

    First you need to configure your asset library with video content type and then you can use SharePoint object model to upload the video files in it...
    check this link for setting up Asset library
    http://www.c-sharpcorner.com/UploadFile/54db21/asset-library-in-sharepoint-2010/ 
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/1d64a5f7-c7db-4ae0-8b0d-d0722cacf5f2/assets-library-video-files-and-c?forum=sharepointdevelopmentprevious
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

  • Deploy Library Error

    Hi,
    I am using teststand 4.1 i am getting an error on the deploy library step. Please find the snapshot attached for reference.
    I am not able to understand the error, please help . I am having a full professional development license.
    Regards
    Amit
    Attachments:
    TestStand Error.JPG ‏131 KB

    Amit,
    Are you using LabVIEW 8.6?
    Did you install LabVIEW 8.6 before you installed TestStand 4.1?
    If so you need to install "Remote Execution Support for NI TestStand"  from your LabVIEW 8.6 CD.
    "Remote Execution Support for NI TestStand" feature is not installed on the machine if LabVIEW's installer does not detect TestStand on that machine. 
    Regards
    Anand Jain

  • Deploy Library Loading Screen

    I have a very large shared variable library using the DSC module Labview 8.6.1.  I am deploying the library when the project starts and that part is working fine.  However, because the library is fairly big it takes up to a minute to deploy all the shared variables.  During that time my VI is sitting there unresponsive.  I've made a "startup" vi that deploys the library and then opens the top level vi, but even then during the startup vi it is just sitting there with no indication to the user that anything is loading.  In development when you deploy the library, a popup displays the progress of the deployment.  Is there anyway to incorporate that into a build when the library is programmatically being deployed?  I would just like some indication to the user that labview hasn't crashed and things are still being loaded.  That's all I'm really after.  
    Thanks. 

    anybody?  I'm guessing this is not possible.

  • How to create a managed metadata column in sharepoint document library programmatically

    Hi,
    I want to create a column of type "Managed metadata" in a document library.
    I am new to managed metadata and its basics. So i need to know what it requires to create it. i got this
    1. Create a term set Group.
    2. Create term set.
    3. Create a term.
    I am using sharepoint foundation where "Term Store Management" service is not available.
    I am writing this code for OFFICE 365. So can write a code with prediction, assuming i have basic info required to run my code?
    var termStore = session.TermStores["Managed Metadata"];
    var group = termStore.Groups.GetByName("KB Submission Policy");
    var termSet = group.TermSets["KB"];
    Can write this code with respect to screen shot as follows in my term store 
    Please reply...

    Hi,
    Please check this
    http://community.bamboosolutions.com/blogs/sharepoint-2010/archive/2011/08/03/sharepoint-2010-cookbook-programmatically-create-term-sets-amp-metadata-columns-in-managed-metadata-service.aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • How to convert .doc files to .docx in a sharepoint library programmatically.

    Is there any possibility to Convert .doc files to .docx in a sharepoint document library.
    I have thousands and lakhs of .doc files and I need to automate to convert those .doc files to .docx with an automation script or powershell script or doing it programmatically.
    Can someone help me get through this.
    Thanks
    Gayatri

    Hello Gayatri,
    You can convert files from doc to docx using following options
    Option 1 
    in bulk using  Office File Converter (OFC) and Version Extraction Tool. Please refer below url for reference - http://technet.microsoft.com/en-us/library/cc179019.aspx
    Option 2 - PowerShell
    please refer url -http://blogs.msdn.com/b/ericwhite/archive/2008/09/19/bulk-convert-doc-to-docx.aspx
    Convert DOC to DOCX using PowerShell
    I was tasked with taking a large number of .DOC and .RTF files and converting them to .DOCX. The files were then going to be imported into a SharePoint site. So I went out on the web looking for PowerShell scripts to accomplish this. There are plenty to
    choose from.
    All the examples on the web were the same with some minor modifications. Most of them followed this pattern:
    $word = new-object -comobject word.application
    $word.Visible = $False
    $saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat],”wdFormatDocumentDefault”);
    #Get the files
    $folderpath = “c:\doclocation\*”
    $fileType = “*doc”
    Get-ChildItem -path $folderpath -include $fileType | foreach-object
    $opendoc = $word.documents.open($_.FullName)
    $savename = ($_.fullname).substring(0,($_.FullName).lastindexOf(“.”))
    $opendoc.saveas([ref]“$savename”, [ref]$saveFormat);
    $opendoc.close();
    #Clean up
    $word.quit()
    After trying out several I started to convert some test documents. All went well until the files were uploaded to SharePoint. The .RTF files were fine but even though the .DOC fiels were now .DOCX files they did not allow for all the functionality of .DOCX
    to be used.
    After investigating a little further it turns out that when doing a conversion from .DOC to .DOCX the files are left in compatibility mode. The files are smaller, but they don’t allow for things like coauthors.
    So back to the drawing board and the web and I found a way to set compatibility mode off. The problem was that it required more steps including saving and reopening the files. In order to use this method I had to add a compatibility mode object:
    $CompatMode = [Enum]::Parse([Microsoft.Office.Interop.Word.WdCompatibilityMode], “wdWord2010″)
    And then change the code inside the {} from above to:
    $opendoc = $word.documents.open($_.FullName)
    $savename = ($_.fullname).substring(0,($_.FullName).lastindexOf(“.”))
    $opendoc.saveas([ref]“$savename”, [ref]$saveFormat);
    $opendoc.close();
    $converteddoc = get-childitem $savename
    $opendoc = $word.documents.open($converteddoc.FullName)$opendoc.SetCompatibilityMode($compatMode);
    $opendoc.save()
    $opendoc.close()
    It worked, but I didn’t like it. So back to the web again and this time I stumbled across the real way to do it. Use the Convert method. No one else seems to have used this in any of the examples but it is a much cleaner way to do it then the compatibility
    mode setting. So this is how I changed my code and now all the files come in to SharePoint as true .DOCX files.
    $word = new-object -comobject word.application
    $word.Visible = $False
    $saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat],”wdFormatDocumentDefault”);
    #Get the files
    $folderpath = “c:\doclocation\*”
    $fileType = “*doc”
    Get-ChildItem -path $folderpath -include $fileType | foreach-object
    $opendoc = $word.documents.open($_.FullName)
    $savename = ($_.fullname).substring(0,($_.FullName).lastindexOf(“.”))
    $word.Convert()
    $opendoc.saveas([ref]“$savename”, [ref]$saveFormat);
    $opendoc.close();
    #Clean up
    $word.quit()

  • WORD document becomes blank or corrupted after being uploaded to a Document Library programmatically?

    Hi everyone,
    I uploaded a WORD document to a Document Library with this code:
    using (SPSite currentSite = new SPSite(SPContext.Current.Site.ID))
    using (SPWeb currentWeb = currentSite.OpenWeb("Departments"))
    currentWeb.AllowUnsafeUpdates = true;
    SPList myList = currentWeb.Lists["Commercial Agreements"];
    SPDocumentLibrary myLibrary = (SPDocumentLibrary)myList;
    SPFolder myFolder = myLibrary.RootFolder.SubFolders["aFolderName"];
    using (Stream fStream = FileUpload1.PostedFile.InputStream)
    byte[] _bytes = new byte[fStream.Length];
    SPFile myFile = myFolder.Files.Add(FileUpload1.FileName, _bytes, true);
    The document gets uploaded into the correct folder in the Document Library, however when I open it from SharePoint it is just a blank document. And sometimes it is corrupted and cannot be opened.
    If I upload a PDF using this code, the pdf cannot be opened. It says the file is corrupted.
    Any ideas?
    Thank you very much for your help in advance.
    Lin

    Hello,
    I just written sample code, please try this: (Note: This code is not tested so you might need to modify it)
    Stream fStream = FileUpload1.PostedFile.InputStream;
    byte[] _byteArray = new byte[fStream.Length];
    fStream.Read(_byteArray, 0, (int)fStream.Length);
    fStream.Close();
    string _fileUrl = myFolder.Url + "/" + FileUpload1.PostedFile.FileName;
    SPFile file = myFolder.Files.Add(_fileUrl, _byteArray, true);
    http://www.c-sharpcorner.com/blogs/4250/programatically-add-file-in-folder-in-sharepoint-document-li.aspx
    http://sharepointwings.blogspot.sg/2013/08/programmatically-addupload-file-to.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Crash deploying library after uninstalling LabVIEW 2009

    I have been running LabVIEW 8.6 with the DSC module. Recently I briefly installed LabVIEW 2009 for evaluation, then uninstalled it. Now version 8.6 crashes every time I deploy a library. I have tried repairing, uninstalling and re-installing 8.6 with no success. The crash message says the problem is in msvcr71.dll. There are many copies of various versions of msvcr*.dll all over my computer and I am not sure where the problem lies. Can anyone help?

    Hi Richard,
    Can you please upload a screenshot of the exact error message? I would advise emailing or calling in at National Instruments through this link.
    Ipshita C.
    National Instruments
    Applications Engineer

  • Recommendations for a UML Library (programmatic)

    Hello All,
    Can anyone recommend a programmatic UML API?
    I want to generate UML diagrams by reverse engineering classes of interest that can be rendered in a web page. I was planning on using reflection to introspect my classes, so a programmatic library seems ideal. I'm also only interested in a subset of the classes fields. I'd like to eventually publish the maps to a wiki through maven.
    I am presently looking at Linguine Maps, but was interested if anyone knows of other ones I should evaluate as well, especially ones that render nicer looking diagrams.
    Thanks in Advance,
    Steven

    Hi Noel,
    Could you help
    provide a specific question?  I think your issue is out of our support.
    This forum is to discuss problems of C# code development.
    By the way , if you have some voice about
    C# video framework, please post your advice
    here.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Crash when using Invoke Method: Library:Deploy Library

    I'm trying to set a library of shared variables to deploy when a VI runs. When using the method to deploy a library, Labview will crash with no error log. I am able to use Library.Open to, for example, HiliteInProjectWindow, and Library.GetFileLVVsersion (8.6). But for the life of me I cannot get deploy to work. Any ideas?

    hbcnb,
    I'm not quite sure why that is happening, but I
    can give you a work around for it.  There is a property node that
    returns the mode that LabVIEW is running in (Run-Time, Development,
    Evaluation).  If you output this value to a case structure, you can
    include your deploy code in the run-time version but not in your
    development version so that it will cease to crash.  Place down the
    property node, then select  Application » Kind.  I've included a
    picture of how to wire this up. Let me know if this helps work around
    the problem a bit easier.  
    Sincerely,
    Chris G in AE
    Attachments:
    application_pic.jpg ‏27 KB

  • Deploy library for specific app in WL8

    Hello,
    In WL10, it is possible to deploy a library for specific application. Could anyone tell me how this would be done in WL8?
    Because the library should be seen by one application only and it conflicts with other application. Please helpppp..... :)

    Pete, the fact to use exploded archive is not a bad practice.
    Some of my clients have huge EARs and they don't have the choice if they want to update only a WAR.
    As for the original problem, if your client application changes and so does your library, you'll have to update the whole stuff, right ?
    Or you have for instance an EAR containing several webapps, with a JAR lib wich is used as an business interface.
    And when you modify your application (one of your webapp) and the library, you don't want to update the whole EAR. Is my understanding ok ?
    If so, solution proposed by Pete is the right one.
    Hope that helps.

  • How to add folder in picture library programmatically

     
    Hi All,
    I tried to add folder using below code but getting error of "Missing FileLeaf"
    try
                    if (properties.List.Title.ToString() == Utility.ListName.Events.ToString())
                        using (SPSite objSite = properties.Site)
                            using (SPWeb objWeb = properties.Web)
                                SPListItem lstEvent = properties.ListItem;
                                string folderName = Convert.ToString(lstEvent["Title"]) + "_" + DateTime.Now.ToShortDateString();
                                if (!string.IsNullOrEmpty(folderName))
                                    SPList lstEventPictures = objWeb.Lists.TryGetList(Utility.LibraryName.EventPictures.ToString());
                                    if (lstEventPictures != null)
                                        objWeb.AllowUnsafeUpdates = true;
                                        //SPListItemCollection folders = lstEventPictures.Folders;
                                        //folders.Add(lstEventPictures.RootFolder.ServerRelativeUrl 
    , SPFileSystemObjectType.Folder , folderName);
                                        ///* create a folder under the path specified
                                        SPListItem folderItem = lstEventPictures.Items.Add(lstEventPictures.RootFolder.ServerRelativeUrl,
    SPFileSystemObjectType.Folder , folderName);
                                        ///* set the folder name and update */
                                        //folderItem["Title"] = folderName;
                                        folderItem.Update();
                                        lstEventPictures.Update();
                                        objWeb.AllowUnsafeUpdates = false;
                catch (Exception ex)
                    Utility.SPTraceLogError(ex);
    Help me to resolve. Thanks in advance.

    Hi DK,
    You can use below mentioned code to add folder in any of your library. You need to changes little bit code as per your requirement.
    /// <summary>
    /// Provide utilities methods related to folder management
    /// </summary>
    public static class SPFolderUtilities
        /// <summary>
        /// Ensures the specified folder exists.
        /// </summary>
        /// <param name="list">The list where to create the folder.</param>
        /// <param name="subFolderPath">The sub folder path.</param>
        /// <returns>
        /// The existing <see cref="SPFolder"/> or a newly created if it did not exists.
        /// </returns>
        public static SPFolder EnsureFolder(SPList list, string subFolderPath)
            Contract.Requires<ArgumentNullException>(list != null);
            Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(subFolderPath));
            if (!IO.SPPathUtilities.IsFileOrFolderNameValid(subFolderPath, true))
                throw new ArgumentException("Invalid characters in the file or folder name", "subFolderPath");
            var folderPaths = subFolderPath.Split('/');
            var currentFolder = list.RootFolder;
            for (int i = 0; i < folderPaths.Length; i++)
                currentFolder = list.ParentWeb.GetFolder(currentFolder.Url); // hacky refresh
                var subFolder = currentFolder.SubFolders.Cast<SPFolder>().FirstOrDefault(f => string.Compare(f.Name, folderPaths[i], true) == 0);
                if (subFolder == null)
                    var newFolderItem = list.Items.Add(currentFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder, folderPaths[i]);
                    newFolderItem.SystemUpdate();
                    subFolder = newFolderItem.Folder;
                currentFolder = subFolder;
            return currentFolder;
    And here is the specifc code that you can use for Picture library only
    Question
    Vote as helpful
    0
    Vote
    yes the code sample provided by you is to create a image library and then to add a folder to it but i'm not sure with the string.empty being passed to list.items.add. i would still recommend to use the solution suggested by me. to check if library exists or
    not what you have to do is 
    SPSite _MySite = new SPSite("SERVERIP");  
                    using (SPWeb currentweb = _MySite.OpenWeb())
    SPList imageLib = currentweb.Lists["NewImages]
    if( imageLib == null)
    Guid listId = currentweb.Lists.Add("NewImages", "Picture Library", SPListTemplateType.PictureLibrary);
     imageLib t = currentweb.Lists[listId];    
    SPDocumentLibrary
     _MyDocLibrary =
    (SPDocumentLibrary)
    imageLib ;
                     SPFolderCollection _MyFolders = _MyWeb.Folders;
                    _MyFolders.Add("http://adfsaccount:2222/My%20Images/" + <<subfolderName>> + "/");
                    _MyDocLibrary.Update();
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

Maybe you are looking for