[CE U17] Expression for Latitude/Longitude of the centroid of a Mesh?

Hi all,

Our BIM deliverables requires our Mesh elements to include a Latitude / Longitude value of its centroid to be included as metadata and we are trying to use the new Latitude / Longitude Item Type Expressions to do this ((Technology Preview) Populate an Item Type with Latitude/Longitude Properties (bentley.com)).

The issue is that the new Expression method is looking for a Point, but we are subtracting the Range High by Range low to get our approx Centroid coordinates - eg. this.GetElement().RangeHigh.X + this.GetElement().RangeLow.X)/2)) & "," & ((this.GetElement().RangeHigh.Y + this.GetElement().RangeLow.Y)/2)).

I know this isn't a precise method, but we don't need it to be the exact value (i would love to know if we could get the actual centroid of a Mesh, but thats not critical).

Any ideas? I'm thinking I may need to put together a Point type Item Type and read that perhaps?

Regards,

Mark


OpenRoads Designer 2022 R1 (10.11)  |  Microstation CE Update 17.1 |  ProjectWise CE 3.4

Parents
  • Hi Mark,

    I believe the method you have outlined would be suitable. Thanks for sharing this.

    This may not work for your desired workflow/result, but one idea I had would be to utilize the Measure Area and/or Measure Volume tools with the Mass Properties option enabled.


    From there, you could export the results from the Mass Properties dialog (File>Save) to a .txt file and use the data from there. 
    You could also create a point element at the centroid of the element and then create item types to use the points' XYZ coordinates, but you may have already mentioned that.


    HTH,
    Jayson

Reply
  • Hi Mark,

    I believe the method you have outlined would be suitable. Thanks for sharing this.

    This may not work for your desired workflow/result, but one idea I had would be to utilize the Measure Area and/or Measure Volume tools with the Mass Properties option enabled.


    From there, you could export the results from the Mass Properties dialog (File>Save) to a .txt file and use the data from there. 
    You could also create a point element at the centroid of the element and then create item types to use the points' XYZ coordinates, but you may have already mentioned that.


    HTH,
    Jayson

Children
No Data