The Custom folder in the Element Library can store all user-defined elements (compound, scripted and even primitive elements that have been modified by the user). This page introduces a simple example of how to generate a compound element and copy it to the Custom folder in the Element Library.
Any modified primitive elements, compound elements and script elements can be copied to the Element Library under the Custom folder. Users can also customize the properties and icons of the elements. For more information on how to add customized properties to the Custom Element, please see the page Custom Element with user defined properties. The following figures shows a compound element of a grating coupler. It contains an Optical S parameter element that loads a file which contains the s parameters of a grating coupler. The grating coupler's S-parameters file can be generated by using FDTD Solutions or experimental data.
The icon of the element can be simply set by right clicking on the element and selecting the "Set icon" option. The icon is a scale vector graphics (SVG) image file. The figure below illustrates this process.
Create Custom Elements
To add the new element into the library, one can simply right-click on the element and select "Copy to Element Library" or use the "addtolibrary" script command, then the element should appear in the currently selected sub-folder under the element library Custom folder.
Select the element -> right click -> "Copy to Element Library"
Once the customized elements are copied to the Custom folder, a file with the extension .ice will be generated in the folder for each of the customized elements. To change the default location of the Custom library folder, right click on the Custom folder and select "Redirect", then choose the appropriate path. Users can also create sub-folders in Custom library by right clicking on it and selecting "New folder".
Once a customized element is added to the Custom library, it can be used in two ways, as a copy or as a reference. The default setting for creating elements from Element Library is "Create a copy". User can change the setting in the System Option Editor (Files -> Options) as shown below. The copy of a customized element gets full access to the element's properties and internal data; while the reference of the element (indicated by the light blue shadow) is the "shell" of the customized element, only the "surface" properties can be edited and the element is non-expandable, which means that user can’t access the internal elements of the compound element.