Jump to content

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]

Link to comment

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

Link to comment

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!

Link to comment

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
Link to comment
<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>
Link to comment

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

Link to comment

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.

Link to comment

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
Link to comment

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.