Giter VIP home page Giter VIP logo

sample-dynamo's Introduction

Sample application dynamo integration Viktor

In this sample application a solution is presented how to integrate a dynamo model within the Viktor platform. The user provides the parameters for the dynamo model within the Viktor application. With these parameters, the dynamo model is computed by the Viktor worker. This is done with the command line interface included within DynamoSandbox. The geometry is created with the help of either Autodesk Revit or FormIt. The geometry JSON is then converted to mesh, which is rendered and visualized in Viktor.

An example of the application is shown in the image below.

Alt text

Setting up worker

A worker is necessary in order to run this application. Below is described how to configure the worker:

  1. Install the generic worker

  2. Install DynamoSandbox (http://dynamobim.org/download/)

  3. Install either Autodesk Revit or FormIt Note: Autodesk Formit can be installed without accepting any terms and conditions / end-user license agreements. After starting the program you are asked to sign in to your autodesk account, however, you can use the geometry DLLs with DynamoSandbox without doing this.

  4. Create a new file named config.yaml inside same folder as the worker executive.

The config file should contain the path to the DynamoSandbox executable.

Additionally, the file should contain the following arguments:

  • Dynamo script, -o (open)
  • Geometry file, -v (output)
  • Path to local installation of Autodesk FormIt or Revit, -gp (geometry path)
  • Json file, -g (geometry file)

The temporary dynamo script, geometry file and json file are created within the worker folder.

An example of the code for the file named config.yaml is shown below:

executables:
  dynamo:
    path: 'C:\Users\Administrator\Documents\$USERNAME$\DynamoSandbox\DynamoWPFCLI.exe'
    arguments:
    - '-o'
    - 'input.dyn'
    - '-v'
    - 'output.xml'
    - '-gp'
    - 'C:\Program Files\Autodesk\FormIt'  # or Revit
    - '-g'
    - 'geometry.json'
maxParallelProcesses: 1 # must be one, please do not change

For more information about the Dynamo CLI is referred to: https://github.com/DynamoDS/Dynamo/wiki/Dynamo-Command-Line-Interface

Setting up dynamo model

A few settings are required within the dynamo model in order for Viktor to recognize the input and output. Simply put the parameters you want to adjust in the Viktor application to "Is Input" by right-mouse clicking on the node. Same goes for the output parameters, then select "Is Output". The name of the node should be the same as the name called by the Dynamo module in your script.

sample-dynamo's People

Contributors

jjvandenberg1 avatar mslootwegviktor avatar nvanruyvenviktor avatar roelandweigand avatar sbutzelaar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.