pcdapp=win32com.client.Dispatch('PCDLRN.Application')pcdpart=pcdapp.ActivePartProgrampcdcmds=pcdpart.Commandsdef pcd_report(): for pcdcmd in pcdcmds: if pcdcmd.IsDimension and int(pcdcmd.DimensionCommand.OutTol)==0: pcdcmd.SetToggleString(3,165,0) els