Cone properties

I have a 3D microstation file in V8i with basic components like cone, torus etc. In the properties we can view the Radius1, center1 and other such. Is there any mVBA that runs and can extract these properties. I can send a sample file if needed. Could some help.

Thanks,

Ramesh.P.K.

  • Hi Ramesh,

    please be aware this is general Developers and Programming forum, not the forum about MicroStation programming. I recommend to move the post to MicroStation Programming forum. Do not ask again, but move the post. To do it, use More > Move tool available under your original post.

    I have a 3D microstation file in V8i

    It's not enough details information! Please read and follow the forum best practices. When discussing any development topic, to specify used version exactly is crucial and mandatory. APIs have evolved and there were released many versions of V8i (as well as current CONNECT Edition) when some features were added or bugs fixed in later versions.

    with basic components like cone, torus etc.

    Please provide exact list. There are many 3D elements available in MicroStation and some are well supported from very beginning in MicroStation VBA, the support of some others was added in later V8i releases, but some are not supported in VBA (and e.g. native C/C++ API has to be used).

    Is there any mVBA that runs and can extract these properties.

    Are you asking for help with own code (which is perfectly fine) or you want to ask somebody to write a code for you?

    Without sharing code, which is usually the first step, it's more complicated to discuss your question. Also, without knowing exactly what type of elements you want to scan, what properties you want to extract ("these properties" is not exact specification suitable for writing a code) and also to what format the data should be exported, an advice can be hardly provided.

    Could some help.

    The basic 3D solids types you mentioned (cone, torus) are supported in MicroStation VBA and proper classes are available (ConeElement object, SmartSolidElement object). So to access their parameters would be quite simple.

    When an element is not supported directly, PropertyHandlers can be used to access the proerties. But you should be aware not all properties are supported, so it has to be tested with specific elements and their properties.

    With regards,

      Jan

  • Hi Again,
     
    Here is the version and platform. V8i, V8.11.9.916 select series 10 on Windows10. I just needed some info on getting info of Cell elements and info under the cell(do we call that sub elements?). Of course, I would not ask somebody to code for me unless, we need a professional help on a particular solution. Then it could be a commercial thing.
     
    Just to let you know, I was successful at extracting Cone elements, though I am new to mVBA. It is really quite easy. I have worked on VBA on other applications including AutoCAD.
     
    Thanks once again. Wish you Merry Christmas , Sir.
     
    Ramesh.P.K.
     
  • I just needed some info on getting info of Cell elements and info under the cell(do we call that sub elements?).

    Sorry, but I do not understand. Your original question was about 3D solids like cone or torus. Why cell is mentioned now? Code to access 3D solids and to iterate cell content will be different.

    Regards,

      Jan

  • Yes, the original question was to get the solids properties, which I managed to get by using the property handler. But in the same file some elements are cell object and within the cell are solid object, which I am unable to get hold off. So, I needed to get the cell content properties of each objects.
     
    Regards,
    Ramesh.P.K.
     
  • Hi Ramesh,

    which I managed to get by using the property handler.

    which means (but it's my personal opinion) that your code is wrong and dirty. Property handlers are "last chance tool" with a lot of limitations and they are also awfully slow.

    When there is element class available (they exist for elements like cone and torus), always use the class to access element properties, not the handlers.

    But in the same file some elements are cell object and within the cell are solid object

    Follow rules and best practices! It's another issue, so post a new question (and not here, but in MicroStation Programming forum).

    But before it, study MicroStation VBA help, examples in the help and also mvba files delivered with MicroStation, plus search MicroStation Programming forum how to iterate cell content.

    With regards,

      Jan