Grid Precision Settings
- Last UpdatedNov 14, 2022
- 1 minute read
Use to update the grid precision settings for example No. of decimals and Remove Trailing Zeroes for all the decimal columns of the grids using PML functions.
Allows the user to update decimal column's precision settings for specific or all grids in the project.
Initialize the PMLTAGS object as follows:
import 'Aveva.Engineering.Tags.Pml'
handle any
endhandle
using namespace 'Aveva.Engineering.Tags'
!tagsObject = object PMLTAGS()
Update "Number Of Decimal Points" precision setting for a specific gird using any of the method:
!tagsObject.UpdateGridColumnNumberOfDecimalsSetting('=4356/67',2)
!tagsObject.UpdateGridColumnNumberOfDecimalsSetting(ref,2)
Note:
Here 'ref' is DBREF object of a selected grid in the grid explorer.
Update "Remove Trailing Zeroes" precision setting for a specific gird using any of the method:
!tagsObject.UpdateGridColumnRemoveTrailingZeroSetting('=4356/67',true)
!tagsObject.UpdateGridColumnRemoveTrailingZeroSetting(ref,true)
Update both the precision settings for a specific gird using any of the method:
!tagsObject.UpdateGridColumnPrecisionSettings('=4356/67',2, true)
!tagsObject.UpdateGridColumnPrecisionSettings(ref,2, true)
Update "Number Of Decimal Points" settings for all grids in the project using the method:
!tagsObject.UpdateGridColumnNumberOfDecimalsSetting(2)
Update "Remove Trailing Zeroes" settings for all grids in the project using the method:
!tagsObject.UpdateGridColumnRemoveTrailingZeroSetting(true)
Update both the precision settings for all grids in the project using the method:
!tagsObject.UpdateGridColumnPrecisionSettings(2, true)
These methods can be used in the appropriate project where in the Grids (ListDefinitions) are created and configured.