2.5 - Plugins

FormIt comes with several plugins that expand its built-in capabilities. You can also install plugins developed by the AEC community, or even build your own.

In this chapter, we are going to sample a few of the plugins that come with FormIt to make some improvements to the Encode Campus Sample Model.axm. If you have not already, you can download the file from the FormIt Primer Part 2 Dataset..

Installing Plugins

1 - Once you have opened the Encode Campus Sample Model.axm, lets install our first plugin:

  1. Open the Plugins Manager Palette by clicking on the plug icon.

  2. Expand the Recommended dropdown.

  3. Scroll down and find the Generate String Lights plugin, and install it by clicking on the slider in just to the right of the plugin’s name.

  4. Once the plug is installed, its palette will automatically open.

  5. A new icon should also appear underneath all the other palette icons.

2 - Re-open the Plugins Manager Palette and repeat the process twice more to install the Manage Cameras and the Properties Plus plugins.

3 - To confirm that all three plugins installed successfully:

  1. Minimize the Recommended dropdown and expand the Installed dropdown. This is an easy way to see only the plugins that have been installed.

  2. Most, but not all plugins, also come with their own icon, which should have been added to your palette icon toolbar. You can return to the Plugin Manager Palette at any time and toggle the plugins sliders on or off, which will add or remove the plugins and their icons from your FormIt session.

  3. If you have too many installed plugins icons to fit on your screen, you can hide some unused ones by toggling their visibility in the Window dropdown from the main Menu Bar.

Using Plugins – Generate String Lights

This neat plugin lets you quickly add hanging lights to you model based on a line or curve.

1 - Before adding any new lights, let's check out the intended result using a premade scene in the model.

  1. To jump to the scene containing existing string lights, open the Scenes Palette and double click on the scene named Eye Level – Short Alley.

  2. Notice the string lights that came with this model – that is what we are going to recreate, but somewhere else.

  3. In the Layer Palette, turn on the Helper Geometry layer so you can see the original lines used to generate these string lights.

2 - Now let’s navigate to the other alley and add some lights. In the Scenes Palette open the Eye Level – Long Alley scene. Notice that this alley does not yet have any string lights.

3 - To create a new string of lights:

  1. Open the newly installed Generate String Lights Palette by clicking on the string light icon. By default, the icons for new plugins appear at the bottom.

  2. Change the Number of Fixtures option to 10.

  3. Double-click on one of the helper lines to edit the pre-created String Lights – Long Alley group. Then single-click on one of the pre-drawn helper lines to select it.

  4. Click the Generate String Lights button inside the plugin’s palette, and a new string of lights should appear! Note that each string of lights is created as its own unique group.

Note: It is OK that some of the lines are going through the “Groove Coffee” sign, because the string light plugin creates a catenary curve that will sag realistically below the sign.

4 - Try creating some more string lights by using the other pre-made helper line and/or creating some of your own helper lines. Play around with the plugin’s settings to get different results.

5 - To help keep the model organized, when finished we recommend grouping all the helper lines and placing that group on the Helper Geometry layer, as well as assigning all string light groups to the Context – Exterior Lighting layer. This will prevent the helper lines from showing up in any of the ‘Eye Level’ scenes where we do not want to see them. When finished, the results should look something like the next screenshot.

Note: Unlike geometry created from a Dynamo script, which can be updated and regenerated through the Properties Palette, objects created by a plugin are (for the most part) just regular FormIt geometry. Once created, they can only be edited using FormIt’s built in modeling tools.

Manage Cameras Plugin

Throughout the primer, we have been using scenes as valuable tools to navigate and control visibility throughout the model. This plugin allows us to see and edit the elevation of our current camera, export cameras for each scene as 3D objects, and copy these scenes between models.

1 - First, we will adjust the Eye Level – Long Alley scene so that its camera is actually at eye level:

  1. If not already there, go back to the Eye Level – Long Alley scene by double-clicking on it inside the Scenes Palette.

  2. Open the Manage Cameras Palette by clicking on the camera with a gear icon.

  3. Change the Height Above Ground to 5’-8”.

Note: If your model has levels, this plugin will also show the height above the nearest level below the Main Camera.

2 - Then:

  1. Go back to the Scenes Palette.

  2. Make sure the Eye Level – Long Alley scene is still selected (otherwise single-click to select it).

  3. Click on the Update Scene button to save the new camera height to this scene.

Note: You can also adjust the angle and position of a scene’s camera by toggling the Edit Scene Cameras button at the top of the Scenes Palette (between the update and play buttons).

3 - Next let’s export our scenes to a new model. First we have to create camera objects for all scenes using the Manage Cameras plugin:

  1. Open the Manage Cameras Palette again.

  2. Make sure the Copy Cameras to Clipboard option is checked.

  3. Click on the Export Scenes to Cameras button. This may take a few seconds.

  4. If your entire canvas went white, it is because your Main Camera was aligned with one of the scene cameras. Zoom (Z) out until you can see the 3 main buildings and the newly created camera objects. Note that the camera objects are automatically placed into one large group named Cameras. Inside that group, each individual camera is placed in its own group with the same name as the scenes it was created from.

4 – Let’s copy these scenes to a new model. Since the camera data was saved to the clipboard, there is not much we have to do:

  1. Save (Ctrl + S) your current model, and the close it.

  2. Start a new empty sketch by selecting New Sketch (Ctrl + N) from the File dropdown in the Main Menu bar.

  3. Open the Manage Cameras plugin, if its not already open, and make sure the Look for Cameras on Clipboard option is checked.

  4. Click on the Import Scenes from Cameras button near the bottom of the plugin, and the scenes from our other model will be imported. To check, open the Scenes Palette and/or turn on the Camera layer. You will see that all the scenes and 3D camera objects have been imported into this model.

Properties Plus Plugin

This plugin is a more featured version of the standard Properties Palette. If you select multiple groups and/or types of geometry, this plugin will provide you with a breakdown of what has been selected, as well as allow for the bulk renaming of groups and group instances.

1 - First we will look at the properties of a door group from our main model. Re-open Encode Campus Sample Model.axm and go back to the Eye Level – Long Alley scene. To start utilizing the Properties Plus plugin:

  1. Open the Properties Plus Palette by clicking on the property with a ‘plus’ symbol icon.

  2. Make sure that Update on Selection Change is checked.

  3. Select one of the double glass door groups, named Door, on the right side of the alley.

  4. Under the Selection Count area, Total Objects tells us that we have one (1) object selected.

  5. Just below that we can find more information on what types of objects have been selected. In this case, there is one (1) group selected, but that group has four (4) instances somewhere in the model.

Note: Checking the number of instances of the selected group can be very handy to prevent accidentally changing multiple elements when you actually only wanted to change the selected element, but forgot to make it unique first.

2 - This plugin allows us to edit a group or group instance’s name without having to go into group edit mode, and rename multiple instances at once. As we learned previously, every group has a name, but every instance of that group can also have a unique ‘instance’ name. Since there will most likely be many types of doors in this model, we want to give this group, and some of its instances, more specific names.

  1. With the first glass Door group still selected, add another Door group to your current selection by holding Shift or Ctrl and single-clicking on the other double glass Door group near the first.

  2. Notice that now, the Properties Plus Palette has updated its Selection Count to show that there are two (2) instances selected, but still only one (1) unique Family (AKA group) selected. (Even though this plugin is using the term Family, which should be familiar to Revit users, in this context it means the same thing as a FormIt group.)

  3. Under the Group Family area, update the Name field to be Doors – Double Glass Storefront. This will update the name group’s name for all instances, no matter where they are or whether they are currently selected or not, without having to double-click and edit the group.

  4. Since these two instances are both doors into the Groove Coffee area, lets rename just these two instances by entering Groove Coffee Door into the Name field under the Multiple Group Instances area.

Note: In the standard Properties Palette, there is no way to rename multiple instances of a group at once. This can be extremely handy when you want to rename tens or hundreds of instances with the same name at once.

Note: If you mouse leaves the palette, you will no longer be able to edit the selected textbox. This is true for all palettes, so make sure to keep your cursor within the palette boundary while editing anything inside of a palette.

3 - Now if you select a Groove Coffee glass door or a different glass door and look at their properties in the regular Properties Palette, you will see that the name of the Group has been updated for every instance, but only the Groove Coffee doors have their instance Name property updated from its default value.

4 - Finally, let’s look at how this plugin sorts different types of elements:

  1. Quickly draw a Line (L), Rectangle (R), and Cube (Alt + B) anywhere you would like in the model. These will be temporary, so their precise location is not important.

  2. Re-open the Properties Plus Palette if it was closed, and then press Crtl + A to select all visible elements in the model.

  3. Look in the Selection Count area, and notice that the selected elements are separated into Edges (lines), Faces, Bodies, (3D shapes made of faces and edges, like the cube), Groups, and more.

Note: This plugin also detects Vertices, which can be created using another plugin called Generate Vertex. If you would like to experiment, install the Generate Vertex Plugin and repeat the steps above.

Plugin Playground

For the tinkerers and developers out there, FormIt also ships with a plugin that allows you to create and test your own custom plugins right inside of FormIt. Knowledge of HTML, CSS, and JavaScript is required to take full advantage of this tool so we will not go into detail here, but if you are interested in learning more you can visit Building FormIt JavaScript Plugins.

1 - You can install the Plugin Playground the same way we installed the previous plugins from the Plugin Palette.

2 - Here is a basic overview of the Plugin Playground:

  1. Open the Plugin Playground Palette by clicking on the < pencil > icon.

  2. Inside the palette, click on the Edit button to open the built-in code editor for making custom plugins. This plugin comes pre-loaded with code for a plugin that creates a cube.

  3. Click on the Play button the test run the current code. In this case, the cube creator plugin content will appear in the palette.