It is necessary to record the creation time, modification time or save time of files in 2D drafting. But in different countries or areas，Users need different date format, either full or abbreviated, long or short. ZW3D 2017 offers the ability to customize the date format in 2D drafting. Now let’s learn how to customize the date format in BOM table and title block.
1. Date & Time used in BOM Table
The default Date & Time form is inherited from the OS, which is shown in figure 1 and 2.
Figure 1. Default Date & Time Format
Figure 2. System Date and Time
Users can follow the steps below to customize the Date & Time format.
Step 1. Hover your cursor over the BOM table, and then double click the title of the date column to define the column type.
Step 2. Change the
Figure 3. Change the Column Type
Step 3. Define the equation. The attribute name and attribute value must be inputted. You can click the Equation icon in the lower right corner to choose the needed variable, as shown in figure 4.
Figure 4. Redefine Column Property
Step 4. This is a key step to customize the Date & Time from the default format to the short date format without time.
We add the suffix %D(s) in the expression to customize the date format, such as
Figure 5. Format Customization of Attribute Value
Then you will get the updated BOM table with customized short date format, as shown in figure 6.
Figure 6.Updated Format
2. Date & Time used in Title Block
In above case we learn how to read out the Date & Time and make customization in the BOM table. Apart from the BOM table, Date & Time can be also added into the title template.
Step 1. Open the Title Template file, which locates in the source folder of ZW3D root directory, as shown in figure 7.
Figure 7. Title Template File
Step 2. Edit the title block template file and add the date item following the steps in figure 8 and figure 9.
Figure 8. Edit the Title Block
Figure 9. Add Date Item to the Title Block
Step 3. Save and recover the previous template file. In this way the date will be calculated automatically and shown in the title block when creating a new 2D drafting with the title block template, as shown in figure 10.
Figure 10. Date shown in the Title Block of New Drawing
According to application cases above, we can know that part_startdate is the variable name. The mark % is the separator between the variable and the format settings. D() is the format to read out the date while T() is for the time. L, S, yy/MM/dd and HH/mm/ss are the parameters you can input into the brackets to control the arranged data.
Here are more expression samples.
Figure 11. Expressions for Format Customization
The customization of Date & Time format is a common function during creating 2D drafting, according to real application cases. This article shows the detailed method in ZW3D 2017, we hope you can enjoy it.
To download this article, please click here.