# 從 Dynamo 呼叫外掛程式和 API

## **將外掛程式與 Dynamo 連接**

FormIt 2022.1 和更高版本透過兩個新節點提供從 Dynamo 存取 JavaScript API 和自訂函式的途徑：

### **CallJSAPI** <a href="#calljsapi" id="calljsapi"></a>

**CallJSAPI** 節點可讓您直接從 Dynamo 呼叫 FormIt JavaScript API。

![](https://formit.autodesk.com/page/formit-dynamo/dynamo-formitCallJSAPI-GetTotalGrossArea.png)

如需函式名稱和參數，請查看我們的 JavaScript 文件，該文件分為兩部分：[FormIt API](https://formit3d.github.io/FormItExamplePlugins/docs/FormItJSAPI/group__mod__jsapi__formit.html) 和 [WSM API](https://formit3d.github.io/FormItExamplePlugins/docs/FormItJSAPI/group__mod__jsapi__wsm.html) (塑型核心)。

### **CallPluginJS** <a href="#callpluginjs" id="callpluginjs"></a>

相反地，**CallPluginJS** 節點可讓您從載入的外掛程式或從「腳本編輯器」視窗執行的腳本片段呼叫自訂函式。

![](https://formit.autodesk.com/page/formit-dynamo/dynamo-formitCallPluginJS.png)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://windows.help.formit.autodesk.com/zh-tw/plugins/how-to-develop-plugins/additional-development-options/invoking-plugins-and-api-from-dynamo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
