[MS CONNECT U14, vba] Unable to obtain vertices from a smartSolid (slab)

I am using vba inside of MicroStation CONNECT Edition and successfully created a simple rectangular slab. Now when I'm trying to get all the vertices, but IsVertexList is always False. Any help would be greatly appreciated.

   Dim mySSE As SmartSolidElement
  ' create a slab with center at 0,0,0
   Set mySSE = SmartSolid.CreateSlab(Nothing, 6, 12, 2)
   ActiveModelReference.AddElement mySSE2
   mySSE.Redraw

' this part below is where I try to get the vertices

  Dim vertices() As Point3d

   If mySSE.IsVertexList Then
         vertices = mySSE.GetVertices()
   End If

Parents
  • Hi,

    but IsVertexList is always False

    It means the object (SmartSolidElement) does not support (implement) this interface. It's the same result as in V8i.

    Any help would be greatly appreciated.

    GetVertices method works in MicroStation V8i fine (even when IsVertexList returns false), but it does nothing in CE U14. So I guess you should create Service Ticket and to report it as bug.

    , would you be so kind and to test it?

    mySSE.Redraw

    This line of code is useless for about 15 years (from V8 XM Edition). MicroStation takes care about element redraw when they are added, deleted or modified.

    and successfully created a simple rectangular slab

    I do not know what is your aim (what functionality you want to implement using VBA), but be aware VBA is very limited when working with 3D elements. It allows to access SmartSolid and SmartSurface elements (which are treated as obsolete in CE), but not to work with new parametric solids.

    With regards,

      Jan

    P.S. Please follow the forum best practices and use Insert > Insert code tool every time a code snippet (even one line only) is posted. To read code formatted as normal text is just annoying.

Reply
  • Hi,

    but IsVertexList is always False

    It means the object (SmartSolidElement) does not support (implement) this interface. It's the same result as in V8i.

    Any help would be greatly appreciated.

    GetVertices method works in MicroStation V8i fine (even when IsVertexList returns false), but it does nothing in CE U14. So I guess you should create Service Ticket and to report it as bug.

    , would you be so kind and to test it?

    mySSE.Redraw

    This line of code is useless for about 15 years (from V8 XM Edition). MicroStation takes care about element redraw when they are added, deleted or modified.

    and successfully created a simple rectangular slab

    I do not know what is your aim (what functionality you want to implement using VBA), but be aware VBA is very limited when working with 3D elements. It allows to access SmartSolid and SmartSurface elements (which are treated as obsolete in CE), but not to work with new parametric solids.

    With regards,

      Jan

    P.S. Please follow the forum best practices and use Insert > Insert code tool every time a code snippet (even one line only) is posted. To read code formatted as normal text is just annoying.

Children