petrbroz / forge-iot-extensions-demo

Autodesk Forge sample application visualizing IoT sensor data.
https://forge-iot-extensions-demo.autodesk.io
10 stars 3 forks source link

How to find these data from my Revit Model ? (FORGE_MODEL_URN) , (FORGE_MODEL_VIEW), (DEVICE_MODEL_ID ) #3

Open Mojgan-arch opened 1 year ago

Mojgan-arch commented 1 year ago

How to find these data from my Revit Model ? (FORGE_MODEL_URN) , (FORGE_MODEL_VIEW), (DEVICE_MODEL_ID )

I need these data to use in coding. How can I get this information from my model?

  1. (FORGE_MODEL_URN) ?
  2. (FORGE_MODEL_VIEW) ?
  3. (DEVICE_MODEL_ID) ?

jjj

yiskang commented 1 year ago

Hi @Mojgan-arch

Please follow the Translate a Revit File, Generating Room and Space Information tutorial of the Model Derivative API first to translate your Revit model. When requesting the translation job, please use this job configuration instead. The FORGE_MODEL_URN is BASE64_ENCODED_URN_OF_SOURCE_FILE in task 3.

The FORGE_MODEL_VIEW is the viewableID of the Revit phase view.

Sorry, I don't see any variable called DEVICE_MODEL_ID in this repo.

Mojgan-arch commented 1 year ago

Thank you so much for your reply. About (Device_Model_ID), In [forge-dataviz-iot-reference-app]

https://github.com/Autodesk-Forge/forge-dataviz-iot-reference-app/blob/main/server/gateways/synthetic-data/devices.json

image

Please guide me also, if you know about (Device_Model_ID).

petrbroz commented 1 year ago

This looks like a randomly generated UUID. You can generate these using different 3rd party tools, for example, https://www.uuidgenerator.net.

yiskang commented 1 year ago

Yeah, as Petr pointed out, it's the randomly generated UUID, and it's mainly from the deviceId defined in the device-models.json. And, see also https://github.com/petrbroz/forge-iot-extensions-demo/blob/master/public/sensormanager.js#L234 in this repo. We remove both JSON files from this repo and use a file-based JSON DB instead for that.

https://github.com/Autodesk-Forge/forge-dataviz-iot-reference-app/blob/main/server/gateways/synthetic-data/device-models.json

enter image description here

Mojgan-arch commented 1 year ago

I got it, Thank you so much from petr broz and Yiskang.