Hello Everybody
This is my first post in this forum.
I'm going to create an Object Model for some building in VBA. So it begins with Building object at the top. Then it reduces to concepts like Grids, Stories and etc, then each of these reduce to other objects and all of these have their properties/methods.
Let me elaborate this with an example. I want to read the building model information from a text file, then create an object model of the building.
Let's say I have a 4 Story building that has 20 Beams in each story, and then each of these Beams have 8 Bars, these Bars have Areas, Length, Diameter and other properties.
I want to be able access them by using their indexes in their respective collections. For example, I want to access the Length property of the 2nd Bar in the 5th Beam in the 1st story of the whole building like this:
[VBA]Building.Stories(1).Beams(5).Bars(2).Length [/VBA]
Accessing the Material of the 2nd Beam in the 3rd Story would be like this:
[VBA]Building.Stories(3).Beams(2).Material [/VBA]
How can I code the object model part like above?
Best Regards
Vahid