Measuring polygon area in DWGs and RVTs stops after 3 points selected

I’ve been trying to get measuring working on DWGs and RVTs, but I’m facing some problems with measuring of area (using the MeasurePolygonArea operator).

In IFC it works, but on DWG and RVT I’m only able to select three points.
I can double-click and select three new points for my polygon, but I’m not able to select more.

Can anyone help og point me in the right direction to fix this?

This seems to work fine for me in the standard webviewer. I tested it with the hotelfloorplan.dwg sample model as well as one of the standard revit samples (rac_basic_sample_project) by simply opening the console and setting the operator:

hwv.operatorManager.set(Communicator.OperatorId.MeasurePolygonArea,1)

Could this be an issue with one of your own custom operators in the stack interfering somehow?

1 Like

A quick follow-up: There is one more thing with regard to this operator. It requires all selected points to be on the same plane so after you clicked on the third point (which establishes the plane) you need to make sure that all future points selected are also on that plane. The issue with 2D DWG files is that while all geometry is visually on the same plane, they are actually on different z-levels. I think that is a bug/oversight in the implementation of the operator. I think it should automatically handle “2D” drawings.

From my perspective it would also be better if the operator somehow indicated the chosen plane and/or automatically projected all selected points after the third on the chosen plane instead of simply ignoring the selection with no feedback.

I think it would be best if you reported this issue via JSD, referencing my comments.

Thanks,
Guido

1 Like

Hi @guido, and thank you for your quick reply.

The z-level thing might be the explanation.
I can rotate the 2D DWG and see that it has different z-levels. Then I can be certain that the 4th point is in the plane the three first point created.

I understand that is an issue in Model space in DWG, but it also occurs when activating a sheet in the webviewer (using the Sheet manager).

Is there some way to manipulate the measure points during measurement?
Can I find the measure point and to set the same z-level as previous points’ z-level?

I think your best path would be to “improve” the operator yourself which is available in source code form in the “web_viewer\typescript\operators\Measure” folder of the package. It should be fairly easy to for example ignore the z coordinate if you are measuring a drawing.