Jump to content

Volume names from 4d array


Recommended Posts

How to get a list with Volume names from 4d array?

Thank you

QUOTE(Eugen Graf @ Aug 3 2007, 02:26 PM)

How to get a list with Volume names from 4d array?

Thank you

Ok, I think I have it. Pages, Rows and Columns should be 0 and Volume shoulb be disabled in Index Array VI. Is it right?

Eugen

Like this?

Link to comment

QUOTE(crelf @ Aug 3 2007, 04:49 PM)

A 4-D array is just a 3-D array with an extra dimension. What's a "Volume name"?

Raw -> Column -> Page -> Volume

Eugen

If You imagine

Letter or word - 1D

Raw or column- 2D

Page - 3D

Book - 4D

Rack with books- 5D

Cabinet - 6D

Library - 7D

and so on...

And I want to have a list of all books.

Thanks

Link to comment

QUOTE(Eugen Graf @ Aug 3 2007, 02:15 PM)

And I want to have a list of all books.

Thanks

I think of the Excel model as the easiest for visualization (to an extent):

1D = row or column

2D = sheet

3D = workbook

4D = Collection of workbooks

5D = ok, really, at some point all analogies will start to break down

:P

Link to comment

QUOTE(Eugen Graf @ Aug 3 2007, 06:00 AM)

How to get a list with Volume names from 4d array?

Dimensions don't really have names, they really only have values... you are really asking 'how do I get the data (values) from a particular dimension of 4d array?'.

You need to disable indexing on the dimension you want to 'slice out' and use constants on the other dimensions to tell LV how you want to slice the data... Or alternatively you can get a subset of data using Array Subset. In your case, you probably want all data that is in the specified dimension so using the Index Array function (similar to how you showed it in your post) should work and be easier to use.

Link to comment

QUOTE(Omar Mussa @ Aug 3 2007, 11:51 PM)

Dimensions don't really have names, they really only have values... you are really asking 'how do I get the data (values) from a particular dimension of 4d array?'.

You need to disable indexing on the dimension you want to 'slice out' and use constants on the other dimensions to tell LV how you want to slice the data... Or alternatively you can get a subset of data using Array Subset. In your case, you probably want all data that is in the specified dimension so using the Index Array function (similar to how you showed it in your post) should work and be easier to use.

Hmm :throwpc:

I will tell you what is my issue, probably You can tell me how I organize it better.

I want to make a VI translator wizzard. So I create me a data base ( a simple binary file with 4 D Array data). The values will be strings in any language.

So

1D is a String (text)

2D Control Label

3D Language

4D VI

So in step 1 I want to read my DB and look if VI Name is included in my DB. Then I want to list all available Languages for this VI. The user have to choose one of language or add a new. Then he should select a control to edit his texts (e.g. capture, scale label or on/off text). After editing all data will be stored in my DB and a entry in the ini file will say which language was selected at least for each VI. On the next start my VIs will have user specified texts.

Eugen

And thank You Omar Mussa for Your explanation, now I can understand that each dimension have only values.

and NO NAMES of dimention

Link to comment

QUOTE(Eugen Graf @ Aug 3 2007, 06:18 PM)

Hmm :throwpc:

I will tell you what is my issue, probably You can tell me how I organize it better.

I want to make a VI translator wizzard. So I create me a data base ( a simple binary file with 4 D Array data). The values will be strings in any language.

So

1D is a String (text)

2D Control Label

3D Language

4D VI

So in step 1 I want to read my DB and look if VI Name is included in my DB. Then I want to list all available Languages for this VI. The user have to choose one of language or add a new. Then he should select a control to edit his texts (e.g. capture, scale label or on/off text). After editing all data will be stored in my DB and a entry in the ini file will say which language was selected at least for each VI. On the next start my VIs will have user specified texts.

Eugen

And thank You Omar Mussa for Your explanation, now I can understand that each dimension have only values.

and NO NAMES of dimention

4-D data structure scare me.

There memory requirements scale as N^4. :oops: , well you can figure it out. :book:

If you had 10 VI's with ten langauges, .... you are talking 10,000 of strings.

If you had 100 VI and one had 100 controls... 1M of strings.

How about a different data structure?

1-D array of clusters where each cluster describes a VI.

The cluster would have

A structure like that would prevent the storage req's of your small VI from growing with the size of your largest.

BYW I use a similar model to visualize mutli-demensions

1 - character index within a line

2 - line on a page

3- page

4 - book

5 - shelf

6 - insle

7- floor

8 - Library etc

Since I live in Library PA, own a library, and am married to a librarian, I find this model easy to remeber and visualize.

Also;

I once read Jim Kring post something similar to "There is no real world need to represent any data structure with more than four dimensions." (Jim do you remeber what you said?) Since then, I have thought long and hard about using methods that require as few dimentsion as possible. ( Can't find a link to it!) This link may help.

http://forums.ni.com/ni/board/message?board.id=170&message.id=34111&query.id=193311#M34111' target="_blank">http://forums.ni.com/ni/board/message?boar...d=193311#M34111

And yes all you have to do is wire the book (volume) index and all of its pages come out (plus enough blanks sheets to be consistant with all of the other books, thus my concern with 4D data structures :headbang: ).

I hope this helps,

Ben

Link to comment

<plug>

Uhm, have you looked here (it's a localization add-on for LabVIEW)

</plug>

What about a variant solution:

Each VI would be a variant attribute with every control as an attribute with each language as an attribute:

http://forums.lavag.org/index.php?act=attach&type=post&id=6538

More information about this technique can be found at Tomi's nugget

Ton

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.