@buerli.io/classcad
TypeScript icon, indicating that this package has built-in type declarations

0.12.0 • Public • Published

@buerli.io/classcad

Usage information and reference details can be found in the buerli documentation

@buerli.io/classcad is completely implemented in Typescript and accordingly offers documented types for all interfaces.

Install

npm install @buerli.io/classcad
yarn add @buerli.io/classcad

Usage example

import { ccAPI } from '@buerli.io/classcad'

const loadFile = async (fileName: string, data: ArrayBuffer): Promise<DrawingID | null> => {
  const type = extname(fileName).replace('.', '')
  const drawingId = await ccAPI.base.createCCDrawing()
  if (drId) {
    await ccAPI.baseModeler.load(drawingId, data, type, fileName)
  }
  return drawingId
}

The example shows how to create a new drawing. The API call ccAPI.base.createCCDrawing creates both the websocket and a drawing in buerli-core and connects the two. The data of the drawing can then be retrieved using the drawing ID returned. In addition, the content of a file (ofb, step, ...) is loaded directly after the drawing is created ccAPI.baseModeler.load.

/@buerli.io/classcad/

    Package Sidebar

    Install

    npm i @buerli.io/classcad

    Weekly Downloads

    27

    Version

    0.12.0

    License

    ISC

    Unpacked Size

    709 kB

    Total Files

    93

    Last publish

    Collaborators

    • dm385
    • drcmda
    • awv-build