Skip to main content

API Key Setup for IFC Chat

The IFCChat.ChatWithIFCModel node requires a Google AI Studio API key to enable AI-powered conversations with your IFC model.

Getting Your API Key

Step 1: Go to Google AI Studio

Visit https://aistudio.google.com/app/api-keys

Step 2: Sign In

Sign in with your Google account. If you do not have one, create a free Google account first.

Step 3: Create an API Key

  1. Click Create API Key
  2. Select a Google Cloud project or create a new one
  3. Click Create API Key in New Project
  4. Your API key will be displayed

Step 4: Copy Your Key

Copy the API key. It looks something like this: AIzaSyB1234567890abcdefghijklmnop

Important: Keep your API key private. Do not share it publicly or commit it to version control.

Using the API Key in Dynamo

Method 1: Direct Input

  1. Add IFCChat.ChatWithIFCModel to your canvas
  2. Connect a String node to the apiKey input
  3. Enter your API key in the String node
  4. Connect your IFCModel to the ifcModel input

Method 2: Environment Variable

For better security, store your API key as an environment variable:

  1. Press Windows + R, type sysdm.cpl and press Enter
  2. Go to Advanced tab
  3. Click Environment Variables
  4. Under User Variables, click New
  5. Variable name: GOOGLE_AI_API_KEY
  6. Variable value: Your API key
  7. Click OK and restart Dynamo

Then use a Python node or custom node to read the environment variable.

IFC Chat Features

Once connected, the IFC Chat opens an interactive window with:

  • 3D Model View: Visualize your IFC model
  • Tree View: Navigate the model hierarchy
  • Chat Interface: Ask questions in natural language

Available AI Tools

The AI assistant can use these tools to help you:

filter_elements

Find elements by type, property, or other criteria

get_element_details

Get detailed information about specific elements

analyze_relationships

Explore connections between elements

detect_clashes

Find geometric conflicts between elements

web_search

Search the web for IFC or BIM related information

get_user_selection

Get elements currently selected in the viewer

visualize_elements

Highlight or isolate elements in the 3D view

capture_view

Capture the current 3D view as an image

Example Questions

You can ask the AI assistant questions like:

  • "Show me all the walls on Level 1"
  • "What is the fire rating of the selected door?"
  • "Find all elements made of concrete"
  • "Are there any clashes between the structural and MEP elements?"
  • "What properties does this wall have?"
  • "Highlight all windows in the model"

Troubleshooting

Chat window does not open

  • Verify your API key is correct
  • Check your internet connection
  • Ensure the IFCModel is properly loaded

AI responses are slow

  • Complex queries require more computation
  • Check your internet connection speed

API key errors

  • Verify the key is copied correctly with no extra spaces
  • Check that your Google Cloud project has the Generative AI API enabled
  • Ensure you have not exceeded API usage limits