LabVIEW Idea Exchange

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

Auto-populate Array Constant

Status: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.

Sometime, I have to make an numeric array constant for 10 elements, for example, and each element is the 2 increment of the previous element.  It will be nice if I can key in the first value in the arary, right click on it, and select "repeat series".  When I do that, it should give me a panel that ask for how many row and what type of increment is needed.  The type of increment should include all basic math such as add, subtract, etc.  This concept is very similiar to excel. 

 

I guess I can code some stuff that will do that, but I thought it will be a convenient feature.

 

Yik

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
5 Comments
RavensFan
Knight of NI

How about if we were able to copy a range of cells from Excel and when we drop it on the block diagram, it turns into an array constant?  The only question then would be how would Excel know what type of constant we have (uint, int, dbl, string, ...)

 

Then we let some calculations in Excel to the work (in case we want to do something more sophisticated then just incrementing.)

jyang72211
Active Participant
I will be pretty happy if all numbers are assume to be double in the array.  Since it is an array, we can alway change the date type to the desire format pretty easily.
------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
RavensFan
Knight of NI
Double would be fine for numerics.  But I would also like the possibility of dropping in an array of strings.  Though generally, what I do now is save my list from Excel as a text file.  Write a throwaway VI to read in that file and write it to an array indicator.  Run it.  Then create a constant from that array that I can then copy paste into my real VI.
Darin.K
Trusted Enthusiast

I have posted my QD shortcut which lets you copy and paste Excel cells (numbers or strings) into a FP control or BD constant here.

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=481582#M481582

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.