+ Reply to Thread
Results 1 to 1 of 1

setting up objects and extracting data from objects when of a user defined data type

  1. #1
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    178

    setting up objects and extracting data from objects when of a user defined data type

    I have a question on how to set up objects for a given problem
    And
    A question on how to extract data with the above objects


    PROBLEM MODELED BY OBJECTS

    I am representing the problem I am solving through a metaphor, that is not perfect but good enough
    The metaphor is that of a galaxy which is a collection of solar systems
    Each solar system has a sun and a collection of planets
    Each planet has relationships to the sun

    Thus I thought that
    a galaxy is a collection object
    containing a collection of solar systems (indexed by number of solar systems)

    a solar system is an object
    containing independent properties
    such as sun ID
    collection of planets within that specific solar system

    A planet is an object
    Having independent properties
    ID (integer)
    El (double)
    Type (string)
    Space coordinates of planet = an array of user defined data type (x,y,z)
    Do I make SpaceCoordinates an object with properties of x, and y, and z?

    And relationship properties (Object or data type?)
    DistanceToSun (double)
    (satellite data
    Possible Numof satellite orbits between planet and sun (integer)
    Array of possible orbit IDs (indexed by above possible orbits) (integer)
    Array of possible orbit locations (indexed by above possible orbits) of type (x,y,z)

    QUESTION #1
    Does it appear I have the right idea for defining my objects and collections of objects? Originally it did not seem right that "relationship properties of a planet should be in the planet object. But then i ended up with a planet object and
    a relationship object and a collection of planets and a collection of relationship objects. too confusing...so i lumped the relationship properties into the planet object. is there a better way?

    In the same vain, I was not sure if, in the relationship properties section of the planet object, I should include the sallite orbit info as just more planet properties or create a user data type or another object that contained the satellite data (ie: number of possible orbits, their id, and their locations in x,y,z coordinates. my gut urges me to lump all the satellite data into an object or data type ( i do not know which is more appropriate). Am i thinking poorly? my mind can't quite get there.

    Question #2
    So If I set up the above as objects and collections, I believe that I have no problem until I get to
    Planet object space coordinates. I do not know how to address the data type, The following is
    As far as I can get:
    Planet.spacecoordinates(?).value if I did this correctly, I would get the x value
    And if the ? changed the y and z values
    The exact same problem occurs for me when I am trying to extract orbit locations out of the array of possible orbit locations.

    Any help will be appreciated.

    bil
    Last edited by whburling; 04-30-2017 at 03:13 PM. Reason: increase clarity

+ 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. Beginner to User Defined Data Types (Custom Type, UDTs)
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 11-24-2013, 06:21 PM
  2. How to hide a selection of objects but show objects automatically when opening wkbk
    By slowjo1414 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-05-2013, 05:24 PM
  3. Extracting data from the same range, but user defined workbooks...
    By ColHOLM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2008, 10:56 AM
  4. [SOLVED] Setting up a Custom type, User-defined, Default Chart
    By Kurt in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-22-2005, 03:45 PM
  5. [SOLVED] Dictionary object: Error assigning user defined data type to item
    By Paul Urbanus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2005, 12:25 AM
  6. Passing Arrays in User Defined Objects
    By Developer of the Caribbean in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2005, 10:05 PM
  7. User Defined Objects in VBA?
    By McManCSU in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2005, 02:50 PM

Tags for this Thread

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