Jump to content
Bobillier

Personalize new project template

Recommended Posts

Hi

I want to know if there is a way to personalize new project template (empty project).

Eric

Hi Eric

What do you have in mind?

You can manipulate the project through the Project Class (VI server) using property nodes.

Here is a snippet to add a folder to a project.

post-10325-126027856337_thumb.png

I have attached an example (I did on a course a while back).

Might get you started!

Create Project.zip

[LabVIEW 2009]

Share this post


Link to post
Share on other sites

Hi Eric

What do you have in mind?

You can manipulate the project through the Project Class (VI server) using property nodes.

Here is a snippet to add a folder to a project.

post-10325-126027856337_thumb.png

I have attached an example (I did on a course a while back).

Might get you started!

Create Project.zip

[LabVIEW 2009]

Hi JG

It's exactly what i want . I just want automaticaly have new project with my standardized folder structure.Is your exempl is free (or bsd licence) because perhapse i want use it in RCF plug in.

Thanks again

Eric

Share this post


Link to post
Share on other sites

Hi JG

It's exactly what i want . I just want automaticaly have new project with my standardized folder structure.Is your exempl is free (or bsd licence) because perhapse i want use it in RCF plug in.

Thanks again

Eric

Hey man go for it! At the end of the day a reference is always nice but this one is not mine I got it from a course - so there is a reference in the VI description that you should include! :)

Its just an example and not going to be 100% so you will need to do some work.

If I remember correctly you need to handle cases where the folder already exists (which should be ok if you always use it for a new project) and adding a project library causes an error as it tries to add VIs twice!

Additionally you may like to check out my build script (link in my signature) - it has some VIs that do work on a project.

I would be interested in seeing your example when you are done!

Share this post


Link to post
Share on other sites

Finaly , i have just a bit modify your vi to creat a list of folders in a new project. I have creat Obj package , who install this tool in wisard folder.

I have just i small problem, i have try to "close front panel" of this tool at start. And in this case, the project is creat , but not the folders. When i let the front panel open and close it at the end, all run ok.

I send you my package , tell me if it's ok ,and perhapse why i can't close FP at start.

Regards

Eric

Project_creation_tool-1.0-1.ogp

  • Like 2

Share this post


Link to post
Share on other sites
<br>Finaly , i have just a bit modify your vi to creat a list of folders in a new project. I have creat Obj package , who install this tool in wisard folder.<br>I have just i small problem, i have try to "close front panel" of this tool at start. And in this case, the project is creat , but not the folders. When i let the front panel open and close it at the end, all run ok.<br>I send you my package , tell me if it's ok ,and perhapse why i can't close FP at start.<br>Regards <br>Eric<br>
<br><br>Can you set the panel to 'hidden'.<br><br>I think that LabVIEW does some book keeping, if no FP's for a given app instance are open, the app instance is closed.<br>A hidden FP is open but not shown, should od the trick.<br><br>Ton<br>

Share this post


Link to post
Share on other sites

Finaly , i have just a bit modify your vi to creat a list of folders in a new project. I have creat Obj package , who install this tool in wisard folder.

I have just i small problem, i have try to "close front panel" of this tool at start. And in this case, the project is creat , but not the folders. When i let the front panel open and close it at the end, all run ok.

I send you my package , tell me if it's ok ,and perhapse why i can't close FP at start.

Regards

Eric

Cool, glad it was an easy fit :thumbup1:

My suggestion is that you do not open the window (but don't close it either!) at the start.

Run your code then at the end open the window

Remember the way it is coded - the save method only runs if the Project Path is valid.

If you are calling it as a tool then this will most be likely empty as you have no default.

Therefore if you call the close method and you have not saved the project you will lose it!

post-10325-126032026068_thumb.png

Cheers

JG

Share this post


Link to post
Share on other sites

Hi bob,

here is a screenshot of what I meant (and works), you only see a small flikker of the window opening.

post-2399-126038560806_thumb.png

Second you know a VI can call itself directly in LabVIEW 2009. (ignore if you use an older version):

post-2399-126038556116_thumb.png

Ton

Share this post


Link to post
Share on other sites

Second you know a VI can call itself directly in LabVIEW 2009. (ignore if you use an older version):

The code was originally done in 8.5 or so and I recompiled it in 2009.

Regardless of the recursive method used, it still works, which is the most important thing.

Share this post


Link to post
Share on other sites

Thanks for your comments. I have test the hidden solution and the open project FP at the end, but i found a strange things . When i do that, the front panel don't open, but if i don't save the new project , i lost the labview start windows. Labview appear only in taskbar.

So i decide to remove the hidden FP action and place it in unactive structure. With this, all become ok.:blink:

I don't have front panel open and don't lost labview start windows if i don't save the new project.

I send you the new version of this tool for validation.

Regards

Project_creation_tool-1.0-2.ogp

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.