Calculating the area of multiple elements containing interior shapes

Hello! I have a map that is divided in to many different size areas. Majority of these areas contain a smaller area inside them. The areas are divided to their own layers according to their type. I would like to calculate the area of all certain layer elements but I don't want to count in those smaller elements inside.

I know that it is possible to calculate the area of an element using flood and the locate interior shapes. But is there a way to do this for multiple elements at once? Without having to click every element separately?

Thanks in advance. 

  • What is the exact version no. (e.g. v10.x.y.z) of MicroStation that you are using? Use key-in VERSION to see the version no. in the MicroStation Message Center, or Help→About MicroStation in the backstage.

    See this blog that shows you how to obtain MicroStation's version number.

    I would like to calculate the area of all certain layer elements

    My answer depends on the version of MicroStation that you are using.

    MicroStation CONNECT

    Write a Report that harvests data from shapes.  Here's an example of an area report.

    MicroStation V8i

    Try this...

    1. Turn off all levels except the one you want to measure
    2. Select all elements
    3. Invoke the measure area tool
    I don't want to count in those smaller elements inside

    Are those on the same level or a different level?

     
    Regards, Jon Summers
    LA Solutions

  • it would depend if the areas were  or are  created with holes ie look like a donut or toroids  if they are  not do nuts then  you could do as  Jon suggested select all the  areas by the level record the answer then measure the inner by level and sub  track the two answers .. if they  were all donut type shapes and an all on one layer then measure the selected areas by  the level would give the total area of all the shapes elected ... personally I would do a data clean up first to make sure there are no duplicates...

    some people  make one shape for the fill and another shape for the out line .. silly really as a shape just has the outline fill turned on or off no need for two shapes... could you please  post a typical  sample in dgn  covering both some inner and  outer shapes so we can determine best  method for you also can you export a list of the level names to see if levels can accommodate filtering for  measure area by level names...

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me 

  • Intro: I write here as a total newcomer (sole developer, semi-retired, U.K.) trying to understand the MicroStation and general CAD world just by browsing around. I do not even have a MicroStation licence so my ideas at this point are theoretical. And I have dual boot Windows + Ubuntu.

    My interest is in UI automation across multiple tools (Windows and Ubuntu, including open source tools interworking with tools such as MicroStation).

    Your post: Now I understand that MicroStation has a feature to export .SVG instead of the usual other file formats such as .DGN.

    https://communities.bentley.com/products/microstation/w/microstation__wiki/33631/import-export-third-party-file-formats---connect-edition

    But exported .SVG can be parsed and saved from Inkscape as .DXF to be imported.
    Perhaps an alternative to exporting .DGN which can only be opened by other MicroStation users (in Windows). Here I am in Ubuntu.

    If that is the case with your map, I theorise that a python script can be written to calculate aggregate area of identified SVG outer elements in your exported map.svg and then calculate aggregate area of identified SVG inner elements (the "inner islands") and deduct. areas. Without touching the MicroStation UI.

    SVG allows scripting and batch processing of elements; an alternative to the manual workflow through the UI (e.g. the measure area tool).

    The SVG path element can be used.

    https://www.w3.org/TR/SVG/paths.html#PathElement

    Other contributors more experienced than I  have suggested posting a sample .DGN file. Likewise, to test this idea, can you post a sample exported .SVG file?

    Again, these are ideas coming from this outside observer. I hope it answers your question below:

    But is there a way to do this for multiple elements at once? Without having to click every element separately?
  • Your post

    Whose post?  Are you replying to this thread?  Several others have responded, but we don't know who you are citing.

    I understand that MicroStation has a feature to export .SVG
    • MicroStation can print multiple formats including SVG, PDF and many plotter, vector and image formats.
    • MicroStation can export many vector formats including STEP, DWG and DXF.

    What has SVG to do with this post's question about measuring area?

    It seems that you want to introduce complexity to solve a question about MicroStation.  MicroStation is able to make many kinds of measurement: linear, area and volumetric.  The OP wants to measure the area of several elements, which is well within MicroStation's capability.

    Exported .SVG can be parsed and saved from Inkscape as .DXF to be imported

    Another unnecessary tour of other technologies.  MicroStation can read and write DWG and DXF files without conversion.

    My interest is in UI automation

    Not sure what you mean by 'UI automation'.  You can automate MicroStation, but I'm not sure why you would want to automate its UI.

    MicroStation has several APIs for automation: VBA, C++ and .NET.

     
    Regards, Jon Summers
    LA Solutions


  • Oh dear, grasshopper here has touched a raw nerve.

    The post I am referring to is that of OP, of course, not the subsequent contributors.

    "What has SVG to do with this post's question about measuring area?"

    It is directly relevant to the question. Please read my last paragraph referring to OP's closing question. i.e. batch processing not UI clicking.

    "Not sure what you mean by 'UI automation'.  You can automate MicroStation, but I'm not sure why you would want to automate its UI".

    For a number of reasons (perceived by me, admittedly). I am not referring to VBA etc. (internal macros in which clearly you excel).

    to allow a remote coach "drive" the user's session, from if need be a Ubuntu platform.

    to offer an alternative to YouTube tutorials where the learner has to squint at screenshots and listen to narratives

    to interoperate (ODA style) with open source tools such as Blender, SVG, Wolfram, Inkscape, BRL-CAD, and other like ideas.

    to add text translation features.

    to link to the vast corpus of manuals as the session proceeds.

    Think in terms of connecting multiple "microservices" where Microstation is just one microservice.

    "The OP wants to measure the area of several elements, which is well within MicroStation's capability".

    No doubt, if user is patient enough to click on all the required elements.

    "Another unnecessary tour of other technologies.  MicroStation can read and write DWG and DXF files without conversion".

    I do understand, but muggins here has no Windows, nor MicroStation currently in use.

    I challenge you to answer the question without MicroStation at hand.

    You do have Python3 in Windows. That is all that is required, I submit.


    Yours respectfully, acknowledging your considerable experience. But you are buried in MicroStation thinking.

    0