StandardProfile.ID
This property returns the ID of this Standard Profile.
SVB Example
Data Entry Example 5: Adding a Quality Control analysis configuration:
Sub Main Dim oOM As ObjectManager 'Reconnect into Enterprise ObjectManager Set oOM = New ObjectManager oOM.Reconnect Application 'Get the bread measurement data entry setup Dim breadDESetup As StandardProfile Set breadDESetup = oOM.Profiles.Item("/Blake's Materials/Bread Measurements") 'Create an IQC analysis configuration, connected to our data entry setup Dim IQCAnalysisConfigCreateInfo As New MonitorCreateInfo IQCAnalysisConfigCreateInfo.AuditLogReason = "Adding an IQC Analysis" IQCAnalysisConfigCreateInfo.Name = "Bread Charts" 'We will add this new analysis configuration into the same folder as the DE Setup, 'set it as an IQC configuration, then set it to our DE Setup IQCAnalysisConfigCreateInfo.Folder = oOM.FindFolder(breadDESetup.Path) IQCAnalysisConfigCreateInfo.MonitorType = swcIQCMonitor IQCAnalysisConfigCreateInfo.Profile = breadDESetup Dim IQCAnalysisConfig As Monitor Set IQCAnalysisConfig = oOM.Monitors.AddEx(IQCAnalysisConfigCreateInfo) IQCAnalysisConfig.AutoSave = False 'Add a custom header to our QC chart. 'The syntax in this string expands to the following at runtime: '&[CHARNAME]: the name of the chart. '&[DATE]: the current date. '&[TIME]: the current time. IQCAnalysisConfig.Option.IncludeIQCChartHeader = True IQCAnalysisConfig.Option.IQCChartHeader = "&[CHARNAME]: (Processed on &[DATE] at &[TIME])" 'Add a calculated variable to the SPC characteristics. 'Here, we are adding a column that shows a warning message for any 'records where the grain level is higher than 15. Given there would be 'around 10-12 cups of ingredients altogether in a mixture, then such a 'high grain-level measurement would indicate a data entry error. IQCAnalysisConfig.AdditionalVariables.Add("SANITY_CHECK", _ "=iif(('Grain Level' > 15), 'EXTREME VALUE - REVIEW DATA ENTRY!', '')") 'Here we will edit the QC settings for "grain level". 'First, we access the QC properties with IQCOptionsByCharID (passing in the ID of the characteristic ["Grain Level"]). Dim qcProps As Properties Set qcProps = IQCAnalysisConfig.IQCOptionsByCharID(oOM.Characteristics("/Blake's Materials/Grain Level").ID) 'Then we can add or edit the QC properties there, by passing in the property's name and the value to set it to. 'The first property to set is to check for out-of-control samples. qcProps.Add("ChartOptAlarmOutOfControl", 1) 'If there are any out-of-control samples, then we will prompt for a cause and action. 'Here, our cause and action labels connected to the characteristic ("grain level") will be 'shown to the user to choose from. qcProps.Add("ChartOptAlarmOutOfControlCause", 1) qcProps.Add("ChartOptAlarmOutOfControlAction", 1) 'Finally, we will only prompt for out-of-control samples that don't already have causes assigned to them. qcProps.Add("ChartOptAlarmCheckAllSamples", 2) 'Set permissions IQCAnalysisConfig.AccessControlList.AddGroup("Administrators", True) IQCAnalysisConfig.AccessControlList.AddGroup("Everyone", False) Dim configUpateInfo As New MonitorUpdateInfo configUpateInfo.AuditLogReason = "Setting permissions for the IQC analysis" IQCAnalysisConfig.SaveEx(configUpateInfo) oOM.Disconnect End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.