candcconsulting / GroupingandMapping

MIT License
4 stars 2 forks source link

Grouping & Mapping

This project was bootstrapped with Create React App. With the addition of hte Grouping & Mapping Widget and the OneClickLCA Widget from Bentley Systems

The code is designed to show how to use the Grouping & Mapping api's but is also very useful for showing which classes are included.

There are some additional buttons within this project. Select All : Select All elements that are emphasized to be selected for useful counting Hide All : will cycle through all groups and Hide All elements which are part of a grouping thus allowing users to view what part of the model is not reported on. Show All : Emphasize all elements that are part of a group, thus allowing a user to review what is already selected across all groups

MongoDB

The MongoDB Tag indicates that the epd and epdMapping have moved to MongoDB Instructions on how to configure this and a MongoDB template will be forthcoming and listed in the mongoDB readme Sample MongoDB Atlas template is here https://github.com/candcconsulting/AtlasCarbon

Environment Variables

Prior to running the app, you will need to add OIDC client configuration to the variables in the .env file:

# ---- Authorization Client Settings ----
IMJS_AUTH_CLIENT_CLIENT_ID=""
IMJS_AUTH_CLIENT_REDIRECT_URI=""
IMJS_AUTH_CLIENT_LOGOUT_URI=""
IMJS_AUTH_CLIENT_SCOPES =""

You should also add a valid iTwinId and iModelId for your user in the this file:

# ---- Test ids ----
IMJS_ITWIN_ID = ""
IMJS_IMODEL_ID = ""

This project locks down the ProjectId, but allows any iModel in the Project to be used. There is sample code in the project that shows how to enable project selection. This is not recommended for public hosting.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.\ Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.\ You will also see any lint errors in the console.

npm run build

Builds the app for production to the build folder.\ It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\ Your app is ready to be deployed!

See the section about deployment for more information.