# Generate String Lights

*在本章中，我們將以 FormIt 隨附的一些外掛程式作為例子，以對* ***Encode Campus Sample Model.axm**做一些改進。如果您還沒下載，可以從* [*FormIt 入門手冊第 2 部分資料集*](https://formit-help.s3.amazonaws.com/FormIt+Primer+Part+2+Datasets.zip)*下載檔案。*

*這個簡潔的外掛程式可讓您在模型中根據直線或曲線加入懸掛的燈。*

1 - 加入任何新燈光之前，我們先在模型中使用預先製作的場景來查看預期結果。

1. 若要跳至包含既有燈串的場景，請開啟 **「場景」選項板**，然後按兩下名為 **Eye Level – Short Alley** 的場景。
2. 請注意此模型隨附的燈串，這是我們要重新建立的，但在其他地方。
3. 在 **「圖層」選項板** 中，開啟 **Helper Geometry** 圖層，您可以看到用來產生這些燈串的原始線條。

![](/files/e20jYKYGlJNvb0k35EUS)

2 - 我們現在導覽到其他條路，並加入一些燈光。在 **「場景」選項板**中，開啟 **Eye Level – Long Alley** 場景。請注意，這條路還沒有任何燈串。

3 - 建立新的燈串：

1. 按一下燈串圖示，以開啟新安裝的 **「Generate String Lights」選項板**。新外掛程式的圖示預設會顯示在底部。
2. 將 **「Number of Fixtures」** 選項變更為 **10**。
3. 按兩下其中一條輔助線，以編輯預先建立的 **String Lights – Long Alley** 群組。然後按一下其中一條預先繪製的輔助線以選取它。
4. 按一下外掛程式選項板內的 **「Generate String Lights」** 按鈕，新的燈串應該就會出現！請注意，每個燈串都是以自己的唯一群組建立的。

![](/files/WPhsoq73BHFGUYutRjWZ)

***注意:*** *某些線條會穿過「Groove Coffee」標誌沒關係，因為燈串外掛程式會建立一條懸垂曲線在標誌下面真實地下垂。*

4 - 嘗試使用其他預先製作的輔助線和/或建立您自己的輔助線，來建立更多燈串。使用外掛程式的設定實驗看看，以獲得不同的結果。

5 - 為了協助讓模型保持井然有序，建議在完成時將所有輔助線分組，並將該群組放在 **Helper Geometry** 圖層上，以及將所有燈串群組指定到 **Context – Exterior Lighting** 圖層。這可以避免輔助線出現在我們不想看到它們的任何「Eye Level」場景中。完成後，結果應該會與下一張螢幕快照類似。

![](/files/PrkHdMxXQklbRck8Dh1Y)

***注意:*** *與從 Dynamo 指令碼建立的幾何圖形 (可透過* ***「性質」選項板**更新和重生) 不同，外掛程式建立的物件 (大部分) 只是一般的 FormIt 幾何圖形。建立後，只能使用 FormIt 內建的塑型工具進行編輯。*


---

# 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/example-1/generate-string-lights.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.
