Can I inject the requestheader in communicator Webviewer property information?

Hi
Can I inject the requestheader in communicator Webviewer property information?

hwv = new Communicator.WebViewer ({
containerId : viewerId,
endpointUri : modelpath,
requestHeader(?) : ~ ← like this

})

I wonder if there is any attribute information that can inject the requestheader.

And I have one more question
I want to convert the ifc file stored in object storage
through convert.bat in docker and store it in object storage again.

Is it possible to run covenert.bat on docker?
If it is possible to run it,
I wonder if I have to place the convert.js file as well.

If you have any examples or information about it, please.

Regards
Thank you.

Hi,

The WebViewer class doesn’t have a property to set request headers - the available properties can be found here.

It is possible to run converter on Docker: Docker Support — HOOPS Communicator Documentation
Note, you will need an X server set up for running converter in a headless environment: Converter Application — HOOPS Communicator Documentation.

Here’s a more recent example of a Docker image: AMI and Docker Image released for HOOPS Communicator to make backend-deployment easier

Let me know if this doesn’t answer your question or if you have any additional questions!

Hi
@beau.trifiro
Thank you for your answer.

The bitbucket link related to the docker you told me is
It was posted in 2020
I am currently using 2023 HOOPS_Communicator_2023.

The converter that I have and the converter of bitbucket
Is there a version problem?

Finally, can I save the converted file to that converter in object storage?

thank you

Hello @jhbae,

I just wanted to chime in on this thread regarding running a Docker container. Please find below steps to get Converter up and running:

  1. Download a fresh Linux copy of Communicator from the Developer Zone, if you don’t have one already.

  2. Download the following zip file and unzip its contents to the root directory of the extracted package from step #1:
    docker_files.zip (563 Bytes)

So at this point, if you called ls -l on the root directory, you would get this:
docker_ls

  1. Run the following command to ensure that converter-entrypoint.sh has the proper permissions BEFORE building the image:
    chmod +x converter-entrypoint.sh

  2. Build the Docker image with this command:
    sudo docker build -t communicator-converter:latest .

  3. Run a Docker container with the following command (NOTE: modifications are needed to fit your environment – marked in bold font):
    sudo docker run --mount type=bind,source=/home/ubuntu/HOOPS_Communicator_2023_SPXx /authoring/converter/example/_data/Moto,target=/opt/ts3d/cadfiles --mount type=bind,source=/home/ubuntu/HOOPS_Communicator_2023_SPXx ,target=/opt/ts3d/output communicator-converter --input /opt/ts3d/cadfiles/_MOTO_X.asm --output_scs /opt/ts3d/output/moto.scs --output_png /opt/ts3d/output/moto.png –license ‘your_license_key’

Please change the root directory to fit your environment. Also, you will need to get your own license key and place it between the single quotes.

Now if all goes according to plan, you should now see moto.png and moto.scs in the root directory:
docker_moto

You can, of course, further modify the command in step #5 to include other Converter command-line options.

With respect to using object storage, the answer is yes, you can retrieve and store from object storage such as Amazon S3. A brief high-level description of the workflow is provided in our docs covering Docker support.

Hope this helps,
Tino

2 Likes

Appreciate your confirmation.

I’ll try it by referring to the answers you provided.

Thank you again for your detailed answer.

1 Like