Custom Properties Database and Reports
(Available in Platinum and Professional)
Default UI Menu: Tools/Database
Ribbon UI Menu:
All properties of objects are elements of a database. Standard database property items include line width, color, coordinates of points that comprise the object, etc. The database management feature enables you to add information to objects and to create reports using this information. For example, you can add custom fields to provide information on suppliers, manufacturers, price, etc. The information can then be presented as a Bill of Materials, Parts List, or other type of report. Database management and report creation generally follows these four steps:
- Step 1: Define Custom Fields
- Step 2: Attach Custom Properties to Objects
- Step 3: Define Fields for the Report
- Step 4: Create the Report
The following example shows how to create some custom properties, then create a report from the custom and standard properties. The objects in the report are shown below: a large plastic disc, two cubes on top, and six steel cylinders below.
Step 1- Define Custom Fields
Default UI Menu: Tools/Database/Define Fields
Ribbon UI Menu:
The first step in creating a database is to define the types of information to be recorded.
- Select Define Fields. In the DefineFields window, enter the first property: "Part Number."
- Fill in the remaining fields in this row
Data Type: Text: Alphanumeric information which does not have to be calculated. Integer: Whole numbers. Double: Decimal numbers. Currency: Dollar amounts. This type will not appear in an object's Custom page of the Properties window. Visible: If checked, the field will be visible and available for use in the Edit Object Data and Report windows.
Tip: If you know you will not be using certain fields in reports, it is helpful to turn off visibility.
Editable: If checked, the field can be edited in the other database dialogs. Auto fields are always non-editable. Description: An optional field for notes or other comments.
- To add the next property to the database, click in the first empty field under Field Name, and type the new field name. This example uses "Description," Vendor," and "Cost." Then continue to fill in the other fields.
Note: To delete a record, click the square at the beginning of a row, and select Delete.
- Click OK when the custom properties are defined.
Step 2- Attach Custom Properties to Objects
- Select the object whose custom properties you want to define. If multiple objects have the same custom properties, such as the cubes below, select them all.
- Open the Properties to the Custom page. Click Attach at the bottom of the window.
- Select all of the custom properties and click OK.
- Now the properties appear on the Custom page. Fill in the Value for each part.
You can also enter or change custom properties in the Selection Info palette.
- The previous values were for the two cubes (Part Number 1); the values below are for the large disc (Part Number 2).
- These values are for the six support cylinders (Part Number 3).
- To verify that the custom properties were properly attached, select one of the objects.
- Then select Tools / Database / Edit Object Data. You can update values in this table, if needed.
Step 3- Define Fields for the Report
Default UI Menu: Tools/Database/Report
Ribbon UI Menu:
- To begin defining the report, select Tools / Database / Report. Then click Create.
- Enter a report Title and Comments (optional). If you choose Detail, only values from editable fields may be edited before the report is created. With Summary, all values may be edited before printing, even if they come from a non-editable field.
Note: "Object ID" is a unique identifier, and is generated automatically when attaching fields to objects.
- The custom fields appear under the "Custom" category. Click the "plus" sign to expand this category.
- For each field you want to appear in the report, click it under Available Fields, then click the Add button. The field should then appear under Report Fields. Repeat these steps for each of the custom fields.
Note: If you have block in your drawing with attributes you can add those attributes to your report.
- Non-custom (standard) fields can also be added to a report. In this example Material is added, and Material is found in the "Common" category.
You do not have to create a report using custom fields; reports may contain only standard fields.
- The order of the Report Fields list is the order that will in the report. To change the order, highlight the field you want to move and click Up or Down. (You will also be able to change the order later.)
- You can use a query if you want to filter the objects to be included in the report. If you want to run a query, click Edit. Otherwise, all objects in the model will be scanned while creating the report.
An example of a query in this example would be to search for objects that have "Part Number" fields greater than one. This is how the syntax would look:
-
If you created a query, click OK to return to the Report Create window.
-
Open the Advanced Report table.
The appearance of this tab depends on whether you are creating a Detail or Summary report. For a Detail report, Field Names can be edited. For a Summary report, Report Header Names may be edited.
- For the "Copy" row, click the cell in the Function column. From the drop-down menu, select SUM. This will show the total cost of all objects, not the unit price per object.
The other function options are AVG which calculates the average of all values, and MIN / MAX which displays the smallest or largest of the values.
- When all fields and queries are defined, click OK to return to the Reports window.
Step 4- Create the Report
Default UI Menu: Tools/Database/Report
Ribbon UI Menu:
- The Reports window now shows the report you have just created. (You can return to the Reports window anytime by selecting Tools / Database / Report.) Click Report.
-
The Summary Report window shows the fields and values that will go in the report. If you want to re-order a column, drag its header to the new location. You can also click on a header to change that column's sorting order. To add a row for cost sums, click in a cell below the last "Cost" items.
-
Then click Grand Total.
The sum of the cost items is now listed.
The other available options at the top of the Summary Report window are: Export: Saves the report as a Microsoft Excel Spreadsheet (XLS), Microsoft Access Database (MDB), a Comma Separated Value (CSV), or a Tabbed Text File (TXT). Page Setup: Sets the format of a printed version of the report. You can add the page number, number of total pages, date, and/or time to the header or footer of each report page. You can also set the margins, alignment, page order, and scale of the report pages, and whether grid lines, row headings, and column headings will be printed. Print: Prints the report using the Print Setup options.
- To place the report in the file, click Insert Table into the Drawing.
- In the Insert Table window, set the sizing options for rows and columns. You can also set the table style here.
- Click to place the report as a table in the drawing.
The table contains the custom fields, as well as the Materials field.
Note: *If you want to edit or add text to a table. For other changes such as adding or removing rows / columns, or merging cells.
- If you want to change the style of the report table, make sure the style is defined under Table Styles in the Style Manager.
- The style is assigned to the table in the General page of its Properties.
If you change the style, the table will update automatically.
Updating the Database and Report
Default UI Menu: Tools/Database/Update Associated
Ribbon UI Menu:
The table generated by report has the ability to update contents.
Create Table
Insert table in the drawing
Update Association:
To update the table with new entities. Select table and update the table using “Update associated”.