+ Reply to Thread
Results 1 to 6 of 6

Dictionaries within dictionaries to describe 3 different tables and theirs atributes

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Dictionaries within dictionaries to describe 3 different tables and theirs atributes

    hi,

    i have 3 different ranges/objects and attributes for them:

    Screenshot_1.png

    I am wondering what will be the best option to create list of items and with ease refer to them in memory.
    I thought to use dictionaries like:
    1. One parent dictionary
    2. 3 child dictionaries with Key:
    - Entity
    - Atrribute
    - Relationship
    3. For each key add joined array.

    So diciotnary will save data and i can use it in another workbook/application to output and refer with ease to all data.

    What do you think about this? Maybe there is better way to store all data from these 3 tables and have option to use method "if dic.exists(key)"
    and i will have to check somehow if specific atribute already exists in atribute key dictionary.

    Please help,
    Best,
    Jacek
    Attached Files Attached Files
    Last edited by jaryszek; 11-29-2018 at 08:10 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,260

    Re: Dictionaries within dictionaries to describe 3 different tables and theirs atributes

    Who is table or data become parent dictionary
    And who is child dictionary
    Can you give sample result
    "ThankyouFor Attention * And Your Help!!"

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Dictionaries within dictionaries to describe 3 different tables and theirs atributes

    Hi,

    good point.

    Ok so First i am getting type of relationship and shape connected to this.

    And next i will go to "upper" object so container which consists of shapes included in container.

    So from container i have:
    - entity name,
    - shapes names

    From relationship i have:
    - connected shape and target shaper and containers for them
    - type of relationship.

    So i am looping through connections and getting relationship type, from it i am getting source shape and target shape and for source and target shape i am having container where i have to loop also and get shapes for each entity.

    So i want to avoid here repeating data.
    When i have shape from connector i will loop through container and i have to skip the same shape from i started looping.
    Because container contains shapes.

    Best,
    Jacek
    Last edited by jaryszek; 12-03-2018 at 06:46 AM.

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Dictionaries within dictionaries to describe 3 different tables and theirs atributes

    My structure is looking like:

    1. Container: Shapes : Relationship type

    So each container can have multiple shapes and each shape can have multiple relationships.
    I want to loop though different objects and check if already specific container/shape/relationship exists, if not add to dictionary or some other object which we can use.

    Best,
    Jacek

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Dictionaries within dictionaries to describe 3 different tables and theirs atributes

    This is some kind of building hierarchy in VBA but for each added property i have to check it is already exists or not.

    Best,
    Jacek

  6. #6
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Dictionaries within dictionaries to describe 3 different tables and theirs atributes

    I do not know if i am explaining this good.

    But i thought to create parent dictionary Container,
    within it create 2 child dictionaries:
    one with shapes (attributes)
    And second one with relationships.

    and somehow when i know that i am checking shape refer to child 1 dictionary and check if it existing.

    Or create only parent container dictionary, which will contain child dictionary with shapes/atributes and each shape will contain also child dictionary with relationship/relationships.

    What do you think?

    Did you do somehow similar?

    Best,
    Jacek

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to use objects and dictionaries
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-23-2018, 10:35 AM
  2. [SOLVED] Clear dictionaries within dictonary
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-09-2018, 05:20 AM
  3. [SOLVED] Comparing items within 2 dictionaries
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-25-2018, 07:12 AM
  4. [SOLVED] Creating Dictionaries Dynamically
    By Dal123 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-26-2018, 11:44 AM
  5. [SOLVED] Dictionaries vs Collections: Please help me understand when Dictionaries are better
    By joe31623 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-14-2016, 12:36 PM
  6. Multiple Dictionaries Or One Dictionary
    By goss in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-15-2012, 07:58 AM
  7. Dictionaries for grouping
    By Piotr in forum Excel General
    Replies: 2
    Last Post: 05-23-2005, 07:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1