VBA - missing object.Level.name in a "Grouped Hole"

Good evening,
I have a problem on recognizing an element when I scan the whole database looking for a particular level.
I found that all the elements have a object.Level.name except a surface element having an hole (Description is : "Grouped Hole"), in fact the object.Level.name is set to "nothing".
I would like to get and analyse the elements contained in order to retrieve the level.name. Is there any method?
Thanks in advance.
Manlio De Rossi

Parents
  • Hi Manlio,

    please be aware this is general Developer and Programming forum. Because your question is probably about MicroStation programming, I recommend to move your question to MicroStation Programming forum. To move existing discussion to another forum, use More > Move tool available under your original post.

    Also, please respect the best practices! You did not provide any information what product and version (build number) do you use. Even when VBA API is nearly the same in different products and versions, it's not completely the same. Plus, e.g. in some CE versions specific bugs are known.

    I have a problem on recognizing an element

    Please, share your code (code snippet). It's crucial point, where all programming discussions start.

    when I scan the whole database looking for a particular level.

    I guess you mean active model and you are scanning elements in specific level?

    except a surface element having an hole (Description is : "Grouped Hole"), in fact the object.Level.name is set to "nothing".

    I recommend to use "analyze element" key-in to see the element structure. Grouped Hole is a cell, so you probably received a cell header. It's not graphical element, so it has no level.

    I would like to get and analyse the elements contained in order to retrieve the level.name. Is there any method?

    To obtain elements inside cell, you can use GetSubElements method. But you did not share any example, how your element looks like. You mentioned "surface with hole", so it's not clear what the structure of the element is and whether GetSubElements method can be applied.

    With regards,

      Jan

Reply
  • Hi Manlio,

    please be aware this is general Developer and Programming forum. Because your question is probably about MicroStation programming, I recommend to move your question to MicroStation Programming forum. To move existing discussion to another forum, use More > Move tool available under your original post.

    Also, please respect the best practices! You did not provide any information what product and version (build number) do you use. Even when VBA API is nearly the same in different products and versions, it's not completely the same. Plus, e.g. in some CE versions specific bugs are known.

    I have a problem on recognizing an element

    Please, share your code (code snippet). It's crucial point, where all programming discussions start.

    when I scan the whole database looking for a particular level.

    I guess you mean active model and you are scanning elements in specific level?

    except a surface element having an hole (Description is : "Grouped Hole"), in fact the object.Level.name is set to "nothing".

    I recommend to use "analyze element" key-in to see the element structure. Grouped Hole is a cell, so you probably received a cell header. It's not graphical element, so it has no level.

    I would like to get and analyse the elements contained in order to retrieve the level.name. Is there any method?

    To obtain elements inside cell, you can use GetSubElements method. But you did not share any example, how your element looks like. You mentioned "surface with hole", so it's not clear what the structure of the element is and whether GetSubElements method can be applied.

    With regards,

      Jan

Children
No Data