LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

New Create Project Dialog - Additionnal space generated after prefix in LV2013

Solved!
Go to solution

Hi,

 

I'm just trying to use the new create project dialog of LabVIEW2012, in order to use template projects.

I would like to use my templates from 2012 and the next versions, without having to change my code.

 

But it seems that between LabVIEW 2012 and 2013, there is a small difference when copying the project template :

- in LabVIEW2012: the project hierarchy is copied prefixed by the file prefix you entered,

- in LabVIEW2013: the project hierarchy is copied prefixed by the file prefix you entered AND an additionnal empty space

 

Is this a "normal" behavior or just a bug ? This empty space generated makes my projects non-functional...

Is there a way to bypass that ?

 

Thank you for your answers!

Christophe | qmt | Certified LabVIEW Architect
0 Kudos
Message 1 of 8
(2,691 Views)

Could you show us a picture of what you mean?  I can't visualize what you mean in my mind.

 

Thanks!  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 8
(2,684 Views)

Sorry if I wasn't clear...

 

- 1st enclosed image is my project template configuration dialog box : I want to add "TOTO" (no empty space) as a file prefix

1.png

 

- LV2012.png is my generated project in LV2012 : my VIs are prefixed with "TOTO" (no empty space)

LV2012.png

 

- LV2013.png is my generated project in LV2013 : my VIs are prefixed with "TOTO " (with an empty space)

LV2013.png

 

The problem is that in my template, I needed the file prefix of my project to get the path of an error file called TOTO_errors.txt that is additionnaly generated with a post action script. So in LabVIEW 2013, the file prefix I get is incorrect ("TOTO " - with an empty space) and then I cannot get the correct path to my error file.

 

I don't understand this difference between LabVIEW versions...

Christophe | qmt | Certified LabVIEW Architect
Download All
0 Kudos
Message 3 of 8
(2,678 Views)

That is an unfortunately undocumented change

Capture.PNG

 

 

I have to admit I approve of the space (It centers the text of the banner in the icons that would otherwise get a "_")

 

Getting to "TOTO_errors.txt" from either version is only a trim whitespace away in your post action script and should maintain backward compatability.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(2,662 Views)
Solution
Accepted by MountainClimber

We changed the prefixing in LabVIEW 2013 and later to add a space after the prefix. However, it does not add the space if you include an underscore in your prefix. Is your post copy scripting code adding the underscore to all generated items after the project is created? 

0 Kudos
Message 5 of 8
(2,661 Views)

Oh hey, guess what? I forgot that we added an INI token to disable the new behavior. If you add this token in LabVIEW 2013 or later:

 

NewProjectNoAddedSpaceOnPrefix=TRUE

 

Then you'll get the same 2012 behavior of no space being added to the prefix. If you want to see the code that handles all of this in LabVIEW 2013 and later, check out this VI:

 

resource\dialog\NewProjectWizard\Project Copying\Add Space to Prefix.vi

Message 6 of 8
(2,652 Views)

Thanks Darren !

 

No, my post copy scripting code is not adding any _, but all my VIs are prefixed with an _ (because the developer creating a new project will enter a prefix like TOTO, not TOTO_)

But If adding an _ to the prefix removes the empty space, then I'll document it so the developer enters a prefix with an _, and I'll remove all _ in my VIs

Christophe | qmt | Certified LabVIEW Architect
0 Kudos
Message 7 of 8
(2,649 Views)

@MountainClimber wrote:

 

No, my post copy scripting code is not adding any _, but all my VIs are prefixed with an _ (because the developer creating a new project will enter a prefix like TOTO, not TOTO_)

But If adding an _ to the prefix removes the empty space, then I'll document it so the developer enters a prefix with an _, and I'll remove all _ in my VIs


That would work. Or you could have your developers use the INI token I just mentioned if you don't feel like going and editing all of your source.

0 Kudos
Message 8 of 8
(2,642 Views)