Programmatically create build specification

Here's my problem. I have several dozen projects, each of which contain the same VIs (more or less) but are for different hardware configurations. In particular, they all contain 1) a PXI target that contains a unique EtherCAT configuration, 2) a unique startup VI that should run on the PXI, and 3) other peripherals that may have build specifications as well (e.g. FPGAs). Occasionally I need to make a change to the way our code builds, and that means I need to open every single project to make the change. Since the projects are very large, this takes a long time.
My solution is to create a separate program whose job will be to open the selected project, create build specifications with the settings that are common across all the projects, allow the user to select unique aspects such as the startup VI for the PXI, and build any/all other build specifications necessary for the selected project.
I found here a topic disucssing modifying build specifications programmatically, but since I want to create a build specification, I would need to know what every single tag is, how it is used, what its allowed values are, etc. Is there some documentation I can refer to for this? Or better yet an example VI that someone has already put together?

The other thing to remember is that at the end of the day, the output of the build specification process is just a string that happens to be part of an XML file (the *.lvproj).
You can always check your work by opening the project file with a text editor and verifying that it is correct. Just remember that because this is not documented or supported, it can change at any time. So if you are successful, anytime you update LV you will need to recheck this code to make sure it still works.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • Programmatically Changing Build Specifications from command line

    I use a batch file that calls a VI to build several LV projects.  I found the article http://zone.ni.com/devzone/cda/epd/p/id/5051 to get started and build projects; however, I was wondering if anyone has been able to change build specifications without opening the Application Builder dialog?  -> I would like to build an app. with a version number using the command syntax:  labview.exe <mybuild.vi> -- "project1.lvproj" "version number"
    Any thoughts regarding this problem?
    Thanks,
    Adam

    I have done some research and there doesn't seem to be a way to change the version number when building a project with this method.  If I find out otherwise I will post to let you know but I don't think it is possible.  I would look for another way to accomplish what you want by incorporating the version into the file name or something like that. 
    Eric A.
    National Instruments
    Distributed I/O Product Support Engineer

  • Creating Builds Programmatically LV8.0.1

    Salut.
    From LV8.0.1 help :
    QUOTE
    Creating Builds Programmatically
    You can use the BuildTargetBuildSpecification VI located in the vi.lib\AppBuilder directory to build source distributions programmatically from build specifications. If you have the Application Builder installed, you can use the VI to build stand-alone applications, shared libraries, Windows installers, and zip files programmatically. The VI is not available on the Functions palette.
    Note The LabVIEW Professional Development System includes the Application Builder. If you use the LabVIEW Base Package or Full Development System, you can purchase the Application Builder separately by visiting the National Instruments Web site.
    The BuildTargetBuildSpecification VI creates a build from a build specification that you specify in the Name of build specification input. If you do not specify a build specification, the VI creates builds from all build specifications in the specified LabVIEW project. You must specify the path and filename of the project to use in the Path to project input.
    If you want the VI to create a build from a build specification located in a target that is not My Computer, specify a target in the Name of target input.
    After you run the VI, you can view the path to the completed build files in the Generated files output.
    END QUOTE
    1-
    QUOTE After you run the VI, you can view the path to the completed build files in the Generated files output.END QUOTE
    Does someone know how to also get the created installer files? (i only get the exe output files)
    2- How can i start the build status feedback window when using the BuildTargetBuildSpecification.vi?

    Hi jacemdom,
    I hope you're doing well.  I have tested building an Installer specification on my end, and I am seeing the same results.  The correctly passes in the appropriate build specification reference, but no files are actually generated as you have noticed.  I am currently looking for more documentation for you on the BuildTargetBuildSpecification as it is a relatively new feature.  Regarding the status window with this VI, it looks like that feature is currently unsupported.  I will verify this an update you with what I find.  Have a great day!
    Thaison V
    Applications Engineer
    National Instruments

  • Programmatically create array from common cluster items inside array of clusters

    I have seen many questions and responses on dealing with arrays of clusters, but none that discuss quite what I am looking for. I am trying to programmatically create an array from common cluster items inside array of clusters. I have a working solution but looking for a cleaner approach.  I have an array of clusters representing channels of data.  Each cluster contains a mixture of control data types, i.e.. names, types, range, values, units, etc. The entire cluster is a typedef made up of other typedefs such as the type, range and units and native controls like numeric and boolean. One array is a “block” or module. One cluster is a channel of data. I wrote a small vi to extract all the data with the same units and “pipe” them into another array so that I can process all the data from all the channels of the same units together.  It consists of a loop to iterate through the array, in which there is an unbundle by name and a case structure with a case for each unit.  Within a specific case, there is a build array for that unit and all the other non-relevant shift registers pass through.  As you can see from the attached snapshots, the effort to add an additional unit grows as each non-relevant case must be wired through.  It is important to note that there is no default case.  My question:  Is there a cleaner, more efficient and elegant way to do this?
    Thanks in advance!
    Solved!
    Go to Solution.
    Attachments:
    NI_Chan units to array_1.png ‏35 KB
    NI_Chan units to array_2.png ‏50 KB

    nathand wrote:
    Your comments made me curious, so I put together a quick test. Maybe there's an error in the code (below as a snippet, and attached as a VI) or maybe it's been fixed in LabVIEW 2013, but I'm consistently getting faster times from the IPE (2-3 ms versus 5-6ms for unbundle/index). See if you get the same results. For fun I flipped the order of the test and got the same results (this is why the snippet and the VI execute the tests in opposite order).
    This seems like a poster child for using the IPES!  We can look at the index array + replace subset and recognize that it is in place, but the compiler is not so clever (yet!).  The bundle/unbundle is a well-known "magic pattern" so it should be roughly equivalent to the IPES, with a tiny penalty due to overhead.
    Replace only the array operation with an IPES and leave the bundle/unbundle alone and I wager the times will be roughly the same as using the nested IPES.  Maybe even a slight lean toward the magic pattern now if I recall correctly.
    If you instantly recognize all combinations which the compiler will optimize and not optimize, or you want to exhaustively benchmark all of your code then pick and choose between the two to avoid the slight overhead.  Otherwise I think the IPES looks better, at best works MUCH better, and at worst works ever-so-slightly worse.  And as a not-so-gentle reminder to all:  if you really care about performance at this level of detail: TURN OFF DEBUGGING!

  • Programmatically creating a Rendezvous : missing variable in Result container

    Hi everybody,
    For my tests purpose, I need to programmatically create a sequence. In this sequence, I need to insert Rendezvous steps.
    Everything works fine when creating them, but when I execute the sequence / steps created this error always show up for rendezvous step : 
    Unknown variable 'TimeoutOccured' ; Error accessing item 'Result.TimeoutOccured'
    According to the TS help, this variable should be created when I configure the step for the rendezvous operation. Drag and dropping the step from the TS insertion palette works fine, and the variable is created when chosing the operation 'rendezvous'. But when doing the same thing through programmation, the variable is not created.
    Here are the steps executed to create the RDV step :
    I create a new step using method Engine.NewStep
    I set the step name using Step.Name
    I set the rendezvous properties using a statement (Parameters.BranchesRendezVous.RDVStep is the variable holding the the step reference) :
    Parameters.BranchesRendezVous.RDVStep.AsStep.Operation = 1, //A value that specifies the operation for the step to perform. The valid values are 0 = Create, 1 = Rendezvous, and 2 = Get Status
    Parameters.BranchesRendezVous.RDVStep.AsStep.NameOrRefExpr = Parameters.BranchesRendezVous.RefName, //Contains the Rendezvous Name expression for the Create operation and the Rendezvous Name or Reference expression for all other Rendezvous operations
    Parameters.BranchesRendezVous.RDVStep.AsStep.TimeoutEnabled = False, //The Timeout Enabled setting for the Rendezvous operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.ErrorOnTimeout = True, //The Timeout Causes Run-Time Error setting for the Rendezvous operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.RendezvousCountExpr = Parameters.NbBranches, //The Number of Threads Per Rendezvous expression for the Create operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.Lifetime = 3, //A value that specifies the Lifetime setting to use for the Create operation. The valid values are 0 = Same as Sequence, 1 = Same as Thread, 2 = Use Object Reference, and 3 = Same as Execution
    4. Then I insert the step in my current sequence using method Sequence.InsertStep
    Everything works fine, the rendezvous step is perfectly created and all properties are set finely. However, the variable TimeouOccured is missing in the Step.Result container (TS help says that this propoerty exists when the step is configured as a rendezvous operation (cf. Operation = 1)).
    Am I doing something wrong somewhere ? Why is this variable missing ?
    Solved!
    Go to Solution.

    Hi Doug,
    TS help says that this property exists when the step is configured as a rendezvous operation (cf. Operation = 1)... So shouldn't it be created when I create / insert the step ?
    I find it very weired to add a subproperty to a StepType, in the Result container...

  • How do I programmatically create and save an empty project?

    I can programmatically create an empty project, but when I drop an
    invoke node on the project, select "Save", and wire in the desired
    path, it results in an "Error 1".  I am getting the error on the "Save"
    invoke node (An input parameter is invalid.)  The only input is the
    path, which is correct.  What am I doing wrong?  Also, how can I
    specify a name for the project?
    Greg

    I think the problem is that you use the current path and strip off the path the current VI's name.  This leaves you with a path that has no filename to save it to.  Put in a build path after it where you build in a project name with a .lvproj extension.  When I did that, the error went away.
    Message Edited by Ravens Fan on 08-08-2007 11:36 PM
    Attachments:
    Create%20and%20Save%20New%20Project[1].png ‏4 KB

  • Data Logging a programmatically created shared variable of cluster or array datatype into citadel DB

    Hi,
    Is there a way to log a programmatically created shared variable of cluster or array datatype into citadel DB?
    I have attempted to programmatically create a shared variable of type 'double' and was able to successfully log the same into Citadel DB. In the attachment, Please refer to the attached project SV_TC.lvproj and specifically to SV_W.vi for the code that i have used (W.png file shows the dB in MAX and shared variable in NI Distributed System Manager)
    However when i tried the same approach to create a shared variable 'array of double', i noticed that traces are not getting created and hence data logging isn't happening into the Citadel DB. I was however able to write and read the shared variable array without issues. The same is true with cluster datatype also. Please refer to SN_NW.vi for the code that i have used - only difference from SV_W.vi is that i have tried to create a shared variable of type 'array of double'
    One observation is that if i create an 'array of double' or cluster in a shared variable library using the project explorer and deploy, i could see that these being logged into Citadel DB.
    Hence i want to understand what could be done to achieve the same programmatically? Could you please advice?
    Regards,
    Sridhar
    Attachments:
    SV_TC.zip ‏3925 KB

    Why is the transaction happening over remote?
    Because we need the information to be on our database immediately when they submit it.
    I don't know anything about streams or replication.....
    The web database is run by the company that hosts our web site. We use PL/SQL to show the pages and output the html. It fetches the data the customer is requesting from our database, but I'm struggling to get the best way to insert into our database from there.

  • Labview project build specification

    I created a LabVIEW8 project.  WIthin it I have a few folders that organize my code.  I'm trying to create a Build Specification (found at the bottom of the project view).  I created a new Build Spec and began populating it.   I can add information to all fields, except the Source Files category.  When in the Source Files category I'm able to specify the Dynamic VIs and Support VIs in the bottom box by selecting Full OI - Top Level VI.vi.  However, when I try to select any single file (Launcher.vi in this case) as the Startup VI, all my VI files become grayed out.  I can't select any of them.  I tried placing my launcher file in a new folder (apart from the majority of my code).  It allows me to move the folder into the Startup VIs area, but when I say 'OK' or 'Build' at the bottom, it comes back telling me that it can't continue because I haven't selected a Startup VI.  Any ideas?

    Have you tried saving the project and trying again. I tried to create one on the fly and it wouldn't allow me to select it as a top level VI until I saved the project and the VIs in the project. Give that a try and let us know how it goes.
    Tyler H.
    National Instruments

  • Scrambled destination view in installer build specifications LV8.5

    I don't think this build specifications bug has been mentioned yet. I am using LV8.5 Pro under Win XP.
    When configuring a new installer build specs, under Source Files, I select my application item in the Project View and click on the arrow button to add it to the Destination View. The latter then faithfully reproduces the application files hierarchy, for example:
    Application Directory
        Manuals Directory
           Manual.pdf
        Application.exe
        Application.ini
        Startup.exe
        Startup.ini
    However, after I close and reopen the installer properties, the Destination View hierarchy appears scrambled, for example:
    Application Directory
        Manuals Directory
           Startup.ini
        Application.exe
        Application.ini
        Manual.pdf
    Supporting files get moved around the directory tree, some disapper, and others actually appear in duplicate. The outcome is exactly the same every time I repeat this process, but there is no apparent pattern to it.
    Now, when I actually build the installer and later use it, the application gets installed properly, with correct files hierarchy. What doesn't work are the shortcuts. For instance, in the above example, if I create a shortcut to Manual.pdf, it will actually point to Startup.exe. And if I need a shortcut to Startup.exe, I cannot create it because the target is not part of the Destination View.
    Thoughts?

    Dear Zador,
    Bug number 4CM921LJ titled "Shortcuts Added in Installers Are Not Created Properly" is a LabVIEW 8.5 Known Issue.  More information on the bug can be found in Knowledge Base 4EGEL6HY: Wrong or Incorrectly Disabled File Names Displayed in LabVIEW
    8.5 Installer Builder.  If you need an alternative to the workaround presented in the Knowledge
    Base, you can create separate folders for each file you need to have a
    shortcut created for instead of putting them all in one.
    This issue has been fixed in LabVIEW 8.5.1.  Please post back bug 4CM921LJ does not describe your problem.

  • RT Build Specifications: Component Definition Category is unresponsive

    Hi,
    I am using LabVIEW 2013 SP1 f2, with Real-Time 13.0.1
    When I open the Properties page for a Real-Time Application build specification (to run on a cRIO-9075), and select the Component Definition category, I find that the following occurs:
     - LabVIEW becomes unresponsive, and thinks for a while. It takes approximately 20-30 seconds or so to finally show the Component Defintion page.
     - When I click on Create a component definition file (.cdf), nothing happens. As I write this, I see "Required software components", and then these are greyed out: "Software component description", and "Software version" - but there is nothing to select or change?
     - If I click on another category, it takes in the order of 20 seconds to finally show this category.
     - To close the build spec (by pressing OK), it also takes a long time (more than 60 seconds). 
     - Things are fine with the build spec if I never enter the Component Definition category.
    Is anyone else experiencing this?
    Any help would be appreciated.
    Christopher Farmer
    Certified LabVIEW Architect
    Certified TestStand Developer
    http://wiredinsoftware.com.au
    Solved!
    Go to Solution.

    Hey Chris,
    I believe the following patch is the fix that you are looking for.
    LabVIEW Real-Time Module 2013 SP1 Application Builder Patch Details
    http://digital.ni.com/public.nsf/allkb/D72B45C6905D327A86257CC800547992?OpenDocument
    There's a link to download the patch at the bottom of that page.
    Regards,
    Ryan

  • Exporting build specifications to other project

    Hai all,
    I have created the build specification for developing a exe in my project.  There are too many destination directories am creating in the project and its a lengthy process too.  Is there a way to export the build specifications (of a exe) to another project and reuse the specification there.
    I am using LabVIEW 8.5 Professional development system.
    Previous versions of LabVIEW has *.bld file that can be called while creating new exe's is there any such option in 8.5
    With regards,
    JK
    With regards,
    JK
    (Certified LabVIEW Developer)
    Give Kudos for Good Answers, and Mark it a solution if your problem is solved.

    Hi JK,
    you can open your project file with a normal editor. It is a xml file. There is an item with name = build specification. If you copy this part to another project, then it shall be possible to use it there.
    Hope it helps.
    Mike

  • Build specifications menu empty

    Hi there,
    Im currently trying to create a dll from a Labview project, following the instruction from this webpage : instructions on creating a dll from LV.
    My problem is, when I right-click on "Build Specifications" I only have one item to choose from the "new" menu, which is "Source distribution".
    How can I get the other options ? (I had the same frustrating problem when I tried to create an executable file).
    My version of LV is 11 btw.
    Thanks in advance for any help

    Hi Johndoe77651244,
    Do you have application builder installed into your computer?
    You will need it to create a dll.
    More information of application builder can be found from the below link,
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/210592
    Best regards,
    TuiTui

  • Build specifications gone

    LV 8.5 on XP Pro
    I have a project with the build specifications for an executable.  The problem is that the startup VI's that are designated in the properties keep coming up missing.  The ICON is still in the project, but when I go into the "source files" they do not seem to save.  The problem is intermittent.  I have tried entering the properties, saving and then closing and reopening LV and had no problems but then the next time I go to do a build I receive error "You did not specify any Startup VI's." 
    Also the installer properties continually are corrupted and I have to re-create the installer.
    Any suggestions?
    ~gold 

    Hey Gold,
    Thank you for contacting National Instruments.  I'm not exactly sure if I understand your problem, so I do want to clarify what you have going on.
    If I understand you correctly, you have a project with VI, documentation, etc, to create an exe as well as an installer.  All files appear in the project explorer, and there does not appear to be any problems with the files there.  When you go to build an exe, you select your startup VIs, and move them into the Startup VI's section of the build page.  When you go to click build, you get an error that you have not selected any startup VI's.  Is this correct? Are there any details you would like to add to that?
    Also, can you please explain what you mean when you say the installer seems to be corrupted?  Can you give any error messages, or a better description of what is going on?
    Thanks,
    Kevin H
    National Instruments
    WSN/Wireless DAQ Product Support Engineer

  • Build specification Destination Does Not Preserve Hierarchy

    I have a destination configured in my build specification (application) so that I can include required LabVIEW and non-LabVIEW files in my builds.  This destination is configured as a directory with "Preserve disk hierarchy" checked.  Under "Source File Settings", I have one of the folders in my project configured to use the aforementioned destination.
    There are two issues that occur when I build my application.  The first is that it ignores empty folders entirely.  The second is that I have one folder that contains files (this folder is a child of the folder that is listed in the build spec) and when I build, it completely ignores the child hierarchical step.  I.e. It omits the child folder completely and put's the child folder's contents in the parent/top-most folder.  E.g.:
    Source:
    source/ParentFolder/ChildFolder/file1.ext
    source/ParentFolder/ChildFolder/file2.ext
    Build Result:
    builds/ParentFolder/file1.ext
    builds/ParentFolder/file2.ext
    If I put a dummy file (or another child folder with a dummy file) in "ParentFolder", it will then actually preserve the hierarchy of the files (empty folders are still ignored though).  Note that the ParentFolder is "Always Included" under the build spec's "Source Files".
    I need to be able to preserve the hierarchy without having to use a dummy file (this would be extremely confusing and could get deleted easily by future developers) or having to remove this hierarchical step in the folder structure (this code was inherited).
    I'm using LabVIEW 2013 SP1.

    Actually this has been discussed before -- a lot. The builder will not create an empty directory, and it only counts files as contents.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Build specification freezes when trying to view "Shared Variable Deployment" screen

    Labview 2009 f3
    For some strange reason, any applications that include shared variable libraries will no longer build into executables.
    I was able to build these applications without issue a week ago.  However, when I went to make an updated build today, the build failed and I had to force Labview to close.  When I view the build specification properties, I can navigate through all the option screens except the "Shared Variable Deployment" screen.  As soon as I click on that option, the interface freezes up and I have to force Labview to close.
    This problem does not occur for applications that do not include shared variable libraries.
    I tried removing the shared variable libraries from the applications that were failing, but that did not correct the issue.

    I never did find a proper fix to this issue. 
    One day I attempted to build the application again, but this time I got distracted doing something else.  When I finally checked the build status a few minutes later I expected it to still be frozen, but to my surprise I found that the application did successfully build.  To this day, that particular application still looks like it is going to lock up, but about about 8 minutes later it finally takes off and builds like nothing was wrong...like every other shared variable application I have created.  So I guess my only suggestion is to let the application sit for a while and see what happens. 

Maybe you are looking for