ttg_tj Posted March 10, 2006 Report Share Posted March 10, 2006 We can create VIs from the template in similar fashion i want to create a perticular folder hierarchy and copy some common VIs in perticular locations when i create a new project. as in 7.1(or even in 8) we had option to create blank VI or VI from template, is there any option to blank project or project from template. If this feature is not readily available then can i develop a tool which can do the job? How? Quote Link to comment
crelf Posted March 10, 2006 Report Share Posted March 10, 2006 I don't see any way to do it from LabVIEW, although the project file is just an XML file (try opening one up in a text editor), so you could certainly dynamically create one using LabVIEW itself. Quote Link to comment
ttg_tj Posted March 10, 2006 Author Report Share Posted March 10, 2006 I don't see any way to do it from LabVIEW, although the project file is just an XML file (try opening one up in a text editor), so you could certainly dynamically create one using LabVIEW itself. but how i can integrate it in LV8 Getting started screen Quote Link to comment
Ton Plomp Posted March 11, 2006 Report Share Posted March 11, 2006 I don't see any way to do it from LabVIEW, although the project file is just an XML file (try opening one up in a text editor), so you could certainly dynamically create one using LabVIEW itself. I THINK you can do it from LabVIEW, I can't check it at home, but I recall that the new VI-Server has references (with methods and properties) for Project Items. I was thinking about this since it would equalize the project settings between the different LV-programmers at our site. You should be carefull with the XML files The .lvlib files (Also coded in XML) have some binary info with them as my co-worker found out... If I get it working (Scripting Projects) I will share (some of) my code! Ton Quote Link to comment
Jim Kring Posted March 11, 2006 Report Share Posted March 11, 2006 You should be carefull with the XML files The .lvlib files (Also coded in XML) have some binary info with them as my co-worker found out... I agree, it is not a good idea to edit the XML. I believe that these files are signed (similar to a checksum), so that LabVIEW knows whether they have edited outside of LabVIEW. If the signature is not valid, then LabVIEW will probably refuse to load the file. However, I have not tested this theory yet. Quote Link to comment
i2dx Posted March 12, 2006 Report Share Posted March 12, 2006 We can create VIs from the template in similar fashion i want to create a perticular folder hierarchy and copy some common VIs in perticular locations when i create a new project. as in 7.1(or even in 8) we had option to create blank VI or VI from template, is there any option to blank project or project from template.If this feature is not readily available then can i develop a tool which can do the job? How? maybe the project duplicator tool helps ? Post#2432 Quote Link to comment
Ton Plomp Posted March 13, 2006 Report Share Posted March 13, 2006 maybe the project duplicator tool helps ? Post#2432 Tested it, (at work where i can't post) and forgot to take the VI home... But the good news is, it works. You can create a new project: Use the 'new' method of the application->project class With the new reference you can do a lot of things. Only I haven't tested the creation of a build, I think this takes a LOT of settings... Together with i2dx's tool it should be very interesting, if I remember it tomorrow afternoon I wil post the code tomorrow Ton Quote Link to comment
i2dx Posted March 13, 2006 Report Share Posted March 13, 2006 Tested it, (at work where i can't post) and forgot to take the VI home...But the good news is, it works. You can create a new project: Use the 'new' method of the application->project class With the new reference you can do a lot of things. Only I haven't tested the creation of a build, I think this takes a LOT of settings... Together with i2dx's tool it should be very interesting, if I remember it tomorrow afternoon I wil post the code tomorrow Ton nice tip! thank you. I found out that there is a "new" method for lvlibs, but I had no time yet to implement that anyway ... thank you for your feedback. You are the first one (except the 5 stars I got from anonymous ...) so I really appreciate it. I tried to improve it a little bit today, but I had to figure out the scripting property "SubVIs" is giving back an empty array ... [posted here] That would be extremely helpful to catch these SubVIs, which are in disable structures, and if I could catch the VIs in disable structures, I could put the dynamic VIs in a disable structure and copy them with the structure ... Quote Link to comment
Ton Plomp Posted March 14, 2006 Report Share Posted March 14, 2006 Well today I can add an attachements.... aaahhhh who needs proxies anyway?? Ton Download File:post-2399-1142321884.vi Quote Link to comment
Jeffrey Habets Posted March 14, 2006 Report Share Posted March 14, 2006 I agree, it is not a good idea to edit the XML. I believe that these files are signed (similar to a checksum), so that LabVIEW knows whether they have edited outside of LabVIEW. If the signature is not valid, then LabVIEW will probably refuse to load the file. However, I have not tested this theory yet. I actually edited a project file ones or twice because I needed a slightly different application and installer build and didn't want to lose the old ones and was to lazy to create complete new build specs. I simply copy/pasted the appropriete tags in the project file and edited the tags relevant for the naming of the build specs. This worked fine. I suppose if you stick with the schema for a lvproj everything is OK. Ofcourse it's always a wise thing to backup your project file before manually editing it. Quote Link to comment
i2dx Posted March 14, 2006 Report Share Posted March 14, 2006 I actually edited a project file ones or twice because I needed a slightly different application and installer build and didn't want to lose the old ones and was to lazy to create complete new build specs. I simply copy/pasted the appropriete tags in the project file and edited the tags relevant for the naming of the build specs.This worked fine. I suppose if you stick with the schema for a lvproj everything is OK. Ofcourse it's always a wise thing to backup your project file before manually editing it. cool! Nice tip. I have allready made a suggestion at the "NI wish-list", that it sould be possible to create "derivates" from one build spec, e.g. the one time, you want to build a full installer, or an exe with all support files, the other time, you just want to update the exe file, or you want to update the exe and specific support files .... etc. I also wrote in my suggestion, that the build number should count up automatically and there should be a system variable, containing the actual build number. Maybe it's a little bit difficult to syncronize the build count among the derivates, but hey, they created labview, that task should be easy to them [edit: why the heck, do I see the typos not until I have posted the message? maybe I need a >post< and a >really post< button - yes, I know there's a preview button ...] Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.