Eugen Graf Posted August 4, 2007 Report Share Posted August 4, 2007 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? Quote Link to comment
crelf Posted August 4, 2007 Report Share Posted August 4, 2007 QUOTE(Eugen Graf @ Aug 3 2007, 11:00 PM) How to get a list with Volume names from 4d array? A 4-D array is just a 3-D array with an extra dimension. What's a "Volume name"? Quote Link to comment
Eugen Graf Posted August 4, 2007 Author Report Share Posted August 4, 2007 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 Quote Link to comment
Omar Mussa Posted August 4, 2007 Report Share Posted August 4, 2007 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 Quote Link to comment
crelf Posted August 4, 2007 Report Share Posted August 4, 2007 QUOTE(Eugen Graf @ Aug 4 2007, 07:15 AM) Row -> Column -> Page -> Volume Ahhh - gotcha! QUOTE(Omar Mussa @ Aug 4 2007, 07:26 AM) 1D = row or column 2D = sheet 3D = workbook 4D = Collection of workbooks 5D = Collection of libraries? 6D = Collection of cities of libraries 7D = Collection of counties with cities of libraries 8D = I could go on (and on, and on...) Quote Link to comment
Eugen Graf Posted August 4, 2007 Author Report Share Posted August 4, 2007 And now, I have no answer to my question. Sorry, can anybody answer? Thanks Quote Link to comment
Omar Mussa Posted August 4, 2007 Report Share Posted August 4, 2007 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. Quote Link to comment
Eugen Graf Posted August 4, 2007 Author Report Share Posted August 4, 2007 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 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 Quote Link to comment
Grampa_of_Oliva_n_Eden Posted August 5, 2007 Report Share Posted August 5, 2007 QUOTE(Eugen Graf @ Aug 3 2007, 06:18 PM) Hmm 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. , well you can figure it out. 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 the VI name - string/path launguages - array of strings/enums Control labels - array of strings Caption text - 2-d array of strings, one row for each control, one collumn for each translation 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 Quote Link to comment
Ton Plomp Posted August 5, 2007 Report Share Posted August 5, 2007 <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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.