To open any link in a new tab, preserving your position in the current article, just hold down the <CTRL> key on your keyboard before clicking the link or click using your mouse wheel.

Types (Non-Underscore "Custom" Types)

Types (Non-Underscore "Custom" Types)



This section describes the object structure of Types, how to access the advanced properties, and how those advanced properties may be changed.


  1. The next steps will cover the Types (without the underscore) Items. These Types are custom types that are added by customers or developers who needs to add additional functionality to the default class Items without having the need to go in and change the default properties. When working with Types, developers would not use the Under-the-Hood (U-T-H) tab, but would instead go to the Templates tab, then the Types tab. Types may not be visible from the Templates tab ribbon menu (Figure 1); if it is not, then first click on Settings on the Main Menu ribbon bar.


                    Figure 1


  2. After clicking on Settings (#1 arrow of Figure 2), click on Interface (#2 arrow), then click the checkbox for Show Types Tab in Templates Screen (#3 arrow).


         Figure 2


  3. Now click on Templates tab (Figure 3) and you will see the yellow Types tab, which is orange in color and has a cog to the left of it. Click on Types: yours will look similar to Figure 3, except that the window shown below has most of the + boxes clicked on to display the sub-Items. PlanSwift comes with several custom Items. These items are categorized according to the base digitizer class type. Open Scripted Tools, then Items, then double-click Joist Tool to see its properties.


                Figure 3


  4. The Joist Tool properties are shown in Figure 4. The Joist Tool template has been configured to completely handle a joist tool layout of various sizes. Click on Advanced to see the advanced Joist Tool Properties.


        Figure 4



  5. Every Item has a Property Structure, which remains the same for all Items, because all Items inherit from their parent-class Item. Based on the Type you have selected, various properties may be added. Each property for an Item has columns (see Figure 5) specifying the property's Name, Formula, Input Units, Adjust, Result, and Output Units.


                  Figure 5


    Name: The Name column identifies the name of the property. When coding, a developer will access this property either via the name or via an index.

    Formula: The next column, Formula, allows the developer to input a formula and/or a numerical value. Variables are placed in brackets; operators, such as +, -, /, and * (and others, such as sin, cos, tan, etc.) may be used to operate on any variables or numerical values. The operators that are available for use in formulas are the same ones that would be available in a calculator or in the scripting language being used.

    Input Units: The Input Units column allows the developer to select the input units. This can be inches (IN), feet (FT), yards (YD), miles (MI), millimeters (MM), centimeters (CM), meters (M), and kilometers (KM), each (EA), square inches (SQ IN), square feet (SQ FT), square yards (SQ YD), square miles (SQ MI), square millimeters (SQ MM), square centimeters (SQ CM), square meters (SQ M), square kilometers (SQ KM), cubic inches (CU IN) through cubic miles (CU MI), cubic millimeters (CU MM) through cubic kilometers (CU KM), and dollars represented with the dollar sign ($). The Input Units calculation operates on the value developed by the Formula column.

    Adjust: The Adjust column allows the developer to enter an adjustment, such as a waste percentage or a numerical value, to the number developed in the Formula column. Percentage numbers are followed by a % sign.

    Result: The Result column takes the adjusted value and displays it as the Result in the units that are specified in the Output Units column.

    Output Units: The Output Units specifies the units that the Results column displays in the same units listed in the Input Units column. Changing this to a different unit, such as inches, will convert the result to the selected unit. Of course, if you attempt to convert yards into cubic yards, you will get a conversion error since it is not an "apples to apples" conversion.

  6. To see this in action, enter 10 in as the value of the New Length in the Formula column (red arrow #1 in Figure 6. 

  7. Enter [New Length]/2 in as the value of Min Length in the Formula column (red arrow #2 in Figure 6).

  8. Click on the down arrow next to the parentheses pointed to by arrow #3 in Figure 6), and select RoundUp() (arrow #4).


                 Figure 6


  9. The equation Min Length/Formula equation will now be displayed as RoundUp([New Length]/2). The result will appear as 5.00 in the Result column. Click on the Min Length value in the Input Units column and select FT for feet (Figure 7). Note that the OutPut Units columns in the Min Length row changes to FT as well. If you want Output Units displayed in yards, click in the field where Min Length and Output Units meet, and select YD. For this exercise, however, keep the output set to FT. 


                   Figure 7


  10. Now enter 10% in the field intersecting the Min Length row and the Adjust column to add a waste factor of 10% (Figure 8). Note that the Result now reads 5.50 since the 10% waste factor has been added. If you want a non-percentage value added, simply enter the numerical value without the percent sign.


                   Figure 8


  11. Selecting the padlock allows you to either lock or unlock the property.

  12. Clicking on the light bulb either hides (blue) or unhides (yellow) the property.

  13. Selecting the box (a check in it) will cause the property to be shown on the Form when the application is started. Note that Name, Min Length, and New Length have check marks in the check boxes. Click on Form at the bottom of the Joist Tool window (Figure 9).


                  Figure 9



  14. Now note that the Name, Min Length, and New Length fields, along with their values, are displayed in this form, because the boxes for the same fields in the Advanced properties window are checked. 

  15. All of these properties are also available in the COM object.

Copyright 2023 ConstructConnect