How to activate floorplanManager and florplan view in webviewer

I am using VUE framework and the Typescript “hoops_web_viewer.d.ts” and want to enable the BIM mode and floorplan view.

I have tried following code:

this._viewer.operatorManager.push(Communicator.OperatorId.Floorplan);
this._viewer.floorplanManager.setOverlayAnchor(Communicator.OverlayAnchor.UpperRightCorner);
this._viewer.floorplanManager.setAutoActivate(Communicator.FloorplanAutoActivation.Bim);
this._viewer.floorplanManager.setZoomLevel(1);
this._viewer.floorplanManager.setTrackCameraEnabled(true);
this._viewer.floorplanManager.setOverlaySize(new Communicator.Point2(0.2, 0.2));
await this._viewer.floorplanManager.activate();

When I test if the floorplanManager is started, it returns false:
console.log(this._viewer.floorplanManager.isActive());

Can someone give a hint about how to show the floorplan.

Hi,

the floorplan feature currently only works with converted IFC models. Is that what you are viewing?

Edit:
Also make sure to specify the units in your call to setOverlaySize:
this._viewer.floorplanManager.setOverlaySize(new Communicator.Point2(0.2,0.2), Communicator.OverlayUnit.ProportionOfCanvas, Communicator.OverlayUnit.ProportionOfCanvas);

1 Like

I beilieve so. I have converted several IFC files like this:
/techsoft/converter --output_scs /techsoft/model/sand.scs --input sand.ifc --license_file lisence --ifc_import_openings false --jt_level_of_detail 0 --import_hidden_objects false --tessellation_quality 0

Edit: The sizing of Overlaysize did not change anything.

You also have to make sure that the model is loaded before you activate the floorplan (meaning the modelStructureReady callback has triggered)

If that does not work are you able to provide your sample model for testing?

I am triggering it from the modelStructureReady() callback. I can provide a model if that will help. Do you have a example model it will work on?

Here is a live demo for testing but you can use the arboleda model from the package (its in the authoring/converter/example/_data directory)

https://3dsandbox.techsoft3d.com/?snippet=1wg2Elip0jXUTIJQ62WJ2O

(If you have the model as an scs you can upload it to the live demo by simply dragging the scs on the viewer window and replacing the loadSubtree call)

1 Like

I did try using the sandbox with my model. It did not show the floorplan. It might be that something is happeing when I convert my models. Can you look into the parameters I use?

Are there somewhere I can upload my SCS to you?

Edit: It did work with the arboleda.scs file in my project, so it is something about the convert tool or parameters.

Can you try converting your IFC model with the provided convert_file batch file from the package in the quick_start folder.( You will find the converted scs file in the quick_start/converted_models/user/scs_models directory). Its possible that you need to set --sc_export_attributes 1 in your command line.

1 Like

That was it: --sc_export_attributes 1

Thanks a lot for your help. :grinning:

1 Like

Great. We should probably make that the default going forward

1 Like