LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
dthor

"On-wire" Concatenate

Status: New

I was reading this idea (Inline "Space constant.vi"), and I initially misread the title as "in-line space constant." This got me thinking... what if we could concatenate string constants on-wire? Give string constants an input which, if wired, concatenates the constant with the input. If it's not wired, it acts as a standard constant.

 

Since a picture is worth, well, a lot more words than I'm willing to type, here's what I'm thinking:

In-wire concatenate 4.PNG

(the current method can also use Format Into String nodes)

 

Most of the time, Format Into String is my VI of choice for essentially any string building, but once in a blue moon I'm looking to do something like the above. So it's a pretty limited use Idea. But someone might like it, so I figured I'd post it.

 

What does everyone think?

 

4 Comments
GregR
Active Participant

I'm not fond of this looking just like an array constant. It makes it look like you just have a wire going under your constant. I'd go for a look similar to the expression node. This means it would be a different type of object to drop but we could always give some easy editor hooks for switching.

smmarlow
Member

Good idea, in general (Inline string concatenation), but I agree with Greg.  Modifyiing the string constant would not be good.  You would not be able to tell the difference between a string constant that is wired, or one that happens to be sitting on top of a wire.  It would also be a new beast that no one has seen before  Greg's idea of a string version of the expression node for an inline concatenation function is great, and worthy of it's own thread.  Here is what it might look like:

 

 stringcat.png

 

It might also function as a truncated version of the Format Into String function if a specifier is used:

 

stringcat2.png

dthor
Active Participant

Regarding string constants on top of the wire... how do you think I made the images? Smiley Very Happy

 

But yes, making it a new object with a different look is a great idea. As you two have said, it would be far too confusing otherwise.

M*H*
Member

Why not just a combination of the two ideas above:

I used dthor's picture and added an indication, which will only appear, if the optional input terminal is wired. As the arrows are huge in size (compared to e.g. the coercion dots), they easily tell the difference between a concatenated string and a misplaced constant (wires under structures|objects).

 

In-Line concatenation of strings.png

 

I like the idea, because string operations in LabVIEW always had an immense footprint ...