Wonderware FactorySuite InTrack

OLE Reference

May, 2001

Wonderware Corporation

All rights reserved. No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the Wonderware Corporation. No copyright or patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this documentation, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. The information in this documentation is subject to change without notice and does not represent a commitment on the part of Wonderware Corporation. The software described in this documentation is furnished under a license or nondisclosure agreement. This software may be used or copied only in accordance with the terms of these agreements.

 2001 Wonderware Corporation. All Rights Reserved. 100 Technology Drive Irvine, CA 92618 U.S.A. (949) 727-3200 http://www.wonderware.com Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Wonderware Corporation cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Wonderware is a registered trademark of Wonderware Corporation. Wonderware FactorySuite, InTouch, WindowMaker, WindowViewer, SQL Access Manager, Recipe Manager, SPC Pro, DBDump, DBLoad, HDMerge, HistData, Wonderware Logger, InControl, InTrack, InBatch, IndustrialSQL, FactoryOffice, Scout, SuiteLink and NetDDE are trademarks of Wonderware Corporation.

i

Contents

Chapter 1 OLE Automation and InTouch Elements of OLE Automation...... 1-2 InTouch OLE Automation Client Extensions...... 1-3 InTouch Automation Expressions...... 1-3 Creating an Object ...... 1-6 Managing an Object...... 1-7 Testing for a Valid Object ...... 1-7 Getting a Property Value ...... 1-8 Setting a Property ...... 1-10 Calling a Method ...... 1-11 InTouch Error Handling...... 1-14 Frequent Automation Object Errors...... 1-17

ii Table of Contents

Chapter 2 InTrack OLE Automation Automation InTrack Concepts...... 2-2 Structural Information...... 2-2 Activity Information...... 2-3 Using Keys...... 2-6 Type Library ...... 2-7 Overview of InTrack OLE Automation Classes...... 2-8 Application...... 2-8 General...... 2-9 Structural...... 2-10 Activity...... 2-10 Dialog ...... 2-10 Query...... 2-11 MES Application Development Notes ...... 2-12 Database Transactions ...... 2-12 Handling InTrack Errors...... 2-14 Working with Collection Objects...... 2-15 Object Creation...... 2-15 Working with InTouch Selectors ...... 2-16 Working with InTouch Dialogs...... 2-16

Chapter 3 Application Objects Database Object Class ...... 3-2 Identification...... 3-3 Properties...... 3-4 Methods ...... 3-5

Table Of Contents iii

Chapter 4 General Objects...... 4-1 Amount Object Class...... 4-3 Identification...... 4-3 Using Amount Objects...... 4-3 Examples 4-3 Serialization 4-4 Properties...... 4-5 Methods ...... 4-5 ArchiveItem Object Class ...... 4-8 Identification...... 4-8 Using ArchiveItem...... 4-8 Properties...... 4-10 Classes Included in an ArchiveItem Object ...... 4-11 ArchiveItems Object Class...... 4-14 Identification...... 4-14 Property ...... 4-14 Methods ...... 4-15 BOMItem Object Class ...... 4-17 Identification...... 4-17 Using BOMItem Objects ...... 4-17 Properties...... 4-18 Methods ...... 4-19 BOMItems Object Class...... 4-22 Identification...... 4-22 Using BOMItems Collection Objects ...... 4-22 Properties...... 4-22 Methods ...... 4-23 BOMSubItem Object Class...... 4-25 Identification...... 4-25 Properties...... 4-26 BOMSubItems Object Class ...... 4-27 Identification...... 4-27 Properties...... 4-27 Methods ...... 4-28 CloseItem Object Class...... 4-30 Identification...... 4-30 Properties...... 4-31 CloseItems Object Class ...... 4-32 Identification...... 4-32 Property ...... 4-32 Methods ...... 4-33

iv Table of Contents

CompleteItem Object Class...... 4-35 Identification...... 4-35 Properties...... 4-36 CompleteItems Object Class ...... 4-37 Identification...... 4-37 Property...... 4-37 Methods ...... 4-38 ConsumableMaterial Object Class...... 4-40 Identification...... 4-40 Properties...... 4-41 Methods ...... 4-42 ConsumableMaterials Object Class ...... 4-43 Identification...... 4-43 Property...... 4-44 Methods ...... 4-44 ConsumeItem Object Class ...... 4-46 Identification...... 4-46 Properties...... 4-47 ConsumeItems Object Class...... 4-48 Identification...... 4-48 Property...... 4-48 Methods ...... 4-49 Date Object Class...... 4-51 Identification...... 4-51 Properties...... 4-51 Methods ...... 4-52 DateTime Object Class ...... 4-55 Identification...... 4-55 Using DateTime Objects...... 4-55 Properties...... 4-56 Methods ...... 4-56 DisassembleItem Object Class...... 4-62 Identification...... 4-62 Using DisassembleItem Objects...... 4-62 Properties...... 4-63 Methods ...... 4-64 DisassembleItems Object Class...... 4-65 Identification...... 4-65 Property...... 4-65 Methods ...... 4-66

Table Of Contents v

Selector Object Class...... 4-68 Identification...... 4-68 Optional Selector Properties...... 4-68 SelectionChangeTagName Property 4-68 MaxNumberOfRows Property 4-69 Filter and Sort Properties 4-69 Properties...... 4-72 Methods ...... 4-73 SerialNumbers Object Class ...... 4-74 Identification...... 4-74 Using SerialNumbers Objects...... 4-74 Property ...... 4-74 Methods ...... 4-75 SetpointItem Object Class...... 4-78 Identification...... 4-78 Properties...... 4-78 Methods ...... 4-79 GetLimits 4-79 GetLimitValue 4-79 SetLimits 4-80 SetpointItems Object Class ...... 4-81 Identification...... 4-81 Properties...... 4-81 Methods ...... 4-81 StartItem Object Class ...... 4-83 Identification...... 4-83 Properties...... 4-84 StartItems Object Class...... 4-85 Identification...... 4-85 Property ...... 4-85 Methods ...... 4-86 StepInputItem Object Class...... 4-88 Identification...... 4-88 Properties...... 4-89 Methods ...... 4-89 StepInputItems Object Class ...... 4-90 Identification...... 4-90 Properties...... 4-90 Methods ...... 4-91

vi Table of Contents

StepOutputItem Object Class ...... 4-93 Identification...... 4-93 Properties...... 4-95 Methods ...... 4-96 StepOutputItems Object Class...... 4-97 Identification...... 4-97 Property...... 4-97 Methods ...... 4-98 StepSetpointItem Object Class ...... 4-100 Identification...... 4-100 Properties...... 4-100 Methods ...... 4-101 InitializeFrom 4-101 StepSetpointItems Object Class...... 4-102 Identification...... 4-102 Properties...... 4-102 Methods ...... 4-102 Time Object Class ...... 4-105 Identification...... 4-105 Properties...... 4-105 Methods ...... 4-106 TimeInterval Object Class...... 4-108 Identification...... 4-108 Properties...... 4-108 Methods ...... 4-109

Table Of Contents vii

Chapter 5 Structural Objects Classification Object Class...... 5-3 Identification...... 5-3 Properties...... 5-3 Methods ...... 5-5 Create 5-5 Delete 5-5 GetUDAType 5-6 GetUDAValue 5-6 Load 5-7 SetRoot 5-7 SetUDAValue 5-7 ClassificationItem Object Class...... 5-8 Identification...... 5-8 Properties...... 5-9 Methods ...... 5-10 Attach 5-10 Create 5-10 Delete 5-10 Detach 5-11 GetUDAType 5-11 GetUDAValue 5-12 Load 5-12 SetUDAValue 5-12 ClassificationItems Object Class ...... 5-13 Identification...... 5-13 Properties...... 5-13 Methods ...... 5-13 Item 5-14 Remove 5-14 CustomerSpecification Object Class ...... 5-15 Identification...... 5-15 Automation Interface 5-15 Properties...... 5-15 Methods ...... 5-16 Create 5-16 Delete 5-16 GetUDAType 5-17 GetUDAValue 5-17 Load 5-17 SetUDAValue 5-18

viii Table of Contents

DataSetItem Object Class...... 5-19 Identification...... 5-19 Properties...... 5-19 Methods ...... 5-20 GetHoldFlags 5-20 GetLimitValue 5-21 GetRanges 5-21 SetHoldFlags 5-22 SetRanges 5-23 DataSetItems Object Class...... 5-24 Identification...... 5-24 Properties...... 5-24 Methods ...... 5-24 Add 5-24 Clear 5-24 Item 5-25 Remove 5-25 DataSetTemplate Object Class ...... 5-26 Identification...... 5-26 Automation Interface 5-26 Properties...... 5-27 Methods ...... 5-28 AddDataSetItems 5-28 AssociateParent 5-28 Create 5-29 Delete 5-29 DeleteDataSetItems 5-30 DisassociateParent 5-30 GetItemIntegerRanges 5-31 GetItemRealRanges 5-33 GetUDAType 5-34 GetUDAValue 5-35 Load 5-35 SetUDA 5-36 DataSetTemplates Object Class...... 5-37 Identification...... 5-37 Properties...... 5-37 Methods ...... 5-37 Add 5-37 Clear 5-37 Item 5-38 Remove 5-38

Table Of Contents ix

DispositionCode Object Class...... 5-39 Identification...... 5-39 Properties...... 5-39 Methods ...... 5-40 Create 5-40 Delete 5-40 GetUDAType 5-40 GetUDAValue 5-41 Load 5-41 SetUDAValue 5-41 DispositionCodes Object Class ...... 5-42 Identification...... 5-42 Properties...... 5-42 Methods ...... 5-42 Add 5-42 Clear 5-43 Item 5-43 Remove 5-43 FailureReasons Object Class...... 5-44 Identification...... 5-44 Properties...... 5-44 Methods ...... 5-44 Add 5-44 Clear 5-44 Item 5-45 Remove 5-45 FailureSymptoms Object Class...... 5-46 Identification...... 5-46 Properties...... 5-46 Methods ...... 5-46 Add 5-46 Clear 5-46 Item 5-47 Remove 5-47 Location Object Class...... 5-48 Identification...... 5-48 Properties...... 5-48 Methods ...... 5-48 Create 5-49 Delete 5-49 GetUDAType 5-49 GetUDAValue 5-50 Load 5-50 SetUDAValue 5-50

x Table of Contents

Machine Object Class...... 5-51 Identification...... 5-51 Properties...... 5-52 Methods ...... 5-52 AddDataSetTemplates 5-52 AssignRepairPerson 5-53 BringOnLine 5-53 Close 5-54 CloseRepair 5-55 Complete 5-56 CompleteTask 5-57 Create 5-58 Delete 5-58 DeleteAllDataSetTemplates 5-59 DeleteDataSetTemplates 5-59 GetTaskWorkInstructions 5-59 GetUDAType 5-60 GetUDAValue 5-60 Load 5-60 OpenRepair 5-61 SetUDAValue 5-61 Start 5-62 StartRepair 5-63 StartTask 5-64 StopRepair 5-65 TakeOffline 5-66 UpdateDiagnosis 5-66 UpdateFailureReason 5-66 UpdateFailureSymptom 5-67 UpdateWorkStatus 5-67 Machines Object Class...... 5-68 Identification...... 5-68 Properties...... 5-68 Methods ...... 5-68 Add 5-68 Clear 5-68 Item 5-69 Remove 5-69 MachineTask Object Class...... 5-70 Identification...... 5-70 Properties...... 5-71 MachineTasks Object Class ...... 5-72 Identification...... 5-72 Properties...... 5-72 Methods ...... 5-72 Add 5-72 Clear 5-72 Item 5-73 Remove 5-73

Table Of Contents xi

MachineType Object Class ...... 5-74 Identification...... 5-74 Properties...... 5-74 Methods ...... 5-75 AddFailureReasons 5-75 AddFailureSymptoms 5-75 AddMachineTasks 5-75 Create 5-76 Delete 5-76 DeleteAllFailureReasons 5-76 DeleteAllFailureSymptoms 5-77 DeleteAllMachineTasks 5-77 DeleteFailureReasons 5-77 DeleteFailureSymptoms 5-78 DeleteMachineTasks 5-78 GetUDAType 5-78 GetUDAValue 5-79 Load 5-79 SetUDAValue 5-79 Material Object Class...... 5-80 Identification...... 5-80 Properties...... 5-82 Methods ...... 5-83 AddCycleTimeOverride 5-83 AddDataSetOverride 5-83 AddInputItems 5-84 AddMachineOverride 5-85 AddOutputItems 5-86 AddOverlapOverride 5-86 AddSetpointTemplateOverride 5-87 AddTrackingOverride 5-87 AddWorkInstructionsOverride 5-88 AddYieldOverride 5-89 AssociateRoute 5-89 Create 5-90 CreateBOM 5-91 DelAllDataSetOverride 5-91 DelAllMachineOverride 5-92 DelAllSetpointTemplateOverrides 5-92 DelAllWorkInstructionsOverride 5-93 Delete 5-93 DeleteAllInputItems 5-93 DeleteAllOutputItems 5-93 DeleteBOM 5-94 DeleteCycleTimeOverride 5-94 DeleteDataSetOverride 5-94 DeleteInputItems 5-95 DeleteMachineOverride 5-95 DeleteOutputItems 5-96 DeleteOverlapOverride 5-96 DeleteSetpointTemplateOverride 5-97

xii Table of Contents

DeleteTrackingOverride 5-97 DeleteWorkInstructionsOverride 5-98 DeleteYieldOverride 5-98 GetUDAType 5-99 GetUDAValue 5-99 Load 5-99 RemoveRouteAssociation 5-100 SetControlType 5-100 SetDescription 5-100 SetLifeTime 5-101 SetQuantity 5-101 SetUDAValue 5-101 SetUnitsOfMeasure 5-102 ToggleDataSetOverride 5-102 ToggleMachineOverride 5-103 ToggleSetpointTemplateOverride 5-103 ToggleWorkInstructionsOverride 5-104 Operation Object Class ...... 5-105 Identification...... 5-105 Properties...... 5-105 Methods ...... 5-106 AddDataSetTemplates 5-106 AddQualifiedMachines 5-106 AddSetpointTemplates 5-107 AddWorkInstructions 5-107 Create 5-108 CreateEx 5-109 Delete 5-110 DeleteAllDataSetTemplates 5-110 DeleteAllQualifiedMachines 5-110 DeleteAllSetpointTemplates 5-110 DeleteAllWorkInstructions 5-110 DeleteDataSetTemplates 5-111 DeleteQualifiedMachines 5-111 DeleteSetpointTemplates 5-112 DeleteWorkInstructions 5-112 GetUDAType 5-112 GetUDAValue 5-113 Load 5-113 SetUDAValue 5-113 Privilege Object Class...... 5-114 Identification...... 5-114 Properties...... 5-114

Table Of Contents xiii

Privileges Object Class ...... 5-116 Identification...... 5-116 Properties...... 5-116 Methods ...... 5-116 Add 5-116 Clear 5-116 Item 5-117 Remove 5-117 Route Object Class...... 5-118 Identification...... 5-118 Properties...... 5-118 Methods ...... 5-121 AddInputItems 5-121 AddOutputItems 5-121 AddRoutePaths 5-122 AddRouteSteps 5-122 AddSetpointItems 5-123 Create 5-124 Delete 5-125 DeleteAllInputItems 5-125 DeleteAllOutputItems 5-125 DeleteAllSetpointItems 5-126 DeleteInputItems 5-126 DeleteOutputItems 5-127 DeleteRoutePaths 5-127 DeleteRouteSteps 5-127 DeleteSetpointItems 5-128 GetDispMaterialOutput 5-128 GetInfo 5-129 GetUDAType 5-129 GetUDAValue 5-129 Load 5-130 SetDefaultDispositionCode 5-130 SetInitialRouteStep 5-130 SetUDAValue 5-131 RoutePath Object Class...... 5-132 Identification...... 5-132 Properties...... 5-132 Methods ...... 5-132 RoutePaths Object Class ...... 5-133 Identification...... 5-133 Property ...... 5-133 Methods ...... 5-133 Add 5-133 Clear 5-134 Item 5-134 Remove 5-134

xiv Table of Contents

RouteStep Object Class ...... 5-135 Identification...... 5-135 Properties...... 5-135 Methods ...... 5-136 RouteSteps Object Class...... 5-137 Identification...... 5-137 Properties...... 5-137 Methods ...... 5-137 Add 5-137 Clear 5-137 Item 5-138 Remove 5-138 SecurityGroup Object Class...... 5-139 Identification...... 5-139 Properties...... 5-139 Methods ...... 5-140 AddPrivileges 5-140 Create 5-140 Delete 5-140 DeletePrivileges 5-141 Load 5-141 SecurityGroups Object Class...... 5-142 Identification...... 5-142 Properties...... 5-142 Methods ...... 5-142 Add 5-142 Clear 5-143 Item 5-143 Remove 5-143 SetpointTemplate Object Class...... 5-144 Identification...... 5-144 Properties...... 5-144 Methods ...... 5-145 AddSetpointItems 5-145 AssociateParent 5-145 Create 5-146 Delete 5-146 DeleteSetpointItems 5-146 DisassociateParent 5-147 GetUDAType 5-147 GetUDAValue 5-148 Load 5-148 SetUDA 5-148

Table Of Contents xv

SetpointTemplates Object Class ...... 5-149 Identification...... 5-149 Properties...... 5-149 Methods ...... 5-149 Add 5-149 Clear 5-150 Item 5-150 Remove 5-150 Table Object Class...... 5-151 Identification...... 5-151 Using the Table Object Class...... 5-151 Properties...... 5-153 Methods ...... 5-154 Create 5-154 Delete 5-154 Load 5-154 Modify 5-155 Row Methods...... 5-156 DeleteRow 5-156 ReadRow 5-156 SaveRow 5-157 TableColumn Object Class...... 5-158 Identification...... 5-158 Properties...... 5-158 Methods ...... 5-159 TableColumns Object Class...... 5-160 Identification...... 5-160 Properties...... 5-160 Methods ...... 5-160 Add 5-160 Clear 5-160 Item 5-161 Remove 5-161 User Object Class...... 5-162 Identification...... 5-162 Property ...... 5-162 Methods ...... 5-163 ChangePassword 5-163 ClockIn 5-164 ClockOut 5-164 Create 5-164 Delete 5-164 GetQualificationStatus 5-165 GrantPrivileges 5-165 Load 5-165 RevokePrivileges 5-166 UserCertification Object Class ...... 5-167

xvi Table of Contents

Identification...... 5-167 Properties...... 5-167 Methods ...... 5-168 Create 5-168 Delete 5-168 GetUDAType 5-169 GetUDAValue 5-169 Load 5-170 SetUDA 5-170 SetWhenIssued 5-170 UserCertifications Object Class...... 5-171 Identification...... 5-171 Properties...... 5-171 Methods ...... 5-171 Add 5-171 Clear 5-172 Item 5-172 Remove 5-172 WorkInstructions Object Class...... 5-173 Identification...... 5-173 Properties...... 5-174 Methods ...... 5-175 Create 5-175 Delete 5-176 GetUDAType 5-176 GetUDAValue 5-177 Load 5-177 SetUDAValue 5-178 WorkInstructionsList Object Class...... 5-179 Identification...... 5-179 Property...... 5-179 Methods ...... 5-179 Add 5-179 Clear 5-180 Item 5-180 Remove 5-180

Table Of Contents xvii

Chapter 6 Activity Objects InTrack Object Class Constants...... 6-2 DataSetSample Object Class...... 6-3 Identification...... 6-3 Properties...... 6-7 Methods ...... 6-8 Lot Object Class...... 6-25 Identification...... 6-25 Properties...... 6-25 Methods ...... 6-26 Sublot Object Class...... 6-37 Sublot Identification 6-37 Identification...... 6-37 Properties...... 6-38 Methods ...... 6-40

Chapter 7 Dialog Objects Dialog.Adjust Object Class ...... 7-4 Properties...... 7-4 Method...... 7-4 Dialog.Close Object Class ...... 7-5 Properties...... 7-5 Method...... 7-5 Dialog.CloseRepair Object Class...... 7-6 Properties...... 7-6 Method...... 7-6 Dialog.Collect Object Class...... 7-7 Properties...... 7-7 Method...... 7-7 Dialog.Comment Object Class ...... 7-8 Properties...... 7-8 Method...... 7-8 Dialog.Complete Object Class ...... 7-9 Properties...... 7-9 Method...... 7-9 Dialog.CompleteTask Object Class ...... 7-10 Properties...... 7-10 Method...... 7-10

xviii Table of Contents

Dialog.Connect Object Class...... 7-11 Properties...... 7-11 Method...... 7-11 Dialog.Consume Object Class ...... 7-12 Properties...... 7-12 Method...... 7-12 Dialog.Create Object Class ...... 7-13 Properties...... 7-13 Method...... 7-13 Dialog.Delete Object Class ...... 7-14 Properties...... 7-14 Method...... 7-14 Dialog.Detail Object Class...... 7-15 Properties...... 7-15 Method...... 7-15 Dialog.Disconnect Object Class ...... 7-16 Property...... 7-16 Method...... 7-16 Dialog.Filter Object Class ...... 7-17 Properties...... 7-17 Methods ...... 7-17 Dialog.Instruct Object Class ...... 7-19 Properties...... 7-19 Method...... 7-19 Dialog.LogIn Object Class ...... 7-20 Properties...... 7-20 Method...... 7-20 Dialog.LogOut Object Class...... 7-21 Property...... 7-21 Method...... 7-21 Dialog.MachineStatus Object Class ...... 7-22 Properties...... 7-22 Method...... 7-22 Dialog.Merge Object Class...... 7-23 Properties...... 7-23 Method...... 7-23 Dialog.Move Object Class ...... 7-24 Properties...... 7-24 Method...... 7-24

Table Of Contents xix

Dialog.OpenRepair Object Class...... 7-25 Properties...... 7-25 Method...... 7-25 Dialog.Purge Object Class...... 7-26 Property ...... 7-26 Method...... 7-26 Dialog.Receive Object Class...... 7-27 Properties...... 7-27 Method...... 7-27 Dialog.Ship Object Class...... 7-28 Properties...... 7-28 Method...... 7-28 Dialog.Split Object Class...... 7-29 Properties...... 7-29 Method...... 7-29 Dialog.Start Object Class...... 7-30 Properties...... 7-30 Method...... 7-30 Dialog.StartTask Object Class...... 7-31 Properties...... 7-31 Method...... 7-31 Dialog.Status Object Class ...... 7-32 Properties...... 7-32 Method...... 7-32 Dialog.Undo Object Class ...... 7-33 Properties...... 7-33 Method...... 7-33 Dialog.UpdateRepair Object Class...... 7-34 Properties...... 7-34 Method...... 7-35

xx Table of Contents

Chapter 8 Query Objects QueryAllDisposition Object Class ...... 8-5 Identification...... 8-5 Properties...... 8-5 Methods ...... 8-5 QueryAllDSTemplate Object Class...... 8-7 Identification...... 8-7 Properties...... 8-7 Methods ...... 8-7 QueryAllLocation Object Class...... 8-9 Identification...... 8-9 Properties...... 8-9 Methods ...... 8-9 QueryAllMachine Object Class ...... 8-11 Identification...... 8-11 Properties...... 8-11 Methods ...... 8-11 QueryAllOperation Object Class...... 8-13 Identification...... 8-13 Properties...... 8-13 Methods ...... 8-13 QueryAllRoute Object Class...... 8-15 Identification...... 8-15 Properties...... 8-15 Methods ...... 8-15 QueryAllSetpointTemplate Object Class...... 8-17 Identification...... 8-17 Properties...... 8-17 Methods ...... 8-17 QueryCloseLot Object Class...... 8-19 Identification...... 8-19 Properties...... 8-19 Methods ...... 8-20 QueryConsumeLot Object Class ...... 8-21 Identification...... 8-21 Properties...... 8-21 Methods ...... 8-22

Table Of Contents xxi

QueryDataSetItem Object Class...... 8-23 Identification...... 8-23 Properties...... 8-23 Methods ...... 8-24 QueryDataSetSample Object Class...... 8-25 Identification...... 8-25 Properties...... 8-25 Methods ...... 8-26 QueryDataSetTimeStamp Object Class...... 8-27 Identification...... 8-27 Properties...... 8-27 Methods ...... 8-28 QueryDisposition Object Class...... 8-29 Identification...... 8-29 Properties...... 8-29 Methods ...... 8-30 QueryExpiredMachineTask Object Class ...... 8-31 Identification...... 8-31 Properties...... 8-31 Methods ...... 8-31 QueryInWarningMachineTask Object Class...... 8-33 Identification...... 8-33 Properties...... 8-33 Methods ...... 8-33 QueryLotDataSet Object Class...... 8-35 Identification...... 8-35 Properties...... 8-35 Methods ...... 8-36 QueryLotDataSetSample Object Class ...... 8-37 Identification...... 8-37 Properties...... 8-37 Methods ...... 8-38 QueryLotDataSetTimeStamp Object Class...... 8-39 Identification...... 8-39 Properties...... 8-39 Methods ...... 8-40 QueryLotLocation Object Class...... 8-41 Identification...... 8-41 Properties...... 8-41 Methods ...... 8-42

xxii Table of Contents

QueryLotMachine Object Class ...... 8-43 Identification...... 8-43 Properties...... 8-43 Methods ...... 8-44 QueryLotMachineQty Object Class...... 8-45 Identification...... 8-45 Properties...... 8-45 Methods ...... 8-46 QueryLotPurgeItem Object Class ...... 8-47 Identification...... 8-47 Properties...... 8-47 Methods ...... 8-48 QueryLotSerialNumber Object Class ...... 8-50 Identification...... 8-50 Properties...... 8-50 Methods ...... 8-51 QueryLotUndo Object Class...... 8-52 Identification...... 8-52 Properties...... 8-52 Methods ...... 8-53 QueryLotWorkInstructions Object Class...... 8-54 Identification...... 8-54 Properties...... 8-54 Methods ...... 8-55 QueryMachineDataSet Object Class...... 8-56 Identification...... 8-56 Properties...... 8-56 Methods ...... 8-57 QueryMachineDataSetSample Object Class ...... 8-58 Identification...... 8-58 Properties...... 8-58 Methods ...... 8-59 QueryMachineDataSetTimeStamp Object Class ...... 8-60 Identification...... 8-60 Properties...... 8-60 Methods ...... 8-61 QueryMachineLot Object Class ...... 8-62 Identification...... 8-62 Properties...... 8-62 Methods ...... 8-63

Table Of Contents xxiii

QueryMachinesAtOperation Object Class...... 8-64 Identification...... 8-64 Properties...... 8-64 Methods ...... 8-65 QueryMachineTask Object Class...... 8-66 Identification...... 8-66 Properties...... 8-66 Methods ...... 8-67 QueryMaterial Object Class ...... 8-68 Identification...... 8-68 Properties...... 8-68 Methods ...... 8-69 QueryMaterialInput Object Class...... 8-70 Identification...... 8-70 Properties...... 8-70 Methods ...... 8-71 QueryMaterialOutput Object Class...... 8-72 Identification...... 8-72 Properties...... 8-72 Methods ...... 8-73 QueryMaterialRoute Object Class...... 8-74 Identification...... 8-74 Properties...... 8-74 Methods ...... 8-75 QueryMaterialSpec Object Class ...... 8-76 Identification...... 8-76 Properties...... 8-76 Methods ...... 8-77 QueryMergeLot Object Class...... 8-78 Identification...... 8-78 Properties...... 8-78 Methods ...... 8-79 QueryOperation Object Class...... 8-80 Identification...... 8-80 Properties...... 8-80 Methods ...... 8-81 QueryQualifiedUser Object Class ...... 8-82 Identification...... 8-82 Properties...... 8-82 Methods ...... 8-83

xxiv Table of Contents

QueryRouteMaterial Object Class ...... 8-84 Identification...... 8-84 Properties...... 8-84 Methods ...... 8-85 QueryRouteStep Object Class ...... 8-86 Identification...... 8-86 Properties...... 8-86 Methods ...... 8-87 QueryRuntimeConfig Object Class...... 8-88 Identification...... 8-88 Properties...... 8-88 Methods ...... 8-88 QuerySQL Object Class ...... 8-90 Identification...... 8-92 Properties...... 8-92 Methods ...... 8-92 QueryStepSetpoint Object Class...... 8-97 Identification...... 8-97 Properties...... 8-97 Methods ...... 8-98 QuerySubstituteMaterialInput Object Class...... 8-99 Identification...... 8-99 Properties...... 8-99 Methods ...... 8-100 QueryTypedMachines Object Class...... 8-101 Identification...... 8-101 Properties...... 8-101 Methods ...... 8-102 QueryUDA_Name Object Class...... 8-103 Identification...... 8-103 Properties...... 8-103 Methods ...... 8-104

Table Of Contents xxv

Chapter 9 Import API Objects...... 9-1 Create, Load and Delete...... 9-3 User Defined Attributes ...... 9-3 Standard Properties...... 9-3 Collection Methods...... 9-3 InCustomerSpecification Object Class...... 9-4 Properties...... 9-4 Methods ...... 9-4 Create 9-4 Delete 9-5 GetUDAType 9-5 GetUDAValue 9-5 Load 9-6 SetUDAValue 9-6 InDataSetItem Object Class...... 9-7 Properties...... 9-7 Methods ...... 9-8 GetHoldFlags 9-8 GetLimitValue 9-9 GetRanges 9-9 SetHoldFlags 9-10 SetRanges 9-11 InDataSetItems Object Class ...... 9-12 Properties...... 9-12 Methods ...... 9-12 InDataSetTemplate Object Class...... 9-14 Properties...... 9-14 Methods ...... 9-15 AddDataSetItems 9-15 AssociateParent 9-15 Create 9-16 Delete 9-16 DeleteDataSetItems 9-17 DisassociateParent 9-17 GetItemIntegerRanges 9-18 GetItemRealRanges 9-19 GetUDAType 9-20 GetUDAValue 9-20 Load 9-21 SetUDA 9-21 InDataSetTemplates Object Class...... 9-22 Properties...... 9-22 Methods ...... 9-22

xxvi Table of Contents

InDispositionCode Object Class ...... 9-24 Properties...... 9-24 Methods ...... 9-24 Create 9-24 Delete 9-25 GetUDAType 9-25 GetUDAValue 9-25 Load 9-26 SetUDAValue 9-26 InDispositionCodes Object Class...... 9-27 Properties...... 9-27 Methods ...... 9-27 InLocation Object Class ...... 9-29 Properties...... 9-29 Methods ...... 9-29 Create 9-29 Delete 9-29 GetUDAType 9-30 GetUDAValue 9-30 Load 9-30 SetUDAValue 9-31 InMachine Object Class ...... 9-32 Properties...... 9-32 Methods ...... 9-33 AddDataSetTemplates 9-33 AssignRepairPerson 9-33 BringOnLine 9-33 Close 9-34 CloseRepair 9-34 Complete 9-34 CompleteTask 9-34 Create 9-35 Delete 9-35 DeleteAllDataSetTemplates 9-36 DeleteDataSetTemplates 9-36 GetTaskWorkInstructions 9-36 GetUDAType 9-37 GetUDAValue 9-37 Load 9-37 OpenRepair 9-38 SetUDAValue 9-38 Start 9-38 StartRepair 9-39 StartTask 9-39 StopRepair 9-39 TakeOffline 9-39 UpdateDiagnosis 9-40 UpdateFailureReason 9-40 UpdateFailureSymptom 9-40 UpdateWorkStatus 9-41

Table Of Contents xxvii

InMachines Object Class...... 9-42 Properties...... 9-42 Methods ...... 9-42 InMachineType Object Class...... 9-44 Properties...... 9-44 Methods ...... 9-44 AddFailureReasons 9-44 AddFailureSymptoms 9-45 AddMachineTasks 9-45 Create 9-46 Delete 9-46 DeleteAllFailureReasons 9-47 DeleteAllFailureSymptoms 9-47 DeleteAllMachineTasks 9-47 DeleteFailureReasons 9-47 DeleteFailureSymptoms 9-48 DeleteMachineTasks 9-48 GetUDAType 9-48 GetUDAValue 9-49 SetUDAValue 9-49 InMaterial Object Class ...... 9-50 Properties...... 9-50 Methods ...... 9-51 AddCycleTimeOverride 9-51 AddDataSetOverride 9-51 AddInputItems 9-52 AddMachineOverride 9-52 AddOutputItems 9-53 AddOverlapOverride 9-53 AddSetpointTemplateOverride 9-54 AddTrackingOverride 9-54 AddWorkInstructionsOverride 9-55 AddYieldOverride 9-55 AssociateRoute 9-55 Create 9-56 CreateBOM 9-56 Delete 9-57 DeleteBOM 9-57 DeleteCycleTimeOverride 9-57 DeleteDataSetOverride 9-57 DelAllDataSetOverride 9-58 DeleteInputItems 9-58 DeleteAllInputItems 9-58 DeleteMachineOverride 9-59 DelAllMachineOverride 9-59 DeleteOutputItems 9-60 DeleteAllOutputItems 9-60 DeleteOverlapOverride 9-60 DeleteSetpointTemplateOverride 9-61 DelAllSetpointTemplateOverride 9-61 DeleteTrackingOverride 9-62

xxviii Table of Contents

DeleteWorkInstructionsOverride 9-62 DelAllWorkInstructionsOverride 9-63 DeleteYieldOverride 9-63 GetUDAType 9-63 GetUDAValue 9-64 Load 9-64 RemoveRouteAssociation 9-64 SetControlType 9-65 SetDescription 9-65 SetLifeTime 9-65 SetQuantity 9-66 SetUDAValue 9-66 SetUnitsOfMeasure 9-66 ToggleDataSetOverride 9-67 ToggleMachineOverride 9-67 ToggleSetpointTemplateOverride 9-68 ToggleWorkInstructionsOverride 9-68 InOperation Object Class...... 9-69 Properties...... 9-69 Methods ...... 9-70 AddDataSetTemplates 9-70 AddQualifiedMachines 9-70 AddSetpointTemplates 9-71 AddWorkInstructions 9-71 Create 9-72 CreateEx 9-73 Delete 9-74 DeleteDataSetTemplates 9-74 DeleteAllDataSetTemplates 9-74 DeleteQualifiedMachines 9-75 DeleteAllQualifiedMachines 9-75 DeleteSetpointTemplates 9-75 DeleteAllSetpointTemplates 9-76 DeleteWorkInstructions 9-76 DeleteAllWorkInstructions 9-76 GetUDAType 9-77 GetUDAValue 9-77 Load 9-77 SetUDAValue 9-78 InRoute Object Class...... 9-79 Properties...... 9-79 Methods ...... 9-80 AddInputItems 9-80 AddOutputItems 9-80 AddRoutePaths 9-81 AddRouteSteps 9-81 AddSetpointItems 9-82 Create 9-82 Delete 9-83 DeleteAllInputItems 9-83 DeleteAllOutputItems 9-83

Table Of Contents xxix

DeleteAllSetpointItems 9-84 DeleteInputItems 9-84 DeleteOutputItems 9-84 DeleteRoutePaths 9-85 DeleteRouteSteps 9-85 DeleteSetpointItems 9-85 GetDispMaterialOutput 9-86 GetInfo 9-86 GetUDAType 9-87 GetUDAValue 9-87 SetDefaultDispositionCode 9-88 SetInitialRouteStep 9-88 SetUDAValue 9-88 InRoutePath Object Class...... 9-89 Properties...... 9-89 Methods ...... 9-89 InRoutePaths Object Class ...... 9-90 Properties...... 9-90 Methods ...... 9-90 Add 9-90 Clear 9-90 Item 9-91 Remove 9-91 InRouteStep Object Class ...... 9-92 Properties...... 9-92 Methods ...... 9-92 InRouteSteps Object Class...... 9-94 Properties...... 9-94 Methods ...... 9-94 Add 9-94 Clear 9-94 Item 9-95 Remove 9-95 InSetpointItem Object Class ...... 9-96 Properties...... 9-96 Methods ...... 9-97 GetLimits 9-97 GetLimitValue 9-97 SetLimits 9-98 InSetpointItems Object Class...... 9-99 Properties...... 9-99 Methods ...... 9-99

xxx Table of Contents

InSetpointTemplate Object Class ...... 9-101 Properties...... 9-101 Methods ...... 9-102 AddSetpointItems 9-102 AssociateParent 9-102 Create 9-103 Delete 9-103 DeleteSetpointItems 9-104 DisassociateParent 9-104 GetUDA 9-104 GetUDAType 9-105 GetUDAValue 9-105 Load 9-106 SetUDA 9-106 InSetpointTemplates Object Class...... 9-107 Properties...... 9-107 Methods ...... 9-107 InStepSetpointItem Object Class...... 9-109 Properties...... 9-109 Methods ...... 9-110 InitializeFrom 9-110 InStepSetpointItems Object Class ...... 9-111 Properties...... 9-111 Methods ...... 9-111 InTable Object Class ...... 9-114 Properties...... 9-115 Methods ...... 9-115 Row Methods...... 9-117 InTableColumn Object Class...... 9-119 Properties...... 9-119 Methods ...... 9-119 InTableColumns Object Class ...... 9-120 Properties...... 9-120 Methods ...... 9-120 InWorkInstructions Object Class...... 9-122 Properties...... 9-122 Methods ...... 9-123 Create 9-123 Delete 9-124 GetUDAType 9-124 GetUDAValue 9-124 SetUDAValue 9-125

Table Of Contents xxxi

InWorkInstructionsList Object Class ...... 9-126 Property ...... 9-126 Methods ...... 9-126 Add 9-126 Clear 9-126 Item 9-126 Remove 9-127

Chapter 10 ActiveX Controls ...... 10-1 Grid-Based ActiveX Controls ...... 10-3 Common Properties ...... 10-3 Column Title 10-3 Column Number 10-3 Column Width 10-3 Column Resizing 10-3 Changing Column Attributes ...... 10-4 ITDataItemList ...... 10-5 Properties...... 10-5 Methods ...... 10-6 Refresh 10-6 Clear 10-6 Events ...... 10-6 DblClick 10-6 SelectionChanged 10-6 ShutDown 10-6 StartUp 10-6 ITLotDataSet...... 10-7 Properties...... 10-7 Methods ...... 10-8 Refresh 10-8 Clear 10-8 Events ...... 10-8 DblClick 10-8 SelectionChanged 10-8 ShutDown 10-8 StartUp 10-8 ITLotDispCode...... 10-9 Properties...... 10-9 Methods ...... 10-10 Refresh 10-10 Clear 10-10 Events ...... 10-10 DblClick 10-10 SelectionChanged 10-10 ShutDown 10-10 StartUp 10-10

xxxii Table of Contents

ITLotInputItems ...... 10-11 Properties...... 10-11 Methods ...... 10-11 Refresh 10-12 Clear 10-12 Events ...... 10-12 DblClick 10-12 SelectionChanged 10-12 ShutDown 10-12 StartUp 10-12 ITLotInputMtls...... 10-13 Properties...... 10-13 Methods ...... 10-14 Refresh 10-14 Clear 10-14 Events ...... 10-14 DblClick 10-14 SelectionChanged 10-14 ShutDown 10-14 StartUp 10-14 ITLotMachAvail ...... 10-15 Properties...... 10-15 Methods ...... 10-16 Refresh 10-16 Clear 10-16 Events ...... 10-16 DblClick 10-16 SelectionChanged 10-16 ShutDown 10-16 StartUp 10-16 ITLotUndoList ...... 10-17 Properties...... 10-17 Methods ...... 10-18 Refresh 10-18 Clear 10-18 Events ...... 10-18 DblClick 10-18 SelectionChanged 10-18 ShutDown 10-18 StartUp 10-18

Table Of Contents xxxiii

ITLotWorkInst...... 10-19 Properties...... 10-19 Methods ...... 10-20 Refresh 10-20 Clear 10-20 Events ...... 10-20 DblClick 10-20 SelectionChanged 10-20 ShutDown 10-20 StartUp 10-20 ITSubInputMtls ...... 10-21 Properties...... 10-21 Methods ...... 10-22 Refresh 10-22 Clear 10-22 Events ...... 10-22 DblClick 10-22 SelectionChanged 10-22 ShutDown 10-22 StartUp 10-22 ITSelector ...... 10-23 Using the ITSelector Control 10-23 Changing Column Select Properties 10-24 ITSelector Colors 10-24 Properties...... 10-25 Methods ...... 10-26 Refresh 10-26 Clear 10-26 CellValue (r, ) 10-26 ColumnValue (r, heading) 10-26 SelectRow (s) 10-26 Events ...... 10-27 DblClick 10-27 SelectionChanged 10-27 ShutDown 10-27 StartUp 10-27

xxxiv Table of Contents

ListBox ActiveX Controls...... 10-28 Common Properties ...... 10-28 ITLotMergeList...... 10-29 Properties...... 10-29 Methods ...... 10-30 Refresh 10-30 Clear 10-30 Events ...... 10-30 DblClick 10-30 SelectionChanged 10-30 ShutDown 10-30 StartUp 10-30 ITMachineInfoList...... 10-31 Properties...... 10-31 Methods ...... 10-32 Refresh 10-32 Clear 10-32 Events ...... 10-32 DblClick 10-32 SelectionChanged 10-32 ShutDown 10-32 StartUp 10-32 ITQueryList...... 10-33 Properties...... 10-33 Methods ...... 10-34 Clear 10-34 Refresh 10-34 SelectRow (s) 10-34 Events ...... 10-34 DblClick 10-34 SelectionChanged 10-34 ShutDown 10-34 StartUp 10-34 ITSampleList ...... 10-35 Properties...... 10-35 Methods ...... 10-36 Clear 10-36 Refresh 10-36 SelectRow (s) 10-36 Events ...... 10-36 DblClick 10-36 SelectionChanged 10-36 ShutDown 10-36 StartUp 10-36

xviii InTrack and FactorySuite xviii

InTrack and FactorySuite

InTrack is a full-featured manufacturing execution system (MES) that provides an integrated framework for managing a manufacturing enterprise. InTrack works in conjunction with other FactorySuite components, such as InTouch. InTouch is a Windows based Human-Machine Interface (HMI) software package that provides the development environment for creating InTrack manufacturing models, automation scripts, and the runtime user interface. The development environment is called WindowMaker, and the runtime environment is called WindowViewer. This book is a reference for using InTrack OLE Automation. InTrack ModelMaker is used to created the structural model, materials, machines and other objects needed by the runtime application. Detailed reports can be generated from InTrack database information using the included reporting tool or any other reporting software that can acces SQL tables.

InTrack OLE Automation

Primary access to the runtime facilities of InTrack is through Object Linking and Embedding (OLE) Automation Objects. This technology lets you quickly develop an InTrack MES application using modern Object-Oriented Programming techniques from a variety of Windows development environments. InTrack OLE Automation classes provide full access to all material and resource tracking facilities. As a productivity aid, classes are provided to support direct plant operator interaction with InTrack runtime through dialogs. Specialized classes also have been provided to support retrieving (querying) information from an InTrack database. For InTouch users, two extensions have been added to support rapid application development. First, this release of the FactorySuite includes an upgraded version of InTrack that features ActiveX controls. For more information on ActiveX controls and COM/DCOM capabilities, see the InTrack ActiveX Controls manual. Second, the InTouch has been extended to provide direct access to Microsoft OLE Automation object technology.

1-1

CHAPTER 1

OLE Automation and InTouch

Microsoft Object Linking and Embedding (OLE) technology supports a wide variety of information exchange and manipulation facilities between a client and server. InTrack contains an OLE Server that provides facilities for MES runtime tracking using OLE Automation objects (automation objects). An InTouch application acts as a client that informs the InTrack server of manufacturing state changes. This chapter provides a brief outline of the OLE Automation architecture. Procedures for using OLE Automation through the new InTouch extensions also are described.

Note InTouch OLE Automation object extensions are available in InTouch.

Contents Elements of OLE Automation, 2 InTouch OLE Automation Client Extensions, 3

1-2 Chapter 1

Elements of OLE Automation

In a very simplified form, OLE provides a standardized communications facility between a client and a server. The automation object component of OLE provides Object Oriented Programming facilities in this client/server environment. The server provides specific computational skills through object classes. The client asserts how the skills are used by creating objects and accessing their members. OLE provides the communication link between the client and server. To understand automation objects, it is necessary to have a basic understanding of Object Oriented Programming concepts. Objects are identifiable and unique entities that can be created based on an object class. Classes define a related set of properties (data) and methods (functions). Hence, all objects of the same class have the same set of properties and methods, though each object might have different values for its properties. OLE Automation and InTouch 1-3

InTouch OLE Automation Client Extensions

InTouch extensions provide easy access to automation objects using three primary components: Eight additional built-in functions have been added to InTouch. OLE_CreateObject OLE_IsObjectValid OLE_GetLastObjectError OLE_ReleaseObject OLE_GetLastObjectErrorMessage OLE_ResetObjectError OLE_IncrementOnObjectError OLE_ShowMessageOnObjectError Standard InTouch function templates and online Help for these functions are available through the System and Help buttons, respectively, in the Functions box of the Script Editor dialogs. A unary operator indicates the start of an OLE Automation expression. An InTrack OLE Browser provides templates and online Help for all InTrack automation object classes. The Browser is accessed through the InTrack OLE button in the lower right corner of the Script Editor dialogs.

InTouch Automation Expressions

All references to automation objects within InTouch start with a percent sign and are followed by a name that identifies the object reference. The name must start with an alpha character and can consist of alpha, numeric and underscore characters. Names are case insensitive and global. Examples of different object names are: %ObjectName (or %objectName or %objectname) %Lot5 %lot_5 %aMachine %A_Machine %Sublot Do not confuse object names with InTouch tagnames. You can have an OLE Automation object and an InTouch tag with the same name (except for the percent prefix).

Object References

These “percent names” are specifically referred to as object references because they are pointers to automation objects. Two different names can access the same object using the following InTouch script statement: %Object1 = %Object2; After executing this statement both object references “point” to the same automation object. Object reference names are automatically defined when first used during runtime. They are global—you can initialize them in one script and use them in another script. As with most object-oriented programming languages, the “dot” operator is supported for referencing the properties and methods of an object. The following example shows the use of the dot operator to set an object property to the value 5: %Object.Property = 5; 1-4 Chapter 1

Nested Objects (Dot Operators)

If objects are members of other objects, the “dot” operator can be used multiple times. Setting the property of a nested object to the value 6 would appear as: %Object.Property_For_Nested_Object.Property = 6; There are a few specific rules for working with the dot operator: 1. No embedded spaces can be placed within the specification of the object reference and any member references: • No space between the percent sign and the start of the object reference name. • No space between the object reference name, the “dot” operator and the name of the class member. • No space between the property name of a nested object, the “dot” operator and the name of the property of the nested object. 2. The number of characters for the entire specification cannot exceed 98 counting from (and including) the percent sign to the last member reference. For example, the length of the specification %Object.Property is 16 characters, and the length of the specification %Object.Property_For_Nested_Object.Property is 44 characters.

Data Type Conversions, InTouch to OLE

Not all InTouch data types are supported by the OLE extensions. The following summarizes the supported data types and data conversions. Note that the conversion occurs at runtime and not in WindowMaker. Hence, the data conversion can cause unexpected results with no error reported.

Integer 32-bit signed value. Converts to the following data types: To Real The value is floated. To Message Standard conversion to a sequence of decimal digits - possibly prefixed by a minus sign. To Discrete Converts to TRUE (1) if value is not zero, else FALSE (0). Real 64-bit resolution. InTouch computes using 64-bit resolution but stores the results in 32-bit resolution tags. The automation object interface works with the higher resolution. Converts to the following data types: To Integer The real value is truncated. To Message Standard conversion to a sequence of decimal digits and decimal point possibly prefixed by a minus sign. To Discrete Converts to TRUE (1) if value is not zero, else FALSE (0). OLE Automation and InTouch 1-5

Message A string limited to 131 characters (InTouch constraint). Data conversions are more complex for this data type and are a more likely source of runtime errors. To Integer Same as the InTouch built-in function StringToIntg. If the string starts with a number (ignoring spaces but including a minus sign) the number is converted. Anything else results in a zero value. To Real Same as the InTouch built-in function StringToReal. If the string starts with a number (ignoring spaces but including a minus sign) the number is converted. Anything else results in a zero value. To Discrete Converts to an integer then applies rule to convert an integer to a discrete. To Object Reference This conversion is needed only in a few very special cases and should be avoided. Misuse of this conversion facility can cause WindowViewer to exit with a fatal error. This conversion will report an error with any input other than a string generated by conversion of an object reference. Discrete Converts to the following data types: To Integer One if TRUE, else zero. To Real One if TRUE, else zero. To Message “0” for False and “-1” for True. Object Reference In general, object references should not be used in any context where data conversion might occur. Converts to the following data types: To Message A specially formatted string that includes the hexadecimal representation of the object reference.

Restrictions

Two important restrictions apply to InTouch automation object extensions: Extensions are available only from within InTouch scripts. The extensions use “late binding”—most errors cannot be identified until the script has been executed. 1-6 Chapter 1

Creating an Object

Automation objects are created via the InTouch built-in system function OLE_CreateObject. The syntax for this function is: OLE_CreateObject(%Object, “className”); where: OLE_CreateObject The function that creates the automation object %Object Name used to reference the automation object className The name of the class provided by the OLE Server This function has no return value.

Example For example, to create an object of the InTrack class Sublot the statement would be: OLE_CreateObject(%Sublot, “InTrack.Sublot”); Misspelling “className” is a frequent error that cannot be identified within WindowMaker. The error will not be identified and reported until you execute the function in WindowViewer To avoid misspellings, use the OLE_CreateObject templates found in the InTrack OLE Browser. When an object is first created, its properties are automatically set to applicable defaults by the server.

Note: An object reference name does not require initialization with a call to OLE_CreateObject. In a previous example an assignment statement was used to associate an object reference with an object. OLE Automation and InTouch 1-7

Managing an Object

An object is valid as long as at least one object refers to it. However, it is good practice to release an object that is no longer in use to conserve system resources. To release an object: 1. Create a new object with the same object reference name. When you create a new automation object with the same name as an existing automation object reference, the original automation object is released and the new object is associated with the original name. For example: OLE_CreateObject(%Object, “InTrack.Sublot”); OLE_CreateObject(%Object, “InTrack.DateTime”); The first statement causes an object of class Sublot to be created and referenced by %Object. The second statement releases the object of class Sublot, then creates an object of class DateTime and associates it with %Object. 2. Use the built-in OLE_ReleaseObject system function. The syntax for this function is: OLE_ReleaseObject(%objectName); where: %objectName The name of the automation object reference There is no return value for this function and it never fails. 3. Set a reference to a second object. The syntax to set an automation object to another automation object is: %object1 = %object2; where: %object1 Is the object reference to be “pointed” to the same object as %object2. The automation object previously associated with %object1 will be released. %object2 Automation object to reference with the name, %object1. It must be of the same type. In this example any object associated with %object1 is released.

Testing for a Valid Object

After the relationship between an object reference and an OLE Automation object has been broken via the OLE_ReleaseObject function, the reference is “invalid.” Using an invalid reference in any object expression will result in an error at runtime. An InTouch built-in system function OLE_IsObjectValid enables validity checking of an object reference. The syntax for this function is: OLE_IsObjectValid(%objectName); where: %objectName The name of the automation object reference to release from memory This function returns a discrete (Boolean) value indicating if the %objectName is currently bound to a valid automation object. 1-8 Chapter 1

Getting a Property Value

A property is a named attribute that defines an object’s characteristics or an aspect of its behavior. The dot operator separates the object reference from the name of the property. When a tag is allowed in an InTouch script, the following syntax can be used to return the value of an automation object’s property: %Object.Property where: %Object Automation object reference Property An object attribute If the property of an object is itself an object, the “dot” operator can be used multiple times; as in the following example: %Object.Property1.Property2 where: %Object Automation object reference. Property1 A property of %Object. Note that the property can be an embedded object or a reference to another object. InTouch and OLE automatically handle both cases. Property2 A property of the nested object from which a value is to be retrieved. Using multiple dots translates into multiple “get property” operations. In this example a simple “get” is done for %Object.Property1, which, according to OLE Automation standards, returns a reference to the nested object. This returned reference is used to perform another simple “get” for Property2. This could be performed manually with two InTouch script statements: %tempObject = %Object.Property1; %tempObject.Property2; This sequence of actions is important for several reasons: 1. Errors resolving property names can occur for each dot operator. 2. Multiple dots can be used in a variety of contexts to simplify coding, such as getting properties, setting priorities and calling methods.

Example 1 The goal is to increment an InTouch tag value if it is the first day of the month between 1:00 a.m. and 2:00 a.m. This code fragment illustrates several concepts: OLE_CreateObject(%DateTime, "InTrack.DateTime"); %DateTime.SetLocalTime(); IF (%DateTime.Day == 1) AND (%DateTime.Hour > 1) AND (%DateTime.Hour < 2) THEN Tag=Tag+1; ENDIF; OLE_ReleaseObject(%DateTime); OLE Automation and InTouch 1-9

Example 2 This example illustrates use of the multiple “dot” operator. The goal is to get some capacity information about a machine resource into InTouch tags for displaying to an operator. The example is highly contrived, but illustrates getting properties in a variety of InTouch expression contexts. For simplicity, it is assumed that the object %Machine has been created as an instance of InTrack.Machine, and that appropriate information has been loaded from the InTrack database (the mechanics of this are described in later sections). NumerUnitsTag = %Machine.Capacity.Quantity; TypicalWeightTag = %Machine.Capacity.Quantity * 40.6; ContrivedLoadingTag = Log(%Machine.Capacity.Quantity) + 1; UnitsNameTag = %Machine.Capacity.Units; 1-10 Chapter 1

Setting a Property

The value of an input or output object property can be set using three methods: Use an assignment statement (described in this section). Pass the property reference as an output parameter to a method. Call a method to set one or multiple properties of an object in a single action (new values are passed as parameters). These facilities are class specific. Refer to the method references in the chapters that follow for more information.

Note References to properties of automation objects cannot be passed as “by reference” (output) parameters to DLL functions called from InTouch scripts. The value of an object property cannot be changed by a DLL function.

The basic syntax for setting an object property value through an assignment statement is as follows: %Object.Property = Value; where: %Object Automation object reference Property An object attribute Value Value that you want to assign to the object attribute As with getting object properties, if the property of an object is itself an object, the “dot” operator can be used multiple times: %Object.Property1.Property2 = Value; where: %Object Automation object reference Property1 A property of %Object that is of type object Property2 A property of the nested object that is to have its value set This one InTouch statement using multiple “dot” operators is equivalent to: %tempObject = %Object.Property1; %tempObject.Property2 = Value;

Example The first line of this example creates an automation object of the Amount class named %PrimaryAmt. The second and third lines of script set the %PrimaryAmt automation object’s Quantity property to “100” and the Units property to “each.” OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); %PrimaryAmt.Quantity = 100; %PrimaryAmt.Units = “each”; OLE Automation and InTouch 1-11

Calling a Method

Calling a member method of an automation object is the typical way a client asks the server to do work on its behalf. The following syntax illustrates how to call a method on an automation object: resultValue = %Object.Method(Parameter1, Parameter2, ...); %Object.Method(Parameter1, Parameter2, ...); where: resultValue A data value returned by the method. %Object Automation object reference. Method Action performed by the automation object. Parameters Information to be passed into or returned from the method. The number of parameters is defined by the method being called. Parameters can be read only or input/output.

Restrictions

The following restrictions apply to calling methods: Methods can be called as a “subroutine” (no return value). If the method does return a value, it is discarded. If a return value is to be used, it must be assigned unmodified. The method call cannot be a term in an expression. Typically, script execution is blocked until the method returns from processing, unless the method performs transactions that require user interaction through dialogs. You must insure that the correct number of parameters is passed. There is no support for OLE “optional” parameters. 1-12 Chapter 1

Parameter Types

Some restrictions apply to the types of data that can be passed to an Automation method from InTouch.

Data Type May be represented as a

Integer Constant, expression, read-only tag, read/write tag, or read/write OLE Automation property Real Constant, expression, read-only tag, read/write tag, or read/write OLE Automation property Message Constant, expression, read-only tag, read/write tag, or read/write OLE Automation property Discrete Constant, expression, read-only tag, read/write tag, or read/write OLE Automation property Object Object reference name or read/write OLE Automation property

Note that some methods are “polymorphic,” and can take several different types of data for the same parameter. InTouch supports this facility for input-only parameters.

Output Parameters

InTouch does not differentiate between method parameters that are input only and input/output. If the parameter can be updated, a value is stored into it. A parameter can be updated if: The parameter is the name of a read/write InTouch tag. The parameter is an object reference name. The parameter specifies an object property. In the following InTouch statement the first three parameters will be updated, since each meets the corresponding option listed above. The other parameters will not be updated. %Obj1.Method(tag1, %obj2, %obj3.property1.property2, tag1 + 3, %obj4.property + 0); OLE Automation and InTouch 1-13

Return Values

To capture the return value of a method, the left side of the assignment must be: The name of a read / write InTouch tag. An object reference name. An object property specification.

Example 1 Assume that an automation object of class SerialNumbers has been created and named %SerialNumbers. The following script statement will add the serial number “1234” to the serial numbers in the %SerialNumbers collection object: returnCode = %SerialNumbers.Add(“1234”);

Example 2 Assume that an automation object of the Sublot class has been created and named %Sublot_Object. You want to use the Sublot Ship method, which contains two parameters that are automation objects, %PrimaryAmt and %SecondaryAmt: ReturnCode = %Sublot_Object.Ship (%PrimaryAmt, %SecondaryAmt, “customerName”) ; where: %PrimaryAmt Amount objectidentifying the primary quantity to ship %SecondaryAmt Amount automation object identifying the secondary quantity to ship customerName Name of the customer receiving the shipment

Sample You want to ship 100 manuals (primary amount), each weighing 2 pounds (secondary amount) to a customer (Wonderware). You must create the parameter automation objects, %PrimaryAmt and %SecondaryAmt, and set their properties, before you can call the Ship method. Each step is outlined below: 1. Create an Amount object to represent the primary quantity and set the properties: OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); %PrimaryAmt.Quantity = 100; %PrimaryAmt.Units = “each”; 2. Create an Amount object to represent the secondary quantity and set the properties: OLE_CreateObject(%SecondaryAmt, “InTrack.Amount”); %SecondaryAmt.Quantity = 2; %SecondaryAmt.Units = “pounds”; 3. Call the Ship method on the %Sublot_Object using the following syntax: returnCode = %Sublot_Object.Ship(%PrimaryAmt, %SecondaryAmt, “Wonderware”); 1-14 Chapter 1

InTouch Error Handling

When handling errors, determine if the error was caused by using OLE Automation incorrectly, or if the error was returned from the OLE server. InTouch identifies OLE errors in a message box and records them in the WWLogger. InTouch script execution is not terminated by an OLE error. The action taken depends on the task at the time of the error: If it occurs during a get property operation, zero or an empty string is returned for the properties value. If it occurs on a set property operation, the property value is not changed. If it occurs on a method call, the method is not invoked, no changes are made to any parameter values, and the return value for the method is zero or an empty string. To assist with error handling, five system reporting functions are provided: OLE_GetLastObjectError OLE_GetLastObjectErrorMessage OLE_ResetObjectError OLE_ShowMessageOnObjectError OLE_IncrementOnObjectError Details for these functions are provided below.

OLE_GetLastObjectError

To get the error number for the last reported error through the Microsoft “last error” variable: value = OLE_GetLastObjectError(); where: value Is an integer into which the error number is stored. Error numbers are internally unsigned 32-bit integers. InTouch does not have the same integer range, so error codes that use high-order bits will not be returned correctly.

OLE_GetLastObjectErrorMessage

To get the error message (description) for the last reported error: value = OLE_GetLastObjectErrorMessage(); where: value Is a string (message) set to the error message. This text also is presented in the error message box. It contains embedded carriage return and line feed characters. If the text exceeds the 131-character string limit imposed by InTouch, the message is truncated. OLE Automation and InTouch 1-15

OLE_ResetObjectError

The value of the “last error” is changed only when an error occurs. It is not reset upon successful completion of an OLE Automation action. In some cases application development is made easier by setting the “last error” to a known state, performing several OLE Automation actions, then testing for a change in the “last error” value. This function will set the Microsoft internal “last error” value to zero. The syntax for this function is: OLE_ResetObjectError();

OLE_ShowMessageOnObjectError

This function controls the display and required operator input when an OLE interface error or OLE exception occurs. While this message box is displayed, the script that caused the error is blocked from running until the message box is acknowledged (for example, the OK button is clicked). Background scripts will continue to execute. An OLE interface error involves a failure to communicate with the Microsoft OLE infrastructure provided by the -NT operating system. It does not reflect a processing error identified by an OLE server. An OLE exception can be caused either by the OLE infrastructure or OLE server. The syntax for this function is: OLE_ShowMessageOnObjectError(discreteTag); where: discreteTag Defines the name of the Boolean (discrete) value that indicates whether to display a message box to a user if an OLE error or exception occurs, where: -1 = display message box (default) 0 = do not display message box The following script disables the display of the OLE error message box for a call to the Create method of the object %Lot. After the method call, the OLE error message box is re-enabled for display on any subsequent error. OLE_ShowMessageOnObjectError(0); %Lot.Create("abc"); OLE_ShowMessageOnObjectError(1); 1-16 Chapter 1

OLE_IncrementOnObjectError

This function increments an integer tag if an OLE interface error or OLE exception occurs.

Note If the OLE_ShowMessageOnObjectError function is executed with the discrete tag enabled, the value is incremented after the OLE error message box is displayed and acknowledged.

An OLE interface error involves a failure to communicate with the Microsoft OLE infrastructure provided by the Microsoft Windows-NT operating system. It does not reflect a processing error identified by an OLE server. An OLE exception can be caused either by the OLE infrastructure or OLE server. The tag specified by this function will be incremented on each error until another call specifies a different tag. The tag is not remembered across executions of WindowViewer. The syntax for this function is: OLE_IncrementOnObjectError(integerTag); where: integerTag Defines the name of the integer tag to be incremented upon error or exception. The following script increments the value of the variable referenced by the errorCount tag by 1 each time an OLE interface error or OLE exception occurs. OLE_IncrementOnObjectError(errorCount); OLE Automation and InTouch 1-17

Frequent Automation Object Errors

Frequent errors when using InTouch OLE Automation extensions and their remedies are listed below. OLE object reference name has not been defined. An object reference name has been used to reference a property (%object.property) or call a method (%object.method(parameter) ) before being associated with an object. Check that the object reference name is not misspelled. Verify the name associated with an object by using the InTouch system function OLE_CreateObject or by assigning one object reference to another. Unknown property or method name. Verify that the property or method name is spelled correctly. Attempt to update read-only property. This error is obvious when the read only property is on the left side of an assignment statement. It is more difficult to spot when it is being updated as a return parameter from a method call. Type mismatch. The data being passed as a parameter for update is not correct. This indicates that automatic data conversion does not have enough information to take the correct action. Manually assign the data to an InTouch tag of the correct type and use the tag. Invalid class string. This generally indicates that the class name (second parameter) in an OLE_CreateObject function call is misspelled. Parameter not optional. Check that the correct number of parameters is being passed. Unexpected results but no error reported. Data type conversion is performed at runtime. Accidentally assigning a string to an integer would not generate an error; however, you may get a result of zero if the string does not start with digits. Object reference path element is not an OLE object. When using multiple “dot” operators, this error occurs if one of the properties in the path is not an embedded object or object reference. 2-1

CHAPTER 2

InTrack OLE Automation Server

InTrack runtime architecture consists of five primary components: An MES Tracking Application This InTouch HMI application can perform both MES Tracking tasks and manufacturing control/operator interface tasks. Microsoft OLE support facilities InTrack OLE Automation Server Implements a controlled gateway between the MES application and the RDBMS where the tracking data is maintained. Relational Database Management System (RDBMS) This system maintains InTrack MES tracking information. MES modeling and tracking information stored in RDBMS tables. The InTrack OLE Automation server implements a variety of automation object classes. These classes provide convenient mechanisms for performing MES tracking operations that update the database. Additional classes organize temporary MES tracking information in memory and retrieve information from the RDBMS. The InTrack tables maintained within the RDBMS are part of the InTrack public interface. You are free to use a variety of RDBMS query and reporting tools to access this information.

Caution: Never modify an InTrack RDBMS table or its contents directly. Doing so will damage the integrity of the InTrack database, resulting in unrecoverable failure of tracking applications.

The InTrack OLE Automation Server consists of several Microsoft Dynamically Linked Libraries (DLLs). The most visible of these is TRACKOBJ.DLL, the entry point for the implementation of the OLE Automation Interface. This DLL file name might appear in messages associated with OLE Interface errors.

Contents InTrack Concepts, 2 Type Library, 7 Overview of InTrack OLE Automation Classes, 8 MES Application Development Notes, 12

2-2 Chapter 2

InTrack Concepts

The information InTrack maintains in the RDBMS tables can be divided into two categories: Structural Information used to model the components and structure of your manufacturing processes. Tracking of materials and resources is performed within the context of this model. Activity Data collected during the operation of the factory that reflects the state of material and resources. The InTrack OLE Automation Server supports the collection and validation of activity information, and records information into the database. The server also provides facilities to reduce the effort required to implement MES tracking applications. To identify information within the database, the InTrack server uses specially formatted strings (messages) referred to as keys. The format of these keys is described in the following sections.

Structural Information

InTrack ModelMaker or OLE Automation can be used to build a description of your factory. A structural description of your factory can be built manually with InTrack ModelMaker or automated using the InTrack OLE Automation interface. The processes are identical, although the syntax may vary. For example, the InTouch statement “OLE_CreateObject…” would be expressed as “Dim db as new…” in . Structural objects are stored in the RDBMS. They are separate from the OLE Automation objects used by the MES Application Client, also described in this book. For more information on modeling objects, see Chapter 5, "Structural Objects." To perform manufacturing tracking, it is often necessary to identify specific structural objects. When using InTrack automation objects, use a ModelKey. This key (string) has the same format as names used in Model Maker. For example: The disposition code structural object named “ok” has the ModelKey “ok” The material structural object named “Cookies” has the ModelKey “Cookies” The material key is Name[version]. The work instructions structural object named “Mixing[1.4]” has the ModelKey “Mixing[1.4]” InTrack OLE Automation Server 2-3

Activity Information

Working with activity information is the primary function of the InTrack OLE Server. This section will discuss a few of these concepts and their relationships to InTrack automation objects.

Material Tracking

Two concepts form the core of material tracking: Lot Represents a quantity of material being tracked and identified by a unique name. Sublot Identifies the location or process state of some, or all, of the material associated with a lot.

LOT ID: x15 Quantity: 180

SUBLOT SUBLOT SUBLOT SUBLOT Location: receiving Location: shop1 Location: ship1 Location: shipping WIP: WIP: milling:setup WIP: repair:1 WIP: Quantity: 25 Quantity: 110 Quantity: 5 Quantity: 40 A lot always has one or more sublots associated with it. The above illustration and description that follows show how the material for a single lot can be distributed across locations and manufacturing states. The lot named “x15” has a total quantity of 180 items distributed across four sublots. 1. 25 items are located in “receiving”. The lack of a WIP (work in progress) state indicates that these items are in inventory. 2. 110 items are at location “shop1” and its manufacturing state is identified by a WIP indicating route “milling” at the step named “setup”. 3. Five items are at location “shop1” and its manufacturing state is identified by a WIP indicating route “repair” at the step named “1”. 4. 40 items are in inventory location “shipping”.

Lot Keys

To identify lots and sublots within the database, the InTrack server uses special keys. The key used to identify a lot within the database is a simple name referred to as a Lot_ID. In the above example the Lot_ID is “x15”, so the LotKey would be “x15”. 2-4 Chapter 2

Sublot Keys

The keys for sublots are more complex. They have the general form: “Lot_ID@route_name[route_version]:route_step@location” ; where: Lot_ID Lot identification number. For bulk inventory, the lotID is composed of a material name and version information in the following format: material[version] route_name Name of the route to which the sublot is assigned (only for identifying WIP lots) route_version Route version (optional) route_step Route step where the sublot is currently processing location Physical location of the sublot (optional) For the diagram on the previous page, the following keys would be used: 1. x15@receiving 2. x15@milling:setup@shop1 3. x15@repair:1@shop1 4. x15@shipping The InTrack server provides two automation classes for accessing lot and sublot information, Lot and Sublot. Note that creating an automation object does not create corresponding information in the database. The automation objects provide a way to communicate with the database. To create an automation object of the Lot class, you could use the InTouch statement: OLE_CreateObject(%Lot, “InTrack.Lot”); To create a material to be tracked as a Lot in the database, use the method: %Lot.Create(“x15@shipping”, … ); (a more detailed example is provided in the reference section for this method). When you use the Create method of the Lot class to create a new lot activity object in the database, a new sublot object also is created. Similarly, if you use the Create method of the Sublot class and give it a name for a lot that does not exist, a new lot also is created in the database. Because process and location tracking is performed at the sublot level, the Sublot class contains methods for changing the state of the material. Understanding these methods is the starting point for any MES application developer. InTrack OLE Automation Server 2-5

Resource Tracking

Resource tracking is provided for machines and users. In both cases the resource to be tracked must be a structural object in the InTrack database. Machine tracking is performed using the Machine class. Tracking is provided for: Machine repair Machine maintenance, called tasks Machine status For machine status tracking, there is some overlap of functionality between Sublot class methods and those of the Machine class. Depending how you choose to do resource tracking, considerable application development effort can be saved by using one group over the other.

Data Collection

Collection of data, not related to material consumption, is performed using data set templates defined in ModelMaker or entered in the InTrack database using OLE Automation. These templates can be used in three contexts: Related to a specific sublot. Data collected using this facility can be used to determine if the data collection requirements for an operation have been met. Related to a specific machine. Data collection requirements are not enforced for machines. Ad hoc data collection. Information can be collected at any time and saved. A single set of collected data is called a sample. The DataSetSample object class is used to construct new samples, access existing samples, or modify existing samples. 2-6 Chapter 2

Using Keys

In the above descriptions, the concept of keys has been described as the notation for identifying information in the database. The InTrack automation objects are designed to use this key information to simplify MES application development. Rather than require that a key be passed with each method call that involves a database transaction, the key is maintained as a property of the automation object. This way, one automation object can be created, its key property initialized, and several different methods can be invoked on that object without having to manually update the key. In the following example, the Sublot key is specified once, then three standard operation transactions are performed in sequence: %Sublot.SublotKey = "x15@receiving"; %Sublot.Start( … ); %SubLot.Consume( … ); %Sublot.Complete( … ); Another advantage of keys is that a single automation object can be used to access information on different database objects. In the following example, the total quantity of material in inventory for the above Lot diagram is computed: %Sublot.SublotKey = “x15@receiving”; %Sublot.Load(); total = %Sublot.QueuedAmt.Quantity; %Sublot.SublotKey = “x15@shipping”; %Sublot.Load(); total = total + %Sublot.QueuedAmt.Quantity ; InTrack OLE Automation Server 2-7

Type Library

The InTrack Automation Server has an associated Type Library (InTrack_Automation) embedded in the InTrack Automation Server (TRACKOBJ.DLL). The type library describes all ActiveX objects that are available via the Automation Server. By accessing the type library, development environments, applications and object browsers can determine the characteristics of any InTrack Automation object. Detailed information is available on all Interfaces and associated properties, methods, and events; including method parameter and return types. Using a type library to access Automation Objects is approximately two times faster than accessing them through the standard IDispatch Interface without type information. For details on using type libraries, consult your respective development environment on how (and if) you can use type libraries to aid in the development process. 2-8 Chapter 2

Overview of InTrack OLE Automation Classes

InTrack OLE Automation classes are grouped into six categories. These categories are reflected in the organization of the reference section of this book, the InTrack OLE Browser provided within InTouch and the on-line help. Each object can be defined through InTouch or through an OLE interface. The same naming convention is used for all objects in all automation classes. For example, an amount object used to pass quantity information in a variety of methods, would be identified as:

Object Name: InAmount Interface Name: IInAmount InTouch Object Name: %Amount The automation objects are named consistently throughout InTrack. Likewise the methods of these objects use the same names throughout. For example, you will find Add and Load methods in many different object classes.

Application

This category contains only one class: Database. You must have one, and only one, instance of this class in any InTrack tracking application. Two unique properties of this class, BackDate and Comment, have values that are automatically applied to any database transaction (regardless of class or method). These properties are seldom needed, so including them as parameters in every method that performs a transaction would be inconvenient. The Database object class also includes some critical methods:

Connection Methods (Connect, Disconnect)

These methods access the RDBMS used to store the InTrack tables. Computationally expensive operations, they should be called only once – when the tracking application starts and when it shuts down.

User Access Control Methods (UserLogon, UserLogoff)

These database methods identify the operator on transaction logs and ensure transaction security.

Transaction Control Methods (BeginTrans, CommitTrans, RollbackTrans)

Transaction control methods provide direct control over database transaction. All methods placed between the BeginTrans and Commit Trans method are treated as a single transaction set, committed only after the CommitTrans method is passed. The RollbackTrans method is used to undo previous commitments. It cancels all commands that have been started, but does not affect transactions that have been completed previously. InTrack OLE Automation Server 2-9

User-Defined Table Access Methods (GetUDA, GetUDAType, GetUDAValue, SetUDAType)

The UDA methodsaccess to and update the values stored as user-defined attributes (a facility for user extension of InTrack RDBMS tables). They also are found in other automation classes.

General

This category contains a variety of classes that organize information used by other classes. For example: Specification of quantities, units and serial numbers. Encoding for dates and times. Enumeration of Sublots to be used in specific transactions. Selectors to let plant operators choose sublots or machines from a list. Some of these organizational classes known as “Collections” and “Selectors” have special characteristics.

Collection Classes

Collection classes are specialized classes that enable the processing of multiple objects. For example, materials used in a manufacturing route may be consumed at the same step, or as part of the same transaction. A ConsumeItem object would be created for each material consumed. In order to allow processing of multiple items, the collection object ConsumeItems can be created, then populated with individual items (using the Add method). When established, collection objects enable processing of multiple objects as a group, instead of individually. Generally, to identify a collection class, the letter “s” is appended to the object name (ConsumeItems is a collection of ConsumeItem objects, DisassembleItems is a collection of DisassembleItem objects, etc.). Create and use collection classes to save time during scripting. 2-10 Chapter 2

Structural

The automation classes in this group represent the structural objects that can be defined in an InTrack database. Methods of these object classes can be used to create structural database objects, just as they would be created using the ModelMaker editors. The classes are: CustomerSpecification DataSetTemplate DispositionCodes Location Machine Material Operation Route SetpointTemplate User WorkInstructions

Import API

Import API objects provide an OLE interface to InTrack objects. Standard ModelMaker objects can be created in Visual Basic or other program languages, then imported into the InTrack system. The ImportAPI object corresponds directly to the structural object. For example, InLocation is the import API equivalent of the Location object.

Activity

The automation classes in this group form the core of the MES tracking. Each was described in the concepts section above: Lot Sublot DataSetSample

Dialog

InTrack runtime provides a set of Windows dialogs from which a factory operator or supervisor can perform any database transaction. Each dialog is accessed by its own OLE Automation class. One dialog class supports the InTouch Selector window control. This control displays lots or machines an operator can choose to perform an action. Selectors, when combined with dialog classes, can reduce the effort needed to develop an MES tracking application. Examples of combining these facilities can be found in the scripts associated with the InTrack Wizard buttons within InTouch. InTrack OLE Automation Server 2-11

Query

This large collection of classes provides quick and easy access to much of the information contained in the InTrack database tables. Many are specifically structured to provide information required by Sublot and Machine methods. There also is a general query class, Query.SQL, that supports access to all information in the InTrack database. All query classes operate in the same basic manner: 1. A Query method that takes parameters filters how much information is returned. The result of the query is a set of rows that can be examined. The number of rows found is stored in the property RowCount. 2. After the Query method has completed, information from each row can be accessed by calling the SetRow method. This method loads the values of class properties to reflect the corresponding information from the database. The Index property is set to indicate which row is currently loaded into the other object properties.

2-12 Chapter 2

MES Application Development Notes

This section addresses topics related to the implementation of an MES application using the InTrack OLE Automation Server.

Database Transactions

The InTrack MES data is always held in RDBMS tables. Retrieving a copy of this information into an InTrack automation object involves performing a database transaction. For example: 1. Create an automation object of the InTrack class Sublot: OLE_CreateObject (%Sublot, “InTrack.Sublot”) ; 2. To identify the sublot for which you want information, set the SublotKey property. %Sublot.SublotKey = “Lot-123@waterroute[1]:step1@location1”; 3. Call the Load method to have the InTrack Automation Server perform a database transaction that sets the automation object’s properties with information from the database: %Sublot.Load(); The above example assumes that the specified sublot has been created within the database. Remember, automation objects are gateways, not the database objects themselves.

Example — Creating and Starting a New Sublot

The following example creates a new sublot in the MES database and starts it at the first operation of its manufacturing route: 1. Create aSublot object to be used as the gateway to the MES data. OLE_CreateObject(%Sublot, “InTrack.Sublot”); 2. Set the SublotKey property for the unique key to access this sublot in the future. %Sublot.SublotKey = “Lot-12345@waterroute[1]:step1@location1”; 3. Call a Create method of the Sublot object. This call causes the InTrack Automation Server to perform a database transaction. returnCode = %Sublot.Create(“Sparkling”, %PrimaryAmt, %SecondaryAmt, 10, "", "", "", %DueDate); 4 The same automation object can be used to start the sublot at the first route step. This method also causes a database transaction. returnCode = %Sublot.Start(%PrimaryAmt, %SecondaryAmt, 1); InTrack OLE Automation Server 2-13

Example — Grouping Individual Transactions

For some special tracking applications it is necessary to exercise control over database transactions; that is, to group several method calls (which would normally be one transaction each) into a single transaction. This can be done by using three methods of the Database class: BeginTrans, CommitTrans, and RollbackTrans. The above example could be rewritten to perform one database transaction instead of two: 1. Create a Sublot object used as the gateway to the MES data. OLE_CreateObject(%Sublot, “InTrack.Sublot”); 2. Set the SublotKey property for the unique key to access this sublot in the future. %Sublot.SublotKey = “Lot-12345@waterroute[1]:step1@location1” ; 3. Assert control of database transactions. %Database.BeginTrans(); 4. Call the Create method. No transaction is performed. returnCode = %Sublot.Create(“Sparkling”, %PrimaryAmt, %SecondaryAmt, 10, "", "", "", %DueDate); 5 Call the Start method. No transaction is performed. returnCode = %Sublot.Start(%PrimaryAmt, %SecondaryAmt, 1); 6. Assert that database transactions for Create and Start should be performed as one transaction. %Database.CommitTrans();

2-14 Chapter 2

Handling InTrack Errors

There is a difference between OLE errors and errors identified and reported by the InTrack OLE Automation Server. There are few conditions in which InTrack server errors can occur: Setting an object property to an invalid value. For example setting the month property of an object of the Date class to 13. This form of error will cause an OLE Exception (similar to what the OLE does when attempting to set the value of a read only property). Calling a method and passing invalid data for a parameter. This error is reported by a “return code” described below. Violating a manufacturing constraint. Manufacturing constraints are defined in Model Maker or are built-in manufacturing rules in InTrack. Environmental problems occurring during a transaction with the database. This could include: The RDBMS is down or off-line. The network is down. An object of the Database class has not been created and connected to the RDBMS. These kinds of conditions are also reported through a return code.

Return Codes

A return code is an integer returned by a method to indicate if its work was completed successfully or if there was an error. A return code of zero indicates success. In a few cases the return code is a method output parameter. It usually is returned as the value of the method, in the form: returnCode = %Database.Connect(“Supervisor”, “Authority”); A description for any error (i.e., a returnCode value) can be retrieved with the GetErrorMessage method of the Database class. InTrack OLE Automation Server 2-15

Working with Collection Objects

Collection automation objects let you work with a set of similar automation objects as a single group instead of as single entities. Collection objects have standard properties and methods. A standard collection object property is the Count property, which identifies the number of items in the collection. Standard collection object methods include Add, Remove, and Item. Use the Add method to add an individual automation object to a collection. Use the Remove method to remove an individual automation object from a collection. The Item method locates a specific automation object within the collection through an index number.

Note: Adding an object to a collection adds a reference, the contents of the object are not copied.

Example — Using a StartItem Object Collection to Start Machines

Aa StartItem object identifies the type and amount of a material processed in a Start method of a Machine object. If you have four StartItem objects (%StartItem_Object1, %StartItem_Object2, %StartItem_Object3, and %StartItem_Object4), you could pass each one into the Start method separately or you could create a collection object (%StartItems_ObjectA) to process all four automation objects as a single entity. 1. Use the following script to add %StartItem_Object1, %StartItem_Object2, %StartItem_Object3, and %StartItem_Object4 to StartItems_ObjectA. returnCode = %StartItems_ObjectA.Add(%StartItem_Object1); returnCode = %StartItems_ObjectA.Add(%StartItem_Object2); returnCode = %StartItems_ObjectA.Add(%StartItem_Object3); returnCode = %StartItems_ObjectA.Add(%StartItem_Object4); %StartItems_ObjectA now contains references to all four automation objects: %StartItem_Object1, %StartItem_Object2, %StartItem_Object3, and %StartItem_Object4. 2. The following script removes the reference to %StartItem_Object1 from %StartItems_ObjectA: returnCode = %StartItems_ObjectA.Remove (%StartItem_Object1) ; %StartItems_ObjectA now contains only three automation objects: %StartItem_Object2, %StartItem_Object3, and %StartItem_Object4. When %StartItems_ObjectA is complete, you can use it in the Start method of a Machine object, named %Machine_Object in the following script: returnCode = %Machine_Object.Start(%StartItems_ObjectA); When you call this Start method, InTrack automatically processes the three StartItem automation objects in %StartItems_ObjectA without further intervention. 3. The Item method lets you view an individual item in a collection. Select the item you want to view with an index number. To view the first item in %StartItems_ObjectA, use the following syntax: returnCode = %StartItems_ObjectA.Item(1);

Object Creation

Creating automation objects (using the OLE_CreateObject function) can be computationally expensive. A good technique to minimize this cost is to create the objects needed at application startup and release them on application exit. 2-16 Chapter 2

The design of InTrack OLE Automation classes facilitates this approach. The same object of class Sublot can be used to access and update different database sublots simply by changing the SublotKey property.

Working with InTouch Selectors

InTrack extensions to InTouch include “selector” facilities to simplify application development. The function of a selector is to present an organized list of lots, sublots or machines. A plant operator can choose a member from this list for use in an InTrack transaction. Selectors have two components. 1. An InTouch selector wizard that can be placed in a window with a display of information in spread sheet format. 2. An automation object that can be “attached” to a selector wizard. The object can be used to configure the displayed and get the results of operator selections. For more information on Selector automation objects, see Chapter 4, “General Objects.” Additional examples of working with selectors can be found in the InTouch scripts associated with InTrack wizards.

Working with InTouch Dialogs

InTrack Dialog automation objects provide a set of Windows dialogs from which an operator can perform any database transaction not involving serial numbers. Using these dialogs on a fully or partly serialized lot will fail. Three steps are standard for these dialogs: 1. Create an automation object for the needed dialog. 2. Set its properties to reflect the lot, sublot, or machine on which the dialog is to work.

Note Setting the key property to indicate the lot, sublot, or machine is required.

3. Call the Launch method. InTrack OLE Automation Server 2-17

Dialog Class Launch Methods

Remember that the Launch method of the Dialog classes simply packages the property values and queues them with a request to run the associated dialog. This has several implications: The script that called the Launch method is not blocked. Within InTouch, you can be notified when the operator is finished with the dialog by setting the DoneFlagName property before calling Launch. Notification is not supported for applications developed outside InTouch. Because dialogs are queued and the Launch method is not blocked, it is possible to overrun the operator with too many dialogs. That is, the application easily can call the Launch method faster than the operator can respond. At some point the queue fills or encounters a memory allocation problem. Queuing requests to run dialogs eliminates the need to determine when to release or reuse dialog objects to Launch. Dialog automation objects have been used to implement the InTrack wizard extensions to InTouch. Refer to the scripts associated with these buttons for examples. Dialogs will fail when working with serialized lots. Dialogs will not unserialize a sublot. 3-1

CHAPTER 3

Application Objects

The Application object category consists of the Database object class. Manipulating the properties of the the Database class or calling methods on the Database class affects the entire application.

Contents Database Object Class, 2

3-2 Chapter 3

Database Object Class

The Database class has properties and methods that affect the entire application. For example, the BackDate, Comment, and UDALogFlag properties for all objects are accessed through the Database class. The BeginTrans, CommitTrans, and RollbackTrans methods of the Database class control transaction processing for the entire application. Before you can use automation objects, you must connect to the database.

To establish a database connection:

1. Create the database object. 2. Set the properties. 3. Connect to a database. To connect to an InTrack database, call Connect. To connect to a specific InTrack database and server, call ConnectEx.

Note: Only one Database object can exist at a time. Only one InTrack database can be connected (through the Database class) at a time. A second database connection attempt will fail.

Using the Database object class, you can access the BackDate, Comment, UDALogFlag, and the DataCollectionLogFlag properties for all other objects. Each property is manipulated in the Database object, then added to another object by calling a method on that object.

Example You manufacture widgets. A customer, John Smith, has requested an emergency shipment, which you send with the Ship method of a Sublot object. The following steps use the Comment property of the Database object to add a message (the mode of transportation) to the Ship method of the Sublot object. 1. Set the Comment property of the Database object (%Database_Object): %Database_Object.Comment = “overnight air”; where: %Database_Object Database object that adds comment information to the Ship method of the Sublot obejct Comment Property to attach to the selected object overnight air Message to attach to a specific method of the selected object Application Objects 3-3

2. Call the Ship method of the Sublot object, (%Sublot_Object) to attach the comment, “overnight air” to the Ship method: returnCode = %Sublot_Object.Ship(%PrimaryAmt, %SecondaryAmt, "John Smith"); where: %Sublot_Object Object containing the Ship method Ship Method documenting the mode of transportation %PrimaryAmt Primary amount to ship %SecondaryAmt Secondary amount to ship John Smith Customer name The Database class also accesses user-defined attributes. Predefined attributes are associated with each activity object (WIP lot, inventory lot, bulk inventory, machine) in an InTrack database. You can provide a more user-specific definition of an activity object by defining User-defined attributes (UDAs) in ModelMaker. UDAs can be edited or retrieved with the UDA methods of the Database class.

Tip: You can use the UDA methods of the Database class for other objects. Structural objects and the Activity objects Lot and Sublot also have UDA methods.

The following sections provide property and method information for the Database object class.

Identification

Object Name: InDatabase Interface Name: IInDatabase InTouch Object Name: %Database

3-4 Chapter 3

Properties

The following table describes the properties of the Database object class.

Data Type Data Type Property (InTouch) (VB) Access Description

Connected Discrete Boolean r Boolean value showing the database is: –1 = connected 0 = not connected LogonUser Message String r NameKey of the current user TransactionControl Discrete Boolean r Boolean value indicating transaction is: –1 = in progress 0 = not in progress BackDate Object Object r/w DataTime object, time of a transaction’s actual occurrence instead of the current time; BackDates are set in the Database object and added to the next transaction performed with any automation object. Comment Message String String r/w Message to add to a transaction; comments are written in the Database object and added to the next transaction performed with any automation object. UDALogFlag Discrete Boolean r/w Boolean value indicating to write log records (LotBaseLog and AdjustLog tables) showing that UDAs for lot, sublot or both database objects have been changed where: –1 = do not log UDA changes 0 = log UDA changes This property should be set before the SetUDA method is called. DataCollectionLogFlag Discrete Boolean r/w Boolean value indicating whether to log data collection records (LotBaseLog and DataCollectLog, or ResourceBaseLog and MachineDataCollectLog) where: –1 = do not log 0 = log data This flag applies only to the SaveLotSample, SupersedeLotSample, SaveMachineSample, and SupersedeMachineSample methods of the DataSetSample class, and should be set before calling any of these methods. Application Objects 3-5

Methods

This section describes the methods of the Database object class.

Archive

The Archive method of a Database object reads data from the database for specified InTrack objects, saves the data in comma separated value (CSV) format in operating system files, and optionally deletes the archived data from the database.

Syntax returnCode = %Database_Object.Archive(%ArchiveItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%ArchiveItem Object Object ArchiveItem, archiving options and settings

BeginTrans

The BeginTrans method defines the beginning of a group of transaction methods. The methods performed between a BeginTrans method and a CommitTrans method are called a transaction set, which is handled as a single transaction. After BeginTrans is called, subsequent operations will not be committed to the database until CommitTrans is called.

Syntax returnCode = %Database_Object.BeginTrans(); 3-6 Chapter 3

CheckUserPrivilege

The CheckUserPrivilege method verifies that the current user has authority to perform a transaction.

Syntax returnCode = %Database_Object.CheckUserPrivlege(privilegeCode, hasPrivilege); where:

Data Type Data Type Parameter (InTouch) (VB) Description

privilegeCode Integer Short Privilege code corresponding to the runtime transaction the user wants to perform: 1 = Read User 2 = Write User 3 = Read Dataset Template 4 = Write Dataset Template 5 = Read Disposition Code 6 = Write Disposition Code 7 = Read Material 8 = Write Material 9 = Read Operation 10 = Write Operation 11 = Read Route 12 = Write Route 13 = Read Work Instructions 14 = Write Work Instructions 15 = Read User-Defined Attributes 16 = Write User-Defined Attributes 17 = Read Customer Specifications 18 = Write Customer Specifications 19 = Read Location 20 = Write Location 21 = Read Machine 22 = Write Machine 23 = Read Machine Type 24 = Write Machine Type 25 = Read User Certification 26 = Write User Certification 27 = Read 28 = Write Calendar 29 = Read Security Group 30 = Write Security Group 31 = Read Setpoint Template 32 = Write Setpoint Template

Table Continues Application Objects 3-7

Data Type Data Type Parameter (InTouch) (VB) Description

privilegeCode Integer Short Privilege code corresponding to the runtime transaction the user wants to perform: 41 = Lot Adjust 42 = Lot Close 43 = Lot Complete 44 = Lot Consume 45 = Lot Create 46 = Lot Hold 47 = Lot Release From Hold 48 = Lot Merge 49 = Lot Move 50 = Lot Quarantine 51 = Lot Release From Quarantine 52 = Lot Split 53 = Lot Start 54 = Lot Comment 55 = Lot Ship 56 = Lot Disassemble 91 = Query 92 = Set UDA 93 = Data Collect 94 = Log Machine Repairs 95 = Repair Machines 96 = Maintain Machines 97 = Override Machine Operational Status 101 = Read System Administrator 102 = Write System Administrator hasPrivilege Discrete Boolean Boolean value indicating the user: –1 = has access privilege 0 = does not have access privilege 3-8 Chapter 3

CommitTrans

The CommitTrans method defines the end of a group of transaction methods. The methods performed between a BeginTrans method and a subsequent CommitTrans method is called a transaction set, which is handled as a single transaction. After BeginTrans is called, all subsequent operations will not be committed to the database until CommitTrans is called.

Note: If a transaction is started but never committed, it will be rolled back when the database object is released.

Syntax returnCode = %Database_Object.CommitTrans();

Connect

The Connect method connects a user to an InTrack database using settings stored by the InTrack database set-up. To connect to a specified InTrack database and server, use the ConnectEx method. Automation objects cannot be used until a database connection is established.

Note: The Connect method automatically logs on the specified user.

Syntax returnCode = %Database_Object.Connect(userID, password); where:

Data Type Data Type Parameter (InTouch) (VB) Description

userID Message String NameKey of a user defined in ModelMaker password Message String User password Application Objects 3-9

ConnectEx

The ConnectEx method connects to a specified database. To connect to an InTrack database without specifying the database and server, use the Connect method. Automation objects cannot be used until a database connection is established. The specified server type (SQL Server or Oracle) and the administrator user/password must match those defined in the database setup utility.

Note: The ConnectEx method automatically logs on the specified user.

Syntax returnCode = %Database_Object.ConnectEx(userID, password, database, server); where:

Data Type Data Type Parameter (InTouch) (VB) Description

userID Message String NameKey of a user defined in ModelMaker password Message String User password database Message String Name of the InTrack database to connect server Message String Server to which to connect

Disconnect

The Disconnect method logs the user off and terminates the database connection.

Syntax returnCode = %Database_Object.Disconnect();

GetDBTableOwner

The GetDBTableOwner method identifies the owner of the InTrack tables. Queries against the database require the entire table name, including the table owner.

Syntax returnCode = %Database_Object.GetDBTableOwner(owner); where:

Data Type Data Type Parameter (InTouch) (VB) Description

owner Message String Returned InTrack table owner’s name 3-10 Chapter 3

GetErrorMessage The GetErrorMessage method converts an error number into a text message. A successful method returns a return code of 0 (zero). An unsuccessful method returns an error number, which is a return code other than 0.

Syntax returnCode = %Database_Object.GetErrorMessage(errorNumber, errorMessage); where:

Data Type Data Type Parameter (InTouch) (VB) Description

errorNumber Integer Short Specific number (return code) returned when a method fails errorMessage Message String Returned error message

GetUniqueID

The GetUniqueID method returns the next unique string value in the same format as the BaseLogID in the LotBaseLog table.

Syntax returnCode = %Database_Object.GetUniqueID(identifier); where:

Data Type Data Type Parameter (InTouch) (VB) Description

identifier Message String Database name Application Objects 3-11

GetUDA

The GetUDA method returns the value of a specified UDA.

Note: This method cannot be used in InTouch. Use the GetUDAValue method in conjunction with the GetUDAType method instead.

Syntax returnCode = %Database_Object.GetUDA(classID, objectKey, udaName, returnedUDAValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

classID Integer Short Constant identifying an InTrack object class: 1 = Calendar 2 = Customer_Spec 3 = Dataset 4 = Disposition 5 = Location 6 = Lot 7 = Machine 8 = Machine_Status 9 = Machine_Type 10 = Material 11 = Operation 12 = Route 14 = Serial# 15 = Sublot 17 = Certification 18 = WorkInstruction 25 = SetpointTemplate 27 = Classification 28 = ClassificationItem objectKey Message String Object key of the object containing the UDA udaName Message String UDA name returnedUDAValue var VARIANT Returned UDA value, which can be one of the following data types: Integer, Real, Message, Object Date, Object DateTime, Object Time, Object TimeInterval 3-12 Chapter 3

GetUDAType

The GetUDAType method returns the data type of a specified UDA.

Syntax returnCode = %Database_Object.GetUDAType(classID, udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

classID Integer Short Constant identifying an InTrack object class: 1 = Calendar 2 = Customer_Spec 3 = Dataset 4 = Disposition 5 = Location 6 = Lot 7 = Machine 8 = Machine_Status 9 = Machine_Type 10 = Material 11 = Operation 12 = Route 14 = Serial# 15 = Sublot 17 = Certification 18 = WorkInstruction 25 = SetpointTemplate 27 = Classification 28 = ClassificationItem udaName Message String UDA name udaType Integer Long Returned value identifying the UDA data type: 1 = Real 2 = String 3 = Discrete/Boolean 4 = %Date 5 = Integer 7 = %DateTime 8 = %Time 9 = %TimeInterval 12 = Double Application Objects 3-13

GetUDAValue

The GetUDAValue method returns the value of a specified UDA.

Syntax returnedUDAValue = %Database_Object.GetUDAValue(classID, objectKey, udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

classID Integer Short Constant identifying an InTrack object class objectKey Message String Object key of the object containing the UDA udaName Message String UDA name returnCode Integer Long Return code

Note: returnedUDAValue must be defined as one of the following data types: Integer, Real, Message, Object Date, Object DateTime, Object Time, Object TimeInterval.

GetUserVariable

The GetUserVariable method retrieves a user variable from the database.

Syntax returnCode = %Database_Object.GetUserVariable(item, description, strValue, intValue, dblValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

item Message String Name of runtime configuration item for which to retrieve information description Message String Returned description of item strValue Message String Returned value of item of string data type intValue Integer Long Returned value of item of integer data type dblValue Real Double Returned value of item of real (double) data type

Example The following script creates a Database object and retrieves the value of a runtime configuration item from the database. 1. Create a Database object. OLE_CreateObject(%Database_Object, "InTrack.Database"); 2. Retrieve an item. returnCode = %Database_Object.GetUserVariable("newItem", description, strValue, intValue, dblValue); 3-14 Chapter 3

LogMessage

The LogMessage method logs a message to the InTrack Trace log.

Syntax returnCode = %Database_Object.LogMessage(message); where:

Data Type Data Type Parameter (InTouch) (VB) Description

message Message String Message to log to the InTrack Trace log Application Objects 3-15

PurgeDataSet

The PurgeDataSet method purges the database of all data sets that: are not associated with a lot are not associated with a machine have been inactive for a specified length of time. Data in all runtime collection tables that meet this criteria are deleted.

Note: To purge a data set associated with a lot based on the last activity date, use the PurgeLot method. To purge a data set based on the name of the lot to which the data set corresponds, use the Delete method of a Lot object.

Syntax returnCode = %Database_Object.PurgeDataSet(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%TimeInterval Object Object TimeInterval object, time (in days, hours, minutes, or seconds) a data set is inactive 3-16 Chapter 3

PurgeDataTable

The PurgeDataTable method purges the database of all data in a specified data collection table that: is not associated with a lot is not associated with a machine has been inactive for a specified length of time. The runtime data collection table is identified by specifying its corresponding data set template.

Syntax returnCode = %Database_Object.PurgeDataTable(dataSetTemplate, %TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

dataSetTemplate Message String VersionKey identifying a specific data set template %TimeInterval Object Object TimeInterval object, time (in days, hours, minutes, or seconds) data is inactive Application Objects 3-17

PurgeLot

The PurgeLot method purges the database of all lots with a quantity of zero, and their logs and data sets, if the lots have been inactive a specified length of time. Use the purgeLots parameter to purge the lot and corresponding sublot records, the purgeLogs parameter to purge the base and transaction logs, and the purgeData parameter to purge the data set records.

Notes 1. The PurgeLot method can purge only data sets associated with a lot. To purge general data sets not associated with a lot, use the PurgeDataSet method. 2. To remove a single lot and its logs and data set records by name, use the Delete method of an automation object of the Lot class.

Syntax returnCode = %Database_Object.PurgeLot(%TimeInterval, purgeLots, purgeLogs, purgeData); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%TimeInterval Object Object TimeInterval object, ttime (in days, hours, minutes, or seconds) the lot, log, or data set is inactive purgeLots Discrete Boolean Boolean value indicating to purge all lots: –1 = purge 0 = do not purge purgeLogs Discrete Boolean Boolean value indicating to purge all logs (corresponding to a lot) where: –1 = purge 0 = do not purge purgeData Discrete Boolean Boolean value indicating to purge all data sets (corresponding to a lot) where: –1 = purge 0 = do not purge 3-18 Chapter 3

PurgeLotByUserQuery

The PurgeLotByUserQuery method purges the database of lot-related information using a defined search text and Boolean parameters. Use the purgeLots parameter to purge the lot and corresponding sublot records, the purgeLogs parameter to purge the corresponding base and transaction logs, and the purgeData parameter to purge the corresponding data set records. The search text specified in the searchText parameter is appended to the following partial SQL statement: SELECT DISTINCT Lot.LotID FROM Lot therefore, the search text can be any SQL text that results in a valid SELECT statement.

Notes 1. The PurgeLotByUserQuery method can purge only data sets associated with a lot. To purge general data sets not associated with a lot, use the PurgeDataSet method. 2. To remove a single lot and its logs and data set records by name, you can use the Delete method of a Lot object, or specify the lot ID as the search text (e.g., "WHERE LotID='xyz' ").

Syntax returnCode = %Database_Object.PurgeLotByUserQuery(searchText, purgeLots, purgeLogs, purgeData); where:

Data Type Data Type Parameter (InTouch) (VB) Description

searchText Message String SQL search text purgeLots Discrete Boolean Boolean value indicating to purge all lots where: –1 = purge 0 = do not purge purgeLogs Discrete Boolean Boolean value indicating to purge all logs (corresponding to a lot) where: –1 = purge 0 = do not purge purgeData Discrete Boolean Boolean value indicating to purge all data sets (corresponding to a lot) where: –1 = purge 0 = do not purge

Example The following script creates a Database object and purges lots with a uda1 value greater than 10. 1. Create a Database object. OLE_CreateObject(%Database_Obj, "InTrack.Database"); 2. Connect to database. returnCode = %Database_Obj.Connect("intrack", "intrack"); 3. Call the PurgeLotByUserQuery method to purge all lots, logs, and collected data. returnCode = %Database_Obj.PurgeLotByUserQuery("WHERE uda1 > 10", –1, –1, –1); Application Objects 3-19

PurgeMachine

The PurgeMachine method purges the database of all machine status records in the MachineStatus table, corresponding records in log tables (MachineMaintActivityLog and MachineStatusLog), and data sets that have been inactive a specified length of time. Use the purgeStatus parameter to purge the status records, the purgeLogs parameter to purge the corresponding base and transaction logs, and the purgeData parameter to purge the corresponding data set records.

Note: This method reads ResourceBaseLog records and compares their age to that specified in the %TimeInterval parameter. If these records are purged (by enabling the purgeLogs parameter), it is not possible to subsequently purge any of the status or data collection records. These records must be purged first, or together with the log records.

Syntax returnCode = %Database_Object.PurgeMachine(%TimeInterval, purgeStatus, purgeLogs, purgeData); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%TimeInterval Object Object TimeInterval object, ttime (in days, hours, minutes, or seconds) the status, log, or data set is inactive purgeStatus Discrete Boolean Boolean value indicating to purge all status records that meet the purge criteria: –1 = purge 0 = do not purge purgeLogs Discrete Boolean Boolean value indicating to purge all machine log records that meet the purge criteria: –1 = purge 0 = do not purge purgeData Discrete Boolean Boolean value indicating to purge all machine data set records that meet the purge criteria: –1 = purge 0 = do not purge Example The following script purges all machine records older than 6 months. 1. Create a Database object. OLE_CreateObject(%Database_Object, "InTrack.Database"); 2. Connect to database. returnCode = %Database_Object.Connect("intrack", "intrack"); 3. Create a TimeInterval object. OLE_CreateObject(%TimeInterval_Object, "InTrack.TimeInterval"); 4. Set the time interval to 6 months. returnCode=%TimeInterval_Object.SetDaysHoursMinutesSeconds(180, 0, 0, 0); 5. Perform the purge. returnCode=%DatabaseObject.PurgeMachine(%TimeInterval_Object, -1, -1, -1); 3-20 Chapter 3

PurgeMachineLogs

The PurgeMachineLogs method purges the database of all machine logs that have been inactive for a specified length of time.

Note: This method has been superseded by the PurgeMachine method.

Syntax returnCode = %Database_Object.PurgeMachineLogs(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%TimeInterval Object Object TimeInterval object, time (in days, hours, minutes, or seconds) a machine log is inactive

PurgeUserLogs

The PurgeUserLogs method purges the database of all user logs that have been inactive for a specified length of time.

Syntax returnCode = %Database_Object.PurgeUserLogs(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%TimeInterval Object Object TimeInterval object, time (in days, hours, minutes, or seconds) a user log is inactive Application Objects 3-21

RemoveUserVariable

The RemoveUserVariable method deletes a user variable from the database.

Syntax returnCode = %Database_Object.RemoveUserVariable(item); where:

Data Type Data Type Parameter (InTouch) (VB) Description

item Message String Name of runtime configuration item to delete

Example The following script creates a Database object and removes a runtime configuration item from the database. 1. Create a Database object. OLE_CreateObject(%Database_Object, "InTrack.Database"); 2. Remove an item. returnCode = %Database_Object.RemoveUserVariable("oldItem");

RollbackTrans

The RollbackTrans method reverses any committed transactions. The methods performed between the most recent BeginTrans command and the RollbackTrans command are undone.

Syntax returnCode = %Database_Object.RollbackTrans(); 3-22 Chapter 3

SaveUserVariable

The SaveUserVariable method saves a user variable to the database.

Syntax returnCode = %Database_Object.SaveUserVariable(item, description, strValue, intValue, dblValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

item Message String Name of runtime configuration item description Message String Item description strValue Message String Value of item of string data type intValue Integer Long Value of item of integer data type dblValue Real (double) Value of item of real (double) data type

Example The following script creates a Database object and saves a runtime configuration item to the database. 1. Create a Database object. OLE_CreateObject(%Database_Object, "InTrack.Database"); 2. Save an item. returnCode = %Database_Object.SaveUserVariable("newItem", "description", "strValue", 1, 0.0); Application Objects 3-23

SetUDA

The SetUDA method updates the value of a specified UDA.

Note: To control whether UDA changes to either a lot or sublot database object are recorded in the LotBaseLog and AdjustLog tables, set the UDALogFlag property before calling this method.

Syntax returnCode = %Database_Object.SetUDA(classID, objectKey, udaName, value); where:

Data Type Data Type Parameter (InTouch) (VB) Description

classID Integer Short Constant identifying an InTrack object class 1 = Calendar 2 = Customer_Spec 3 = Dataset 4 = Disposition 5 = Location 6 = Lot 7 = Machine 8 = Machine_Status 9 = Machine_Type 10 = Material 11 = Operation 12 = Route 14 = Serial# 15 = Sublot 17 = Certification 18 = WorkInstruction 25 = SetpointTemplate 27 = Classification 28 = ClassificationItem objectKey Message String Object key of the object containing the UDA udaName Message String UDA name value var VARIANT UDA value to change (UDA value must be of one of the following data types: Integer, Real, Message, Object Date, Object DateTime, Object Time, Object TimeInterval) 3-24 Chapter 3

Unarchive

The Unarchive method of the Database class reads the archived data (CSV format) in operating system files and writes the information back to the database.

Syntax returnCode = %Database_Object.Unarchive(%ArchiveItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%ArchiveItem Object Object ArchiveItem object, archiving options and settings

UserLogoff

The UserLogoff method terminates a user’s right to perform actions on the current computer. With this method, multiple users can log on and off an InTrack runtime application in succession without disconnecting and terminating the database connection.

Syntax returnCode = %Database_Object.UserLogoff();

UserLogon

The UserLogon method initiates a user’s rights to perform actions on the current computer. With this method, multiple users can log on and off an InTrack runtime application in succession without disconnecting and terminating the database connection. If a user is logged on at the time the new user logs on, the previous user is automatically logged off.

Note: Use the UserLogon method only after connecting to an InTrack database.

Syntax returnCode = %Database_Object.UserLogon(userID, password); where:

Data Type Data Type Parameter (InTouch) (VB) Description

userID Message String NameKey of a user defined in ModelMaker password Message String User password

4-1

CHAPTER 4

General Objects

Automation objects in the General class support other automation objects. They typically provide other automation objects with property information needed to perform a transaction. For example, an Amount object specifies primary and secondary quantity information needed in transactions of Lot, Sublot, and Machine objects. Many general automation objects contain no methods. Methods of most general objects influence the properties of the general automation object itself rather than the runtime model. Methods of general objects affect only objects in memory and are not written to the database. This section describes each general object class and provides property and method information where applicable.

Contents Amount Object Class, 3 ArchiveItem Object Class, 8 ArchiveItems Object Class, 14 BOMItem Object Class, 17 BOMItems Object Class, 22 BOMSubItem Object Class, 25 BOMSubItems Object Class, 27 CloseItem Object Class, 30 CloseItems Object Class, 32 CompleteItem Object Class, 35 CompleteItems Object Class, 37 ConsumableMaterial Object Class, 40 ConsumableMaterials Object Class, 43 ConsumeItem Object Class, 46 ConsumeItems Object Class, 48 Date Object Class, 51 DateTime Object Class, 55 DisassembleItem Object Class, 62 DisassembleItems Object Class, 65 Selector Object Class, 68 SerialNumbers Object Class, 74 SetpointItem Object Class, 78 4-2 Chapter 4

SetpointItems Object Class, 81 StartItem Object Class, 83 StartItems Object Class, 85 StepInputItem Object Class, 88 StepInputItems Object Class, 90 StepOutputItem Object Class, 93 StepOutputItems Object Class, 97 StepSetpointItem Object Class, 100 StepSetpointItems Object Class, 102 Time Object Class, 105 TimeInterval Object Class, 108

General Objects 4-3

Amount Object Class

An Amount object provides quantity information for other objects: For the Machine object class, Amount objects set the Capacity property. For the Sublot object class, Amount objects set the QueuedAmt and StartedAmt properties. For the Lot object class, Amount objects set the PrimaryAmt and SecondaryAmt properties. For other general object classes, such as CloseItem, CompleteItem, ConsumableMaterial, ConsumeItem, and StartItem classes, Amount objects set the PrimaryAmt and SecondaryAmt properties.

Identification

Object Name: InAmount Interface Name: IInAmount InTouch Object Name: %Amount

Using Amount Objects

When an automation object’s quantity property is an Amount object, you can set the quantity property directly though the automation object, or you can create an Amount object to represent the quantity property. The advantage to creating an automation object to represent a quantity property is that the same object can be reused in any property requiring the same amount quantity. An Amount object provides quantity information as an input parameter in the Create and SetSecondaryAmount methods of a Lot object. It also provides quantity information in the following methods of a Sublot object: Close, CloseOnMachine, Complete, CompleteOnMachine, Create, Merge, Move, Receive, SetQueuedAmount, SetStartedAmount, Ship, Split, Start, and StartOnMachine.

Examples

The following examples are provided using InTouch script language. Use of other automation clients may require substitution of appropriate syntax.

Example 1 — Using an Amount Object to Set Primary and Secondary Amounts

The following script uses the Amount object to set the PrimaryAmt and SecondaryAmt properties of an automation object (StartItem). This example creates a StartItem object (%StartItem_Object1) and sets the primary quantity to 100 units and the secondary quantity to 1200 ounces with Amount objects (%PrimaryAmt_Object and %SecondaryAmt_Object). 1. Create a StartItem object. OLE_CreateObject(%StartItem_Object1, “InTrack.StartItem”); 4-4 Chapter 4

2. Create an Amount object to represent the PrimaryAmt property of the StartItem object. OLE_CreateObject(%PrimaryAmt_Object, “InTrack.Amount”); %PrimaryAmt_Object.Quantity = 100; %PrimaryAmt_Object.Units = “units”; 3. Set the PrimaryAmt property of the StartItem object (%StartItem_Object1) to the primary quantity to start with the Amount object (%PrimaryAmt_Object) created in step 2. %StartItem_Object1.PrimaryAmt = %PrimaryAmt_Object; 4. Create an Amount object to represent the SecondaryAmt property of a StartItem object. OLE_CreateObject(%SecondaryAmt_Object, “InTrack.Amount”); %SecondaryAmt_Object.Quantity = 1200; %SecondaryAmt_Object.Units = “ounces”; 5. Set the SecondaryAmt property of a StartItem object (%StartItem_Object1) to the secondary quantity to start with the Amount object (%SecondaryAmt_Object) created in step 4. %StartItem_Object1.SecondaryAmt = %SecondaryAmt_Object;

Example 2 — Setting Amounts Directly Through an Automation Object

The following script sets the PrimaryAmt and SecondaryAmt properties of an object directly through the automation object. This example creates a StartItem object(%StartItem_Object1) and sets the primary quantity to 100 units and the secondary quantity to 1200 ounces with script. 1. Create a StartItem object. OLE_CreateObject(%StartItem_Object1, “InTrack.StartItem”); 2. Set the Sublot property to the sublot to start. %StartItem_Object1.Sublot = “Lot_123@waterroute[1]:step1@location”; 3. Set the PrimaryAmt property to the primary quantity to start. %StartItem_Object1.PrimaryAmt.Quantity = 100; %StartItem_Object1.PrimaryAmt.Units = “units”; 4. Set the SecondaryAmt property to the secondary quantity to start. %StartItem_Object1.SecondaryAmt.Quantity = 1200; %StartItem_Object1.SecondaryAmt.Units = “ounces”;

Serialization

An Amount object is first created without serial numbers and is called “unserialized.” An Amount object that has serial numbers added to it is called “serialized.” Serial number objects are not required. To add serial numbers to an Amount object: 1. Create a SerialNumbers object. 2. Use the Add method of the SerialNumbers object class to populate it with serial numbers. 3. Create an Amount object. 4. Use one of two methods to populate the Amount object with the serial numbers added in step 2 above. If the Amount object is empty, use the Serialize method. If the Amount object contains serial numbers, use the AddSerialNumbers method. General Objects 4-5

Properties

The following table describes the properties of an Amount object.

Data Type Data Type Property (InTouch) (VB) Access Description

Quantity Real Double r/w Primary or secondary quantity Units Message String r/w Units (pounds, inches, each, etc. ) SerializedQuantity Integer Long r Number of serialized units

Methods

This section describes the methods of an Amount object.

AddSerialNumbers

The AddSerialNumbers method adds serial numbers to an Amount object, as specified by serialNumber or %SerialNumbers in the method call. When serial numbers are added to an Amount object, they can be assigned to the object’s existing material quantity or the object’s material quantity can be adjusted to reflect the number of added serial numbers. To adjust the Quantity property of an Amount object, use the adjustQty parameter.

Syntax returnCode = %Amount_Object.AddSerialNumbers(serialNumber, adjustQty); returnCode = %Amount_Object.AddSerialNumbers(%SerialNumbers, adjustQty); where:

Data Type Data Type Parameter (InTouch) (VB) Description

serialNumber Message String Serial number(s) to add; can be a sequence of serial numbers separated by commas %SerialNumbers Object Object Serial number(s) to add adjustQty Discrete Boolean Boolean value indicating whether to: –1 = adjust quantity with added serial numbers 0 = assign serial numbers to existing quantity 4-6 Chapter 4

GetSerialNumbers

The GetSerialNumbers method transfers the serial numbers in an Amount object to a SerialNumbers object. After the serial numbers are in the SerialNumbers object, they can be manipulated with its Add, Remove, Item, and IsMember methods.

Syntax returnCode = %Amount_Object.GetSerialNumbers(%SerialNumbers); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%SerialNumbers Object Object SerialNumbers object to which serial numbers are added

RemoveSerialNumbers

The RemoveSerialNumbers method removes serial numbers from an Amount object, as specified by serialNumber or %SerialNumbers in the method call.

Note: RemoveSerialNumbers removes some, rather than all, serial numbers from an Amount object. To remove all serial numbers from an Amount object, use the Unserialize method.

To adjust the Quantity property of an Amount object to reflect the removed serial numbers, use the adjustQty parameter.

Syntax returnCode = %Amount_Object.RemoveSerialNumbers(serialNumber, adjustQty); returnCode = %Amount_Object.RemoveSerialNumbers(%SerialNumbers, adjustQty); where:

Data Type Data Type Parameter (InTouch) (VB) Description

serialNumber Message String Serial number(s) to remove; can be a sequence of serial numbers separated by commas %SerialNumbers Object Object Serial number(s) to remove adjustQty Discrete Boolean Boolean value indicating whether to: –1 = adjust Quantity property 0 = not adjust Quantity property General Objects 4-7

Serialize

The Serialize method adds serial numbers to an empty Amount object, as specified by %SerialNumbers in the method call.

Note: To add serial numbers to Amount object that contains serial numbers, use the AddSerialNumbers method.

Syntax returnCode = %Amount_Object.Serialize(%SerialNumbers); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%SerialNumbers Object Object Serial number(s) to add

Note: The Quantity property of the Amount object is reset to the number of serial numbers specified in the %SerialNumbers parameter.

Unserialize

The Unserialize method clears all, rather than some, serial numbers from an Amount object. The quantity property of the object is not affected.

Note: To remove only some of the serial numbers from an Amount class, use the RemoveSerialNumbers method.

Syntax returnCode = %Amount_Object.Unserialize(); 4-8 Chapter 4

ArchiveItem Object Class

An ArchiveItem object defines archiving options and settings. It is used in both the Archive and Unarchive methods of Database object.

Identification

Object Name: InArchiveItem Interface Name: IInArchiveItem InTouch Object Name: %ArchiveItem

Using ArchiveItem

Identifying Object Classes to Archive

The classID property specifies the class of objects to be archived or unarchived. The list of class IDs supported for archiving or unarchiving is an extension of the UDA class ID list and can be found in the table below.

Searching for Objects to Archive

The search text specified in the searchText property is appended to the following partial SQL statement: SELECT TableName.PrimaryKeyValue1, TableName.PrimaryKeyValue2, … TableName.PrimaryKeyValueN FROM TableName The primary key value(s) uniquely identify the object(s) to be retrieved from the database and archived. Typically, a “WHERE” clause specifies values from the primary table. However, the search text can be any SQL text that results in a valid SELECT statement. Multi-table joins can be accomplished by starting the search text string with a comma followed by the second table name, etc. This property is ignored when unarchiving.

Controlling Purged Objects

Use the Purge property to control whether data is purged (deleted) from the database. After each object has been archived, it is deleted and committed to the database (unless the user has taken over transaction control). Due to referential integrity constraints, the order in which objects are deleted may be significant. This property is ignored when unarchiving.

Defining the Database

Use the Archive property to control whether the data is archived from the database. Normally (and by default) this property is true. If this property is false and the purge property is true, then custom database purges can be implemented (in contrast to using the standard database purge methods). This property is ignored when unarchiving. General Objects 4-9

Managing System Resources

The idleTime property specifies the percentage of time the archive/unarchive process is allowed to do nothing instead of performing work. It is used to prevent the archive application from overloading the database server. If the property is 0 (default), the archive process uses all available time to perform archiving. If specified as 100, the archive process will do nothing. Since high idle time values may erroneously appear to hang the system, care must be taken in setting this property.

Specifying Runtime Table Data to Archive

The tableName property (when used with a class ID of DATA_COLLECTION_CLASS) specifies data collected in runtime tables to be archived/unarchived. When archiving/unarchiving runtime data, both class ID and table name are required to identify the table that contains the data of interest.

Note: The SQL search text can be used to refine data to be archived.

Specifying Archive Directories

The Directory property specifies the full path and folder in which archive files will be placed or files to be unarchived reside. If the directory does not exist, it is created. However, the path to this directory must exist. If no value is specified, a directory called “Archive” is created under the InTrack root directory (for example: C:\INTOUCH.32\INTRACK\ARCHIVE). The archive/unarchive log also is placed in this directory. The log contains pertinent information about events that occurred during the archive/unarchive process. The logs are named “Archive Log/Unarchive Log” with the file suffix appended if specified. These files are shared for reading.

Labeling Individual Archive Files

The fileSuffix property specifies a character string that is appended to the default archive file names (same as the RDBMS table names) and log file names. This property is useful when files must be named uniquely between different archive sessions. If the same file name is specified for more than one archive session, the additional entries are appended to the end of the file.

Note: Data from multiple archive sessions can be unarchived in one session by keeping the same file names across archive sessions.

Multiple ArchiveItem objects can be grouped together into ArchiveItems object for processing as a collection.

To use an ArchiveItem object: 1. Create an ArchiveItem object. 2. Set the classID (and tableName for data collection) and other optional properties. 3. Use the ArchiveItem object in the Archive and Unarchive methods of a Database object. 4-10 Chapter 4

Example — Using the Archive Object in a Database Object Method

The following script creates an an ArchiveItem object and sets the class ID and search text properties. This example creates an ArchiveItem object (%ArchiveItem_Object) with a classID of 6 (Lot) to archive all lots and their associated sublots with a CreateDate older than January 1, 1997. 1. Create an ArchiveItem object. OLE_CreateObject(%ArchiveItem_Object, “InTrack.ArchiveItem”); 2. Set the classID property. %ArchiveItem_Object.classID = 6; 3. Set the searchText property. %ArchiveItem_Object.searchText = “WHERE Lot.CreateDate < ‘Jan 1 1997’” 4. Call the database method. %DatabaseObject.Archive(%ArchiveItem_Object); The following section provides property information for an ArchiveItem object. An ArchiveItem object has no methods.

Properties

The following table describes the properties of an ArchiveItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

classID Integer Short r/w Constant identifying an InTrack object class (see the following table) searchText Message String r/w SQL search text in a WHERE clause purge Discrete Boolean r/w Boolean value indicating: –1 = purge data 0 = do not purge data archive Discrete Boolean r/w Boolean value indicating: –1 = archive data 0 = do not archive data idleTime Integer Short r/w Idle percentage (0 to 100 percent) tableName Message String r/w Name of data collection table directory Message String r/w Full path and name of the directory (folder) in which the archive files reside fileSuffix Message String r/w Characters to be appended to the default archive file names General Objects 4-11

Classes Included in an ArchiveItem Object

The following table lists the class name, class ID, object type (buildtime/structural or runtime/dynamic) and the database tables that are involved in an archive.

Class Name ID Type Database Tables

CALENDAR_CLASS 1 Structural Calendar, DaysOfMonth, DefaultShifts, Month, MonthsOfYear, Shift, ShiftsOfCalendar, ShiftsOfDay, Year, YearsOfCalendar

CUSTOMER_SPECIFICATION_ 2 Structural CustomerSpecification CLASS

DATASET_TEMPLATE_CLASS 3 Structural DSDataItemHeader, DSSampleHeader, DSTemplate

DISPOSITION_CODE_CLASS 4 Structural DispositionCode

LOCATION_CLASS 5 Structural Location

LOT_CLASS 6 Dynamic Lot, MachineQuantity, LotCollection, LotConsumption. SerialNumber, Sublot

MACHINE_CLASS 7 Structural Machine, MachineDataSets

MACHINE_STATUS_CLASS 8 Dynamic MachineStatus, MachineTaskStatus,

MACHINE_TYPE_CLASS 9 Structural MachineType, MachineTypeFailureReason, MachineTypeFailureSymptom, MachineTypeMachineTask, MachineTaskWorkInst

MATERIAL_CLASS 10 Structural BillOfMaterial, BOMItems, BOMSubItems, Material, MaterialOverride, OvrDataSets, OvrOperationMachine, OvrSetpointTemplate, OvrWorkInstructions

OPERATION_CLASS 11 Structural Operation, OperationDataSets, OperationMachine, OperSetpointTemplates, OperationWorkInst 4-12 Chapter 4

Class Name ID Type Database Tables

ROUTE_CLASS 12 Structural MaterialStructure, Route, RoutePath, RouteStep, StepDispCodes, StepInput, StepOutput, StepSetpoint, StructureStep

SECURITY_GROUP_CLASS 13 Structural SecGroupToPriv, SecurityGroup

SERIAL_NUMBER_CLASS 14 Dynamic SerialNumber

SUBLOT_CLASS 15 Dynamic MachineQuantity , SerialNumber, Sublot, LotCollection, LotConsumption

USER_CLASS 16 Structural IssuedUserCert, SecUserAddedPriv, SecUserDeletPriv, SecUserToGroup, Users

USER_CERTIFICATION_CLASS 17 Structural UserCertification

WORK_INSTRUCTIONS_CLASS 18 Structural WorkInstructions, WorkInstText

CONFIGURATION_CLASS 19 Dynamic Configuration

DATA_COLLECTION_CLASS 20 Dynamic Lot, machine or generic data collection table as specified

MASTER_TAG_CLASS 21 Structural SecurityMasterTag

SECURITY_PRIVILEGE_CLASS 22 Structural SecurityPrivilege

LOT_LOG_CLASS 23 Dynamic AdjustLog, CloseLog, CloseLogCollection, CloseLogConsumption, CommentLog, CompleteLog, CompleteLogCollection, CompleteLogConsumption, ConsumeLog, CreateLog, DataCollectLog, DisassembleLog, HoldLog, LotBaseLog, LotUndoLog , MergeLog, MoveLog, QuarantineLog, SerialNumberLog, ShipLog, SplitLog, StartLog General Objects 4-13

Class Name ID Type Database Tables

RESOURCE_LOG_CLASS 24 Dynamic MachineDataCollectLog, MachineMaintActivityLog, MachineStatusLog, ResourceBaseLog, UserLog, ResourceUndoLog

SETPOINT_TEMPLATES_CLASS 25 Structural SetpointTemplate, SetpointItem,

PRODUCT_STRUCTURE_CLASS 26 Structural MaterialStructure, , StepInput, StepOutput, StepSetpoint, StructureStep

CLASSIFICATION_CLASS 27 Structural Classification

CLASSIFICATION_ITEM_CLASS 28 Structural ClassificationItem, ClassItemItems

4-14 Chapter 4

ArchiveItems Object Class

An ArchiveItems object groups multiple ArchiveItem objects for processing as a collection instead of as single entities. When you pass an ArchiveItems collection object into either or both the Archive and Unarchive methods of a Database object, each ArchiveItem object in the ArchiveItems collection is processed automatically.

Identification

Collection Object Name: InArchiveItems Interface Name: IInArchiveItems InTouch Object Name: %ArchiveItems

To use an ArchiveItems object: 1. Create an ArchiveItems object. 2. Populate the ArchiveItems object with individual ArchiveItem objects using the Add method. 3. Use the ArchiveItems collection in either or both the Archive and Unarchive methods of a Database object. The following sections provide property and method information for an ArchiveItems collection object.

Property

The following table describes the property of an ArchiveItems collection object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of ArchiveItem object in the ArchiveItems collection General Objects 4-15

Methods

This section describes the methods of an ArchiveItems object.

Add

The Add method adds ArchiveItem(s) objects to an ArchiveItems collection, as specified by %ArchiveItem in the method call.

Syntax returnCode = %ArchiveItems_Object.Add(%ArchiveItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%ArchiveItem Object Object ArchiveItem(s) objects to add

Clear

The Clear method clears all ArchiveItem objects from an ArchiveItems collection.

Syntax returnCode = %ArchiveItems_Object.Clear(); 4-16 Chapter 4

Item

The Item method locates ArchiveItem objects in an ArchiveItems collection, as specified by index in the method call.

Syntax %ArchiveItem_Object = %ArchiveItems_Object.Item(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the ArchiveItem object to locate (1 ≤ index ≤ Count)

Remove

The Remove method removes ArchiveItem object(s) from an ArchiveItems collection, as specified by index or %ArchiveItem in the method call.

Syntax returnCode = %ArchiveItems_Object.Remove(index); returnCode = %ArchiveItems_Object.Remove(%ArchiveItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the ArchiveItem object to remove (1 ≤ index ≤ Count) %ArchiveItem Object Object ArchiveItem object to remove General Objects 4-17

BOMItem Object Class

The BOMItem object class represents input or output material for a bill of material (BOM) within InTrack. The bill of material is the list of ingredients necessary to build a product, or the list of coproducts and by-products resulting from the production of the product. Input materials are used to produce an end product, whereas output materials are used to describe coproducts and by- products. BOMItem objects can be added to a collection object called BOMItems, which in turn is added to a Material object as either inputs or outputs.

Identification

Object Name: InBOMItem Interface Name: IInBOMItem InTouch Object Name: %BOMItem

Using BOMItem Objects

When a BOMItem object describes an input material, the object can contain a collection of substitute input materials called BOMSubItems. Only input materials can contain substitute material. If a BOMItem object is used as output, BOMSubItems are ignored.

To use a BOMItem object 1. Create a BOMItem object. 2. Set the properties of the object. 3. Use the BOMItem object in the InitializeFrom method of a StepInputItems or StepOutputItems object, or in methods of a Material object: AddInputItems, AddOutputItems, CreateBOM, DeleteInputItems, and DeleteOutputItems.

Example — Inputting BOM Items with Substitute Items

The following example creates a BOMItem object used as an input material with a single substitute material. This object will be used as input for the product material “ChateauNatural”. Assume input materials are already defined—otherwise they need to be created first using the Create method of the Material class. 1. Create a BOMItem object (%BOMItem_Object1). OLE_CreateObject(%BOMItem_Object1, "InTrack.BOMItem"); 2. Set the properties of %BOMItem_Object1. %BOMItem_Object1.MaterialKey = "MountainWater[1]"; %BOMItem_Object1.Quantity = 1.0; %BOMItem_Object1.UnitOfMeasure = "gallon"; %BOMItem_Object1.LowerTolerance = 50.0; %BOMItem_Object1.UpperTolerance = 120.0; %BOMItem_Object1.ScaledQty = -1; 3. Create a BOMSubItem object (%BOMSItem_Object1). OLE_CreateObject(%BOMSItem_Object1, "InTrack.BOMSubItem"); 4-18 Chapter 4

4. Set the properties for %BOMSItem_Object1. %BOMSItem_Object1.MaterialKey = "SpringWater"; %BOMSItem_Object1.UnitOfMeasure = "quarts"; %BOMSItem_Object1.SubstituteRatio = 4.0; %BOMSItem_Object1.MaxSubstitutionPct = 100.0; 5. Add %BOMSItem_Object1 as a substitute for %BOMItem_Object1. returnCode = %BOMItem_Object1.AddSubstitutes(%BOMSItem_Object1); 6. Create a Material object to represent the product "ChateauNatural". OLE_CreateObject(%Material_Object, "InTrack.Material"); %Material_Object.MaterialKey = "ChateauNatural"; 7. Add %BOMItem_Object1 as input to the product. returnCode = %Material_Object.AddInputItems(%BOMItem_Object1, -1);

The following sections provide property and method information for a BOMItem object.

Properties

The following table describes the properties of a BOMItem.

Data Type Data Type Property (InTouch) (VB) Access Description

MaterialKey Message String r/w VersionKey of material. Note: BOMSubItems are cleared when key value changes. Quantity Real Double r/w Quantity (> 0) UnitOfMeasure Message String r/w Quantity unit of measure LowerTolerance Real Double r/w Minimum tolerable quantity deviation, expressed as a percent (0–100) Default value = 0 UpperTolerance Real Double r/w Maximum tolerable quantity deviation, expressed as a percent (≥ 0) Default value = 0 ScaledQty Discrete Boolean r/w Boolean value indicating whether quantity scaling is enabled: –1 = scale quantity (default) 0 = no scaling (used for input material only) DecQty Discrete Boolean r/w Boolean value indicating whether to decrease primary quantity by material output: –1 = yes (default) 0 = no (used for output material only) BOMSubItems Object Object r/w Collection of substitute materials (used for input material only) General Objects 4-19

Methods

This section describes the methods of a BOMItem object.

AddSubstitutes

The AddSubstitutes method adds a list of substitute material to a BOMItem object. The items parameter can be a single BOMSubItem object or a collection (BOMSubItems). This method should be used only for BOMItem objects intended for input.

Note: This method adds the substitute material to the object and does not affect the bill of material stored in the database. This BOMItem must be added to the appropriate Material object before any changes are saved to the database.

Syntax returnCode = %BOMItem_Object.AddSubstitutes(%Items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%Items Object Object BOMSubItem(s) object to add

Example — Adding Substitute Items to a BOMItem Object

The following script creates two substitute material items and adds them to a BOMItem object. Assume all materials already exist. 1. Create two BOMSubItem objects. OLE_CreateObject(%BOMSubItem_Object1, "InTrack.BOMSubItem"); OLE_CreateObject(%BOMSubItem_Object2, "InTrack.BOMSubItem"); 2. Set the properties for each object. %BOMSubItem_Object1.MaterialKey = "DistilledWater"; %BOMSubItem_Object1.UnitOfMeasure = "gallons"; %BOMSubItem_Object1.SubstituteRatio = 1.0; %BOMSubItem_Object1.MaxSubstitutionPct = 100.0; %BOMSubItem_Object2.MaterialKey = "TapWater[2]"; %BOMSubItem_Object2.UnitOfMeasure = "pints"; %BOMSubItem_Object2.SubstituteRatio = 8.0; %BOMSubItem_Object2.MaxSubstitutionPct = 50.0; 3. Create a collection object of the BOMSubItems class, and add the two substitute items. OLE_CreateObject(%BOMSubItems_Object, "InTrack.BOMSubItems"); returnCode = %BOMSubItems_Object.Add(%BOMSubItem_Object1); returnCode = %BOMSubItems_Object.Add(%BOMSubItem_Object2); 4. Create a BOMItem object and add substitutes to BOMItem. OLE_CreateObject(%BOMItem_Object, "InTrack.BOMItem"); returnCode = %BOMItem_Object.AddSubstitutes(%BOMSubItems_Object); 4-20 Chapter 4

ClearSubstitutes

The ClearSubstitutes method removes all substitute material from a BOMItem object. This method should be used only for BOMItem objects intended for input.

Note: This method removes only the substitute material from the object and does not affect the bill of material stored in the database. This BOMItem must be added to the appropriate Material object before any changes are saved to the database.

Syntax returnCode = %BOMItem_Object.ClearSubstitutes();

Example — Removing All Substitute Items from a BOMItem Object

The following script removes all substitute material from an existing BOMItem object. The object is added to the product material “ChateauNatural” to affect the database. Assume all materials already exist. 1. Create a BOMItem object. OLE_CreateObject(%BOMItem_Object, "InTrack.BOMItem"); 2. Set key for BOMItem.. %BOMItem_Object.MaterialKey = "Mountain Water[1]"; 3. Remove all substitute items from BOMItem. returnCode = %BOMItem_Object.ClearSubstitutes(); 4. Create product material and set the MaterialKey. OLE_CreateObject(%Material_Object, "InTrack.Material"); %Material_Object.MaterialKey = "ChateauNatural"; 5. Add the input item to the Material object with the replace option = -1 to modify the database. returnCode = %Material_Object.AddInputItems(BOMItem_Object, -1); General Objects 4-21

RemoveSubstitutes

The RemoveSubstitutes method removes a substitute material from a BOMItem object. This method should be used only for BOMItem objects intended for input.

Note: This method removes only the substitute material from the object and does not affect the bill of material stored in the database. This BOMItem must be added to the appropriate Material object before any changes are saved to the database.

Syntax returnCode = %BOMItem_Object.RemoveSubstitutes(index); returnCode = %BOMItem_Object.RemoveSubstitutes(materialKey); returnCode = %BOMItem_Object.RemoveSubstitutes(%BOMSubItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Short List position of the BOMSubItem object to remove (1 ≤ index ≤ Count) materialKey Message String VersionKey identifying the material to remove %BOMSubItem Object Object BOMSubItem object to remove

Example — Removing a Substitute Item from a BOMItem Object

The following script removes a substitute material item from an existing BOMItem object. The object is added to the product material “ChateauNatural” to affect the database. Assume all materials already exist. 1. Create a BOMSubItem object. OLE_CreateObject(%BOMSubItem_Object, "InTrack.BOMSubItem"); 2. Set the material key to identify the item to remove. %BOMSubItem_Object.MaterialKey = "DistilledWater"; 3. Remove item from BOMItem. returnCode = %BOMItem_Object.RemoveSubstitutes(%BOMSubItem_Object); 4. Create a Material object for the product material and set the MaterialKey property. OLE_CreateObject(%Material_Object, “InTrack.Material”); %Material_Object.MaterialKey = “ChateauNatural”; 5. Add the input item to the Material object with the replace option = -1 to modify the database. returnCode = %Material_Object.AddInputItems(%BOMItem_Object, -1); 4-22 Chapter 4

BOMItems Object Class

A BOMItems object is a collection object. It groups multiple BOMItem objects for processing as a collection. When you pass a BOMItems object into methods of a Material object, each BOMItem object contained in the BOMItems collection is processed automatically.

Identification

Collection Object Name: InBOMItems Interface Name: IInBOMItems InTouch Object Name: %BOMItems

Using BOMItems Collection Objects

A BOMItems collection can be used to process multiple BOMItem objects at the same time.

To use a BOMItems collection: 1. Create BOMItem objects and set the properties. 2. Create a BOMItems collection object. 3. Use the Add method of the BOMItems object to populate it with the individual BOMItem objects created in step 1. 4. Use the BOMItems object in the CreateBOM, AddInputItems, AddOutputItems, DeleteInputItems, and DeleteOutputItems methods of a Material object. The following sections provide property and method information for a BOMItems collection.

Properties

The following table describes the property of a BOMItems collection.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of BOMItem objects in the BOMItems collection General Objects 4-23

Methods

This section describes the methods of a BOMItems object.

Add

The Add method adds BOMItem objects to a BOMItems collection, as specified by %BOMItem in the method call.

Syntax returnCode = %BOMItems_Object.Add(%BOMItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%BOMItem Object Object BOMItem(s) to add

Clear

The Clear method clears all BOMItem objects from a BOMItems collection.

Syntax returnCode = %BOMItems_Object.Clear();

Item

The Item method locates the BOMItem objects in a BOMItems collection, as specified by index or materialKey in the method call.

Syntax %BOMItem_Object = %BOMItems_Object.Item(index); %BOMItem_Object = %BOMItems_Object.Item(materialKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the BOMItem object to locate (1 ≤ index ≤ Count) materialKey Message String VersionKey identifying the BOMItem object to locate

Remove

The Remove method removes selected BOMItem objects from a BOMItems collection, as specified by index, materialKey, or %BOMItem in the method call.

Syntax 4-24 Chapter 4

returnCode = %BOMItems_Object.Remove(index); returnCode = %BOMItems_Object.Remove(materialKey); returnCode = %BOMItems_Object.Remove(%BOMItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the BOMItem object to remove (1 ≤ index ≤ Count) materialKey Message String VersionKey identifying the BOMItem object to remove %BOMItem Object Object BOMItem object remove General Objects 4-25

BOMSubItem Object Class

A BOMSubItem object represents substitute input material for an InTrack bill of material. The ratio between the substitute material and the original material can be specified, as can the maximum percentage of substitute material allowed. BOMSubItem objects can be added only to a BOMItem object used as an input material. BOMItem objects in turn are added to a Material object before any database changes take effect. To process multiple BOMSubItem objects together, you can create a collection object, BOMSubItems.

Identification

Collection Object Name: InBOMSubItem Interface Name: IInBOMSubItem InTouch Object Name: %BOMSubItem

Example — Using the BOMSubItem to Substitute an Input Material

The following example creates a BOMItem object to input material with a single substitute material. The substitution ratio of 4.0 indicates that it takes 4 units of substitute material to be equivalent to 1 unit of the original material. A maximum substitution percentage of 100% indicates that the product can be built exclusively by using the substitute material. The BOMItem is added to the product material to change the database. Assume all materials already exist. 1. Create a BOMItem object (%BOMItem_Object). OLE_CreateObject(%BOMItem_Object, "InTrack.BOMItem"); 2. Set the properties for %BOMItem_Object. %BOMItem_Object.MaterialKey = "BottleWater[1]"; %BOMItem_Object.Quantity = 1.0; %BOMItem_Object.UnitOfMeasure = "gallon"; %BOMItem_Object.LowerTolerance = 50.0; %BOMItem_Object.UpperTolerance = 120.0; %BOMItem_Object.ScaledQty = -1; 3. Create a BOMSubItem object (BOMSItem_Object). OLE_CreateObject(%BOMSItem_Object, "InTrack.BOMSubItem"); 4. Set the properties for %BOMSItem_Object. %BOMSItem_Object.MaterialKey = "SpringWater"; %BOMSItem_Object.UnitOfMeasure = "quarts"; %BOMSItem_Object.SubstituteRatio = 4.0; %BOMSItem_Object.MaxSubstitutionPct = 100.0; 5. Add %BOMSItem_Object as a substitute for %BOMItem_Object. returnCode = %BOMItem_Object.AddSubstitutes(%BOMSItem_Object); 6. Create a Material object for the product material and add %BOMItem_Object as input. OLE_CreateObject(%Material_Object, "InTrack.Material"); %Material_Object.MaterialKey = "ChateauNatural"; returnCode = %Material_Object.AddInputItems(%BOMItem_Object, -1);

The following section provides property information for a BOMSubItem object. BOMSubItem objects have no methods. 4-26 Chapter 4

Properties

The following table describes the properties of a BOMSubItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

MaterialKey Message String r/w VersionKey of material UnitOfMeasure Message String r/w Quantity unit of measure SubstituteRatio Real Double r/w Substitution ratio. A ratio of 2.0 indicates that it takes 2 units of substitute material to replace 1 unit of the original material MaxSubstitutionPct Real Double r/w Maximum substitution percentage (0 - 100). A percentage of 50 indicates that up to half the original material can be substituted by the substitute material. Default value = 100 General Objects 4-27

BOMSubItems Object Class

A BOMSubItems object is a collection used to process multiple BOMSubItem objects. When you pass a BOMSubItems object into methods of a Material object, the individual BOMSubItem objects in the collection are processed automatically.

Identification

Collection Object Name: InBOMSubItems Interface Name: IInBOMSubItems InTouch Object Name: %BOMSubItems

To use a BOMSubItems object: 1. Create BOMSubItem objects and set their properties. 2. Create a BOMSubItems collection object. 3. Use the Add method of the BOMSubItems object to populate it with the individual BOMSubItem objects created in step 1. 4. Use the BOMSubItems object in the AddSubstitutes and RemoveSubstitutes methods of a BOMItem object. The following sections provide property and method information for a BOMSubItems collection object.

Properties

The following table describes the property of a BOMSubItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of BOMSubItem objects in the BOMSubItems collection 4-28 Chapter 4

Methods

This section describes the methods of BOMSubItems collection object.

Add

The Add method adds BOMSubItem objects to a BOMSubItems collection, as specified by %BOMSubItem in the method call.

Syntax returnCode = %BOMSubItems_Object.Add(%BOMSubItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%BOMSubItem Object Object BOMSubItem object(s) to add

Clear

The Clear method clears all BOMSubItem objects from the BOMSubItems collection.

Syntax returnCode = %BOMSubItems_Object.Clear();

Item

The Item method locates BOMSubItem objects in a BOMSubItems collection, as specified by index or materialKey in the method call.

Syntax %BOMSubItem_Object = %BOMSubItems_Object.Item(index); %BOMSubItem_Object = %BOMSubItems_Object.Item(materialKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the BOMSubItem object to locate (1 ≤ index ≤ Count) materialKey Message String VersionKey identifying the BOMSubItem object to locate General Objects 4-29

Remove

The Remove method removes selected BOMSubItem objects from a BOMSubItems collection, as specified by index, materialKey, or %BOMSubItem in the method call.

Syntax returnCode = %BOMSubItems_Object.Remove(index); returnCode = %BOMSubItems_Object.Remove(materialKey); returnCode = %BOMSubItems_Object.Remove(%BOMSubItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the BOMSubItem object to remove (1 ≤ index ≤ Count) materialKey Message String VersionKey identifying the BOMSubItem object to remove %BOMSubItem Object Object BOMSubItem object to remove 4-30 Chapter 4

CloseItem Object Class

A CloseItem object represents a sublot to close to inventory or to another route. It is used in the Close method of a Machine object. Multiple CloseItem objects can be grouped in a CloseItems object for processing as a collection.

Identification

Object Name: InCloseItem Interface Name: IInCloseItem InTouch Object Name: %CloseItem

To use a CloseItem object: 1. Create a CloseItem object. 2. Set the Sublot, PrimaryAmt, SecondaryAmt, DispositionCode, TargetSublot, and CreatedLot properties. 3. Use the CloseItem object in the Close method of a Machine object.

Example — Creating a CloseItem Object

This example creates a CloseItem object (%CloseItem_Object1) with a primary quantity of 100 units and a secondary quantity of 1200 ounces. The disposition code of the sublot after it has completed the route is “good” (OK) and the sublot is closed to a new lot, Lot_124 at waterroute[2]. 1. Create a CloseItem object. OLE_CreateObject(%CloseItem_Object1, “InTrack.CloseItem”); 2. Set the Sublot property to the sublot to close. %CloseItem_Object1.Sublot = “Lot_123@waterroute[1]:step1@location”; 3. Set the PrimaryAmt property to the primary quantity to close. %CloseItem_Object1.PrimaryAmt.Quantity = 100; %CloseItem_Object1.PrimaryAmt.Units = “units”; 4. Set the SecondaryAmt property to the secondary quantity to close. %CloseItem_Object1.SecondaryAmt.Quantity = 1200; %CloseItem_Object1.SecondaryAmt.Units = “ounces”; 5. Identify the disposition of the sublot after it has completed the route. %CloseItem_Object1.DispositionCode = “OK”; 6. Identify the target location of the sublot. %CloseItem_Object1.TargetSublot = “Lot_124@waterroute[2]:step1@location”; 7. Identify that the sublot quantity will be close to a new sublot. %CloseItem_Object1.CreateLot = -1; The following section provides property information for a CloseItem object. CloseItem objects have no methods. General Objects 4-31

Properties

The following table describes the properties of a CloseItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

Sublot Message String r/w SublotKey identifying the sublot to close PrimaryAmt Object Object r/w Amount object,primary quantity to close SecondaryAmt Object Object r/w Amount object, secondary quantity to close DispositionCode Message String r/w NameKey identifying the disposition of the sublot after it has completed a route; NONE is valid TargetSublot Message String r/w SublotKey identifying the inventory destination of the sublot CreateLot Discrete Boolean r/w Boolean value specifying to close the sublot to a: –1 = new sublot 0 = existing sublot 4-32 Chapter 4

CloseItems Object Class

A CloseItems object groups multiple CloseItem objects for processing as a collection. When you pass a CloseItems objects into the Close method of a Machine object, each CloseItem object in the collection is processed automatically.

Identification

Object Name: InCloseItems Interface Name: IInCloseItems InTouch Object Name: %CloseItems

To use a CloseItems object: 1. Create CloseItem objects and set their properties. 2. Create a CloseItems object. 3. Use the Add method of the CloseItems object to populate it with the individual CloseItem objects created in step 1. 4. Use the CloseItems object in the Close method of a Machine object. The following sections provide property and method information for CloseItems objects.

Property

The following table describes the property of a CloseItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of CloseItem objects in the CloseItems collection General Objects 4-33

Methods

This section describes the methods of a CloseItems object.

Add

The Add method adds CloseItem objects to a CloseItems collection, as specified by %CloseItem in the method call.

Syntax returnCode = %CloseItems_Object.Add(%CloseItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%CloseItem Object Object CloseItem object to add

Clear

The Clear method clears all CloseItem objects from the CloseItems collection.

Syntax returnCode = %CloseItems_Object.Clear();

Item

The Item method locates CloseItem objects in a CloseItems collection, as specified by index or sublotKey in the method call.

Syntax %CloseItem_Object = %CloseItems_Object.Item(index); %CloseItem_Object = %CloseItems_Object.Item(sublotKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the CloseItem object to locate (1 ≤ index ≤ Count) sublotKey Message String SublotKey identifying the CloseItem object to locate 4-34 Chapter 4

Remove

The Remove method removes selected CloseItem class from a CloseItems collection, as specified by index, sublotKey, or %CloseItem in the method call.

Syntax returnCode = %CloseItems_Object.Remove(index); returnCode = %CloseItems_Object.Remove(sublotKey); returnCode = %CloseItems_Object.Remove(%CloseItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the CloseItem object to remove (1 ≤ index ≤ Count) sublotKey Message String SublotKey identifying the CloseItem object to remove %CloseItem Object Object CloseItem object to remove General Objects 4-35

CompleteItem Object Class

A CompleteItem object represents a sublot to complete to inventory, to another route, to a new route step, or to a location. It is used in the Complete method of a Machine object. Multiple CompleteItem objects can be grouped in a CompleteItems object for processing as a collection.

Identification

Object Name: InCompleteItem Interface Name: IInCompleteItem InTouch Object Name: %CompleteItem

To use a CompleteItem object: 1. Create a CompleteItem object. 2. Set the Sublot, PrimaryAmt, SecondaryAmt, DispositionCode, ForceCompletion, CreatedLot and (optional) AtRoute, AtRouteStep, and UpdateQuantity properties. 3. Use the CompleteItem object in the Complete method of a Machine object.

Example — Creating a CompleteItem Object

This example creates a CompleteItem object (%CompleteItem_Object1) with a primary quantity of 100 units and a secondary quantity of 1200 ounces. The disposition code of the sublot after it has completed the route is good (OK), completion will not be forced, and the created sublot is named Lot_124. 1. Create a CompleteItem object. OLE_CreateObject(%CompleteItem_Object1, “InTrack.CompleteItem”); 2. Set the Sublot property to the sublot to complete. %CompleteItem_Object1.Sublot = “Lot_123@waterroute[1]:step1@location”; 3. Set the PrimaryAmt property to the primary quantity to complete. %CompleteItem_Object1.PrimaryAmt.Quantity = 100; %CompleteItem_Object1.PrimaryAmt.Units = “units”; 4. Set the SecondaryAmt property to the secondary quantity to complete. %CompleteItem_Object1.SecondaryAmt.Quantity = 1200; %CompleteItem_Object1.SecondaryAmt.Units = “ounces”; 5. Set the DispositionCode property. %CompleteItem_Object1.DispositionCode = “OK”; 6. Set the ForceCompletion property. %CompleteItem_Object1.ForceCompletion = 0; The following section provides property information for a CompleteItem object. CompleteItem objects have no methods. 4-36 Chapter 4

Properties

The following table describes the properties of a CompleteItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

Sublot Message String r/w SublotKey identifying the sublot to complete PrimaryAmt Object Object r/w Amount object, primary quantity to complete SecondaryAmt Object Object r/w Amount object, secondary quantity to complete DispositionCode Message String r/w NameKey identifying the disposition of the sublot after it has completed a route step AtRoute Message String r/w VersionKey identifying the route for recording scrap AtRouteStep Message String r/w NameKey identifying the route step for recording scrap UpdateQuantity Discrete Boolean r/w Boolean value indicating to decrement the primary quantity of the sublot: –1 = decrement 0 = do not decrement This property is used for recording scrap ForceCompletion Discrete Boolean r/w Boolean value specifying to stop tracking the remaining quantity at the operation (only applies when a partial quantity is completed): –1 = force completion and stop tracking remaining quantity 0 = do not force completion CreatedLot NameKey String r/w NameKey identifying the lot ID of the material output General Objects 4-37

CompleteItems Object Class

A CompleteItems object groups multiple CompleteItem objects for processing as a collection. When you pass a CompleteItems object into the Complete method of a Machine object, each CompleteItem object in the collection is processed automatically.

Identification

Object Name: InCompleteItems Interface Name: IInCompleteItems InTouch Object Name: %CompleteItems

To use a CompleteItems object: 1. Create CompleteItem objects and set their properties. 2. Create a CompleteItems object. 3. Use the Add method of the CompleteItems object to populate it with the individual CompleteItem objects created in step 1. 4. Use the CompleteItems object in the Complete method of a Machine object. The following sections provide property and method information for CompleteItems objects.

Property

The following table describes the property of a CompleteItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of CompleteItem objects in the collection 4-38 Chapter 4

Methods

This section describes the methods of a CompleteItems object.

Add

The Add method adds CompleteItem objects to the CompleteItems collection, as specified by %CompleteItem in the method call.

Syntax returnCode = %CompleteItems_Object.Add(%CompleteItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%CompleteItem Object Object CompleteItem objects to add

Clear

The Clear method clears all CompleteItem objects from the CompleteItems collection.

Syntax returnCode = %CompleteItems_Object.Clear();

Item

The Item method locates CompleteItem objects in a CompleteItems collection, as specified by index or sublotKey in the method call.

Syntax %CompleteItem_Object = %CompleteItems_Object.Item(index); %CompleteItem_Object = %CompleteItems_Object.Item(sublotKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the CompleteItem object to locate (1 ≤ index ≤ Count) sublotKey Message String SublotKey identifying the CompleteItem object to locate General Objects 4-39

Remove

The Remove method removes selected CompleteItem objects from a CompleteItems collection, as specified by index, sublotKey, or %CompleteItem in the method call.

Syntax returnCode = %CompleteItem_Object.Remove(index); returnCode = %CompleteItem_Object.Remove(sublotKey); returnCode = %CompleteItem_Object.Remove(%CompleteItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the CompleteItem object to remove (1 ≤ index ≤ Count) sublotKey Message String SublotKey identifying the CompleteItem object to remove %CompleteItem Object Object CompleteItem object to remove 4-40 Chapter 4

ConsumableMaterial Object Class

A ConsumableMaterial object represents a primary or substitute material to consume at a route step. The ConsumableMaterial object and its grouping object have two possible uses: As a list of modeled consumable materials at a specific route step, populated by the GetConsumableMaterial method of a Sublot object. As a list of inventory to be consumed. The ConsumableMaterial object or its grouping object can be used to consume specific lots or to consume a material that has no inventory lots through the Consume and Assemble methods of a Sublot object. Multiple ConsumableMaterial objects can be grouped together in a Consumable Materials collection for processing.

Identification

Object Name: InConsumableMaterial Interface Name: IinConsumableMaterial InTouch Object Name: %ConsumableMaterial

To use a ConsumableMaterial object: 1. Create a ConsumableMaterial object. 2. Create a ConsumeItems object. 3. Use the Add method of the ConsumeItems object to populate it with individual ConsumeItem objects (one for each sublot to consume). 4. Set the Material, StandardQty, UnitOfMeasure and ConsumeItems properties. 5. Use the ConsumableMaterial object in the Consume and Assemble methods of a Sublot object.

The following section provides property and method information for a ConsumableMaterial object. General Objects 4-41

Example — Consuming Material without Inventory Lots

This code demonstrates how to consume a material that is not modeled at the route step and has no inventory lots in the database. 1. Generate a ConsumeItem object with a dummy LotID and dummy quantity. Set the Forced consumption bit to true since the material is not modeled and the Update Quantity bit to false since there is no inventory record to update. OLE_CreateObject(%ConsumeItem, "InTrack.ConsumeItem"); %ConsumeItem.Sublot = "Dummy@location"; %ConsumeItem.PrimaryAmt.Quantity = 10; %ConsumeItem.ForceConsumption = -1; %ConsumeItem.UpdateQuantity = 0; 2. Generate a Consumable Material object with the non-modeled material to consume and the quantity to be consumed. OLE_CreateObject(%ConsumableMaterial, "InTrack.ConsumableMaterial"); returnCode = %ConsumableMaterial.SetMaterial( "Material[vers]" ); %ConsumableMaterial.StandardQty = 10; 3. Add the %ConsumeItem object to the list to associate the dummy lot with the material. %ConsumableMaterial.ConsumeItems.Add( %ConsumeItem); 4. Call the Consume method. %Sublot.Consume( %ConsumableMaterial )

Properties

The following table describes the properties of a ConsumableMaterial object.

Data Type Data Type Property (InTouch) (VB) Access Description

Material Message String r VersionKey identifying the material to consume StandardQty Integer Double r/w Standard quantity to consume UnitOfMeasure Message String r Standard quantity units of measure ConsumeItems Object Object r/w Sublot(s) to consume 4-42 Chapter 4

Methods

This section describes the methods of a ConsumableMaterial object.

SetMaterial

The SetMaterial method sets the Material property of a ConsumableMaterial object.

Syntax returnCode = %ConsumableMaterial_Object.SetMaterial(Material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Material Message String VersionKey identifying the material to consume

General Objects 4-43

ConsumableMaterials Object Class

A ConsumableMaterials object groups multiple ConsumableMaterial objects for processing as a collection. When you pass a ConsumableMaterials object to the Consume or Assemble methods of a Sublot object, each ConsumableMaterial object contained in the collection is automatically processed. This object is also the returned parameter for the GetConsumableMaterials method of a Sublot object.

Identification

Object Name: InConsumableMaterials Interface Name: IInConsumableMaterials InTouch Object Name: %ConsumableMaterials

To use a ConsumableMaterials object: 1. Create a ConsumableMaterials object. 2. Populate the ConsumableMaterials object using one of the procedures described below: Populate with individual ConsumableMaterial objects. a. Create ConsumableMaterial objects and set their properties. b. Use the Add method of the ConsumableMaterials object to populate it with the individual ConsumableMaterial objects. Populate using methods of a Sublot object. a. To add a ConsumableMaterial object for each primary material eligible for consumption, call the GetConsumableMaterials method of a Sublot object. b. To add a ConsumableMaterial object for each substitute material eligible for consumption, call the GetSubstituteMaterials method of a Sublot object. 3. Use the ConsumableMaterials object for consumption with the Consume or Assemble methods of a Sublot object only if the ConsumeItems properties have been directly set. It is not possible to consume material when the ConsumableMaterials object has only been populated from the GetConsumableMaterials method call of the sublot. The following sections provide property and method information for a ConsumableMaterials object. 4-44 Chapter 4

Property

The following table describes the property of a ConsumableMaterials object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of ConsumableMaterial objects in the ConsumableMaterials collection

Methods

This section describes the methods of a ConsumableMaterials object.

Add

The Add method adds ConsumableMaterial(s) objects to a ConsumableMaterials collection, as specified by %ConsumableMaterial in the method call.

Syntax returnCode = %ConsumableMaterials_Object.Add(%ConsumableMaterial); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%ConsumableMaterial Object Object ConsumableMaterial object to add

Clear

The Clear method clears all ConsumableMaterial objects from a ConsumableMaterials collection.

Syntax returnCode = %ConsumableMaterials_Object.Clear(); General Objects 4-45

Item

The Item method locates ConsumableMaterial objects in a ConsumableMaterials collection, as specified by index or versionKey in the method call.

Syntax %ConsumableMaterial_Object = %ConsumableMaterials_Object.Item(index); %ConsumableMaterial_Object = %ConsumableMaterials_Object.Item(versionKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the ConsumableMaterial object to locate (1 ≤ index ≤ Count) versionKey Message String VersionKey identifying the ConsumableMaterial item to locate

Remove

The Remove method removes selected ConsumableMaterial objects from a ConsumableMaterials collection, as specified by index, versionKey, or %ConsumableMaterial in the method call.

Syntax returnCode = %ConsumableMaterials_Object.Remove(index); returnCode = %ConsumableMaterials_Object.Remove(versionKey); returnCode = %ConsumableMaterials_Object.Remove(%ConsumableMaterial); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the ConsumableMaterial object to remove (1 ≤ index ≤ Count) versionKey Message String VersionKey identifying the ConsumableMaterial object to remove %ConsumableMaterial Object Object ConsumableMaterial object to remove 4-46 Chapter 4

ConsumeItem Object Class

A ConsumeItem object represents a sublot material and quantity to consume. It is used in the Consume and Assemble methods of a Sublot object . The sublot to consume can contain serial numbers. If a ConsumeItem object defines its PrimaryAmt property with a fully serialized Amount object, you do not need to set the Sublot property. The PrimaryAmt and SecondaryAmt properties of a ConsumeItem object are Amount objects. You can set the PrimaryAmt and SecondaryAmt properties according to the standard procedure or you can create Amount objects to represent the PrimaryAmt and SecondaryAmt quantities. Multiple ConsumeItem objects can be combined in a ConsumeItems collection object for processing.

Identification

Object Name: InConsumeItem Interface Name: IInConsumeItem InTouch Object Name: %ConsumeItem

To use a ConsumeItem object: 1. Create a ConsumeItem object. 2. Set the SublotKey, PrimaryAmt, SecondaryAmt, UpdateQuantity, and ForceConsumption properties. The MachineName property must be set if the sublot is started on a machine. 3. Use the ConsumeItem object in the Consume and Assemble methods of a Sublot item.

Example

This example creates a ConsumeItem object (%ConsumeItem_Object1) with a primary quantity of 100 units and a secondary quantity of 1200 ounces. The ForceCompletion property is set to not force completion. The UpdateQuantity property is set to not decrement the quantity of consumed material. 1. Create a ConsumeItem object. OLE_CreateObject(%ConsumeItem_Object1, “InTrack.ConsumeItem”); 2. Set the Sublot property to the sublot to consume. %ConsumeItem_Object1.Sublot = “Lot_123@waterroute[1]:step1@location”; 3. Set the PrimaryAmt property to the primary quantity to consume. %ConsumeItem_Object1.%PrimaryAmt.Quantity = 100; %ConsumeItem_Object1.%PrimaryAmt.Units = “units”; 4. Set the SecondaryAmt property to the secondary quantity to consume. %ConsumeItem_Object1.%SecondaryAmt.Quantity = 1200; %ConsumeItem_Object1.%SecondaryAmt.Units = “ounces”; 5. Set the ForceConsumption property. %ConsumeItem_Object1.ForceConsumption = 0; 6. Set the UpdateQuantity property. %ConsumeItem_Object1.UpDateQuantity = 1; General Objects 4-47

Properties

The following table describes the properties of a ConsumeItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

Sublot Message String r/w SublotKey identifying the sublot to consume PrimaryAmt Object Object r/w Primary quantity to consume (Amount object) SecondaryAmt Object Amount r/w Secondary quantity to consume (Amount object) ForceConsumption Discrete Boolean r/w Boolean value used to force consumption of a material that has not been defined as input: –1 = force 0 = do not force UpdateQuantity Discrete Boolean r/w Boolean value used to decrement the quantity of the consumed sublot: This property is valid only when ForceConsumption is true and the specified LotID does not exist in the database. –1 = decrement 0 = do not decrement MachineName Message String r/w Name of the machine 4-48 Chapter 4

ConsumeItems Object Class

A ConsumeItems object is used to process multiple ConsumeItem objects as a collection. When you pass a ConsumeItems object into either or both of the Consume and Assemble methods of a Sublot object , the individual ConsumeItem objects are processed automatically.

Identification

Object Name: InConsumeItems Interface Name: IinConsumeItems InTouch Object Name: %ConsumeItems

To use a ConsumeItems collection object: 1. Create a ConsumeItems object and set the properties. 2. Populate the ConsumeItems object using one of the procedures described below: Populate with individual ConsumeItem objects. a. Create ConsumeItem objects and set their properties. b. Use the Add method of the ConsumeItems collection to populate it with individual ConsumeItem objects. Populate using methods of a Sublot object. To add a ConsumeItem object for each sublot eligible for consumption, call the GetAllConsumeItems method of the Sublot object. To add a ConsumeItem object for each sublot eligible for consumption based on selected filters, call the GetConsumeItems method of the Sublot object. 3. Use the ConsumeItems object in either or both of the Consume and Assemble methods of a Sublot object. The following sections provide property and method information for a ConsumeItems object.

Property

The following table describes the property of a ConsumeItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of ConsumeItem objects in the ConsumeItems collection General Objects 4-49

Methods

This section describes the methods of a ConsumeItems collection.

Add

The Add method adds ConsumeItem objects to a ConsumeItems collection, as specified by %ConsumeItem in the method call.

Syntax returnCode = %ConsumeItems_Object.Add(%ConsumeItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%ConsumeItem Object Object ConsumeItem object(s) to add

Clear

The Clear method clears all ConsumeItem objects from the ConsumeItems collection.

Syntax returnCode = %ConsumeItems_Object.Clear();

Item

The Item method locates ConsumeItem objects in a ConsumeItems collection, as specified by index or sublotKey in the method call.

Syntax %ConsumeItem_Object = %ConsumeItems_Object.Item(index); %ConsumeItem_Object = %ConsumeItems_Object.Item(sublotKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the ConsumeItem object to locate (1 ≤ index ≤ Count) sublotKey Message String SublotKey identifying the ConsumeItem object to locate 4-50 Chapter 4

Remove

The Remove method removes selected ConsumeItem objects from a ConsumeItems collection, as specified by index, sublotKey, or %ConsumeItem in the method call.

Syntax returnCode = %ConsumeItems_Object.Remove(index); returnCode = %ConsumeItems_Object.Remove(%ConsumeItem); returnCode = %ConsumeItems_Object.Remove(sublotKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the ConsumeItem object to remove (1 ≤ index ≤ Count) %ConsumeItem Object Object ConsumeItem object to remove sublotKey Message String SublotKey identifying the ConsumeItem object to remove General Objects 4-51

Date Object Class

A Date object sets date properties. When created, a single Date object can be used in any property or method parameter requiring the same date. The following sections provide property and method information for a Date object.

Identification

Object Name: InDate Interface Name: IInDate InTouch Object Name: %Date

Properties

The following table describes the properties of a Date object.

Data Type Data Type Property (InTouch) (VB) Access Description

Month Integer Short r/w Two digit number, from 1 to 12, representing the month Day Integer Short r/w Two digit number, from 1 to 31, representing the day Year Integer Short r/w Four-digit number representing a year 4-52 Chapter 4

Methods

This section describes the methods of a Date object.

Add

The Add method adds a Time or TimeInterval object to a Date object, as specified by %Time or %TimeInterval in the method call.

Syntax returnCode = %Date_Object.Add(%Time); returnCode = %Date_Object.Add(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%Time Object Object Time object to add %TimeInterval Object Object TimeInterval object to add

Diff

The Diff method subtracts a Time or TimeInterval object from a Date object, as specified by %Time or %TimeInterval in the method call.

Syntax returnCode = %Date_Object.Diff(%Time); returnCode = %Date_Object.Diff(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%Time Object Object Time object to subtract %TimeInterval Object Object TimeInterval object to subtract

GetString

The GetString method converts the current property settings of a Date object to a string that can be displayed as text.

Syntax dateString = %Date_Object.GetString();

Note: dateString must be defined as a Message data type. General Objects 4-53

IsEqual

The IsEqual method compares two date objects and returns a value of true (-1) if they are equal.

Syntax Discrete = %Date1.IsEqual(%Date2);

IsGreater

The IsGreater method compares two date objects and returns a value of true (-1) if the calling object (%Date1) has a date after the passed object (%Date2).

Syntax Discrete = %Date1.IsGreater(%Date2);

IsLess

The IsLess method compares two date objects and returns a value of true (-1) if the calling object (%Date1) has a date before the passed object (%Date2).

Syntax Discrete = %Date1.IsLess(%Date2);

SetLocalTime

The SetLocalTime method sets the Month, Day, and Year properties of a Date object to the current computer time.

Syntax returnCode = %Date_Object.SetLocalTime(); 4-54 Chapter 4

SetMonthDayYear

The SetMonthDayYear method sets the Month, Day, and Year properties of a Date object.

Syntax returnCode = %Date_Object.SetMonthDayYear(month, day, year); where:

Data Type Data Type Parameter (InTouch) (VB) Description

month Integer Short Two digit number, from 1 to 12, representing the month day Integer Short Two digit number, from 1 to 31, representing the day year Integer Short Four digit number representing a year

TimeSpan

The TimeSpan method returns a TimeInterval object to show the difference between two date objects.

Syntax %TimeInterval = %Date1.TimeSpan(%Date2); General Objects 4-55

DateTime Object Class

DateTime objects contain date and time information.

Identification

Object Name: InDateTime Interface Name: IInDateTime InTouch Object Name: %DateTime

Using DateTime Objects

DateTime objects are used to set: BackDate property in Database object class CreateDate and the DueDate properties in the Lot object class CompletionDate, TimeStarted, and TimeQueued properties in the Sublot object class TimeLastChanged property in the WorkInstructions object class CollectTime property in the DataSetSample object class. CollectTime property in the SetpointSample object class There are four ways to set the properties of a DateTime object: Set the properties with scripting. Use the SetHourMinSec and the SetMonthDayYear methods to set the properties. Use the SetLocalTime method. Set the object to another object’s properties. A DateTime object provides date and time information as an input parameter in the Create and SetDueDate methods of a Lot object. It also provides date and time information in the Create, GetCompletionDate, and Receive methods of a Sublot object. A DataSetSample object requires a DateTime object to specify time information in its LoadLotSample, LoadMachineSample, SupersedeSample, and SupersedeLotSample methods. After created, a DateTime object can be reused in any method requiring the same date and time. The following sections provide property and method information for DateTime objects. 4-56 Chapter 4

Properties

The following table describes the properties of a DateTime object.

Data Type Data Type Property (InTouch) (VB) Access Description

Month Integer Short r/w Two digit number, from 1 to 12, MUST be set after Day Day Integer Short r/w Two digit number, from 1 to 31, MUST be set before month Year Integer Short r/w Four digit number representing a year, or zero (0) Hour Integer Short r/w Two digit number, from 0 to 23, representing hours Minute Integer Short r/w Two digit number, from 0 to 59, representing minutes Second Integer Short r/w Two digit number, from 0 to 59, representing seconds Date Message String r/w Date

Methods

This section describes the methods of a DateTime object.

Add

The Add method adds Time or TimeInterval objects as specified by %Time or %TimeInterval in the method call.

Syntax returnCode = %DateTime_Object.Add(%Time); returnCode = %DateTime_Object.Add(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%Time Object Object Time object to add %TimeInterval Object Object TimeInterval object to add General Objects 4-57

Diff

The Diff method subtracts a Time or TimeInterval object from a DateTime object, as specified by %Time or %TimeInterval in the method call.

Syntax returnCode = %DateTime_Object.Diff(%Time); returnCode = %DateTime_Object.Diff(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%Time Object Object Time object to subtract %TimeInterval Object Object TimeInterval object to subtract

GetString

The GetString method converts the current property settings of a DateTime object to a string that can be displayed as text.

Syntax dateTimeString = %DateTime_Object.GetString();

Note: dateTimeString must be defined as a Message data type. 4-58 Chapter 4

IsEqual

The IsEqual method compares two DateTimeTime objects and returns a value of true (-1) if they are equal.

Syntax Discrete = %DateTime1.IsEqual(%DateTime2);

IsGreater

The IsGreater method compares two DateTime objects and returns a value of true (-1) if the calling object (%DateTime1) has a DateTime after the passed object (%DateTime2).

Syntax Discrete = %DateTime1.IsGreater(%DateTime2);

IsLess

The IsLess method compares two DateTime objects and returns a value of true (-1) if the calling object (%DateTime1) has a DateTime before the passed object (%DateTime2).

Syntax Discrete = %DateTime1.IsLess(%DateTime2); General Objects 4-59

SetDateTime

The SetDateTime method sets all properties of a DateTime object.

Syntax returnCode = %DateTime_Object.SetDateTime(month, day, year, hour, minute, second); where:

Data Type Data Type Parameter (InTouch) (VB) Description

month Integer Short Two digit number, from 1 to 12, representing month day Integer Short Two digit number, from 1 to 31, representing day year Integer Short Four digit number, representing the year hour Integer Short Two digit number, from 0 to 23, representing hours minute Integer Short Two digit number, from 0 to 59, representing minutes second Integer Short Two digit number, from 0 to 59, representing seconds

SetHourMinSec

The SetHourMinSec method sets the Hour, Minute, and Second properties of a DateTime object, in military format: 00:00:00.

Syntax returnCode = %DateTime_Object.SetHourMinSec(hour, minute, second); where:

Data Type Data Type Parameter (InTouch) (VB) Description

hour Integer Short Two digit number, from 0 to 23, representing hours minute Integer Short Two digit number, from 0 to 59, representing minutes second Integer Short Two digit number, from 0 to 59, representing seconds 4-60 Chapter 4

Example

The following script uses the SetHourMinSec method to set the time properties of a DateTime object (%DateTime_Object) to 5:35 p.m.. returnCode = %DateTime_Object.SetHourMinSec(17, 35, 00);

SetLocalTime

The SetLocalTime method sets all properties of the DateTime object to the current computer time.

Syntax returnCode = %DateTime_Object.SetLocalTime();

SetMonthDayYear

The SetMonthDayYear method sets the Month, Day, and Year properties of the DateTime object.

Syntax returnCode = %DateTime_Object.SetMonthDayYear(month, day, year); where:

Data Type Data Type Parameter (InTouch) (VB) Description

month Integer Short Two digit number, from 1 to 12, representing the month day Integer Short Two digit number, from 1 to 31, representing the day year Integer Short Four digit number representing a year, or zero (0)

Example

The following script uses the SetMonthDayYear method to set the date properties of a DateTime object (%DateTime_Object) to April 15, 1996. returnCode = %DateTime_Object.SetMonthDayYear(4, 15, 1996); General Objects 4-61

TimeSpan

The TimeSpan method returns a TimeInterval object to show the difference between two DateTime objects.

Syntax %TimeInterval = %DateTime1.TimeSpan(%DateTime2); 4-62 Chapter 4

DisassembleItem Object Class

A DisassembleItem object represents a material and quantity to disassemble from an existing sublot. It is used in the Unassemble method of a Sublot object.

Identification

Object Name: InDisassembleItem Interface Name: IInDisassembleItem InTouch Object Name: %DisassembleItem

Using DisassembleItem Objects

The PrimaryAmt and SecondaryAmt properties of a DisassembleItem object are Amount objects. You can set the PrimaryAmt and SecondaryAmt properties using the standard procedure or you can create Amount objects to represent the PrimaryAmt and SecondaryAmt quantities. If the sublot to disassemble contains serialized components, these are specified in the PrimaryAmt object. The UpdateQuantity property controls whether the quantity in the target sublot is increased by the transaction amount. If TRUE, the transaction behaves like the Disassemble transaction. If FALSE, no attempt is made to either create or update InTrack inventory.

Note: This property overrides the CreateSublot property. For example, if UpdateQuantity is FALSE but CreateSublot is TRUE, then no sublot is created.

Multiple DisassembleItem objects can be grouped together into a DisassembleItems object for processing as a collection.

To use a DisassembleItem object: 1. Create a DisassembleItem object. 2. Set the Sublot, PrimaryAmt, SecondaryAmt, CreateSublot, and UpdateQuantity properties. 3. Use the DisassembleItem object in the Unassemble method of a Sublot object.

Example — Creating a DisassembleItem Object

This example creates a DisassembleItem class (% DisassembleItem _Object) with a primary quantity of 100 units and a secondary quantity of 1200 ounces for material abc[1]. The UpdateQuantity property is set to increment the quantity of disassembled material. 1. Create a DisassembleItem object. OLE_CreateObject(%DisassembleItem_Object, “InTrack.DisassembleItem”); 2. Set the Sublot property to the sublot to disassemble into. %DisassembleItem_Object.Sublot = “Lot_123@route[1]:step1@loc1”; 3. Set the PrimaryAmt property to the primary quantity to disassemble. %DisassembleItem_Object.PrimaryAmt.Quantity = 100; %DisassembleItem_Object.PrimaryAmt.Units = “units”; General Objects 4-63

4. Set the SecondaryAmt property to the secondary quantity to disassemble. %DisassembleItem_Object.SecondaryAmt.Quantity = 1200; %DisassembleItem_Object.SecondaryAmt.Units = “ounces”; 5. Set the CreateSublot property for a new sublot. %DisassembleItem_Object.CreateSublot = -1; 6. Set the material to be disassembled. returnCode = %DisassembleItem_Object.SetMaterial(“abc[1]”); 7. Set the UpdateQuantity property. %DisassembleItem_Object.UpDateQuantity = -1; The following section provides property and method information for a DisassembleItem object.

Properties

The following table describes the properties of a DisassembleItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

Sublot Message String r/w SublotKey identifying the destination sublot Material Message String r VersionKey identifying name and version of material to disassemble PrimaryAmt Object Object r/w Primary amount of the disassembled component (can be serialized) SecondaryAmt Object Object r/w Secondary amount of the disassembled component CreateSublot Discrete Boolean r/w Boolean value used to create the destination sublot: –1 = create 0 = do not create UpdateQuantity Discrete Boolean r/w Boolean value used to increment the quantity of the target sublot: –1 = increment 0 = do not increment 4-64 Chapter 4

Methods

This section describes the methods of a DisassembleItem object.

SetMaterial

The SetMaterial method sets the Material property of a DisassembleItem object.

Syntax returnCode = %DisassembleItem_Object.SetMaterial(Material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Material Message String VersionKey identifying the material to disassemble

General Objects 4-65

DisassembleItems Object Class

A DisassembleItems object groups multiple DisassembleItem objects for processing as a collection. When you pass a DisassembleItems object into the Unassemble method of a Sublot object, each DisassembleItem object in the collection is processed automatically.

Identification

Object Name: InDisassembleItems Interface Name: IinDisassembleItems InTouch Object Name: %DisassembleItems

To use a DisassembleItems object: 1. Create a DisassembleItems object. 2. Populate the DisassembleItems object using the procedure described below: a. Create DisassembleItem objects and set their properties. b. Use the Add method of the DisassembleItems object to populate it with individual DisassembleItem objects. 3. Use the DisassembleItems object in the Unassemble method of a Sublot object. The following sections provide property and method information for a DisassembleItems object.

Property

The following table describes the property of a DisassembleItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of DisassembleItem objects in the DisassembleItems collection 4-66 Chapter 4

Methods

This section describes the methods of a DisassembleItems object.

Add

The Add method adds DisassembleItem objects to a DisassembleItems collection, as specified by %DisassembleItem in the method call.

Syntax returnCode = %DisassembleItems_Object.Add(%DisassembleItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%DisassembleItem Object Object DisassembleItem objects to add

Clear

The Clear method clears all DisassembleItem objects from a DisassembleItems collection.

Syntax returnCode = %DisassembleItems_Object.Clear();

Item

The Item method locates DisassembleItem objects in a DisassembleItems collection, as specified by index or sublotKey in the method call.

Syntax %DisassembleItem_Object = %DisassembleItems_Object.Item(index); %DisassembleItem_Object = %DisassembleItems_Object.Item(sublotKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the DisassembleItem objectto locate (1 ≤ index ≤ Count) sublotKey Message String SublotKey identifying the DisassembleItem object to locate General Objects 4-67

Remove

The Remove method removes selected DisassembleItem objects from a DisassembleItems collection, as specified by index, sublotKey, or %DisassembleItem in the method call.

Syntax returnCode = %DisassembleItems_Object.Remove(index); returnCode = %DisassembleItems_Object.Remove(%DisassembleItem); returnCode = %DisassembleItems_Object.Remove(sublotKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the DisassembleItem item to remove (1 ≤ index ≤ Count) %DisassembleItem Object Object DisassembleItem object to remove sublotKey Message String SublotKey identifying the DisassembleItem object to remove 4-68 Chapter 4

Selector Object Class

A Selector object provides access to the sublots or machines in a selector. A selector is a spreadsheet-type display object used for viewing and selecting work items (sublots or machines) at runtime. A Selector object gives you access to a sublot’s SublotKey or a machine’s MachineKey, which are needed to perform transactions.

NOTE: Selector objects are no longer supported by Wonderware. They are included in InTrack for back compatibility with older systems only. Use the ActiveX control Selector to view and select items. Refer to Chapter 10 for details on ActiveX controls.

After you have used the AttachTo method to associate a Selector object with a selector, you can obtain the Sublot(Key) corresponding to a sublot or the MachineKey corresponding to a machine by highlighting the item in the selector. The object key corresponding to the currently highlighted item is returned in the Selection property of the Selector object and can be used in a script to set the Sublot(Key) and MachineKey properties of other automation objects.

Identification

Object Name: InSelector Interface Name: IInSelector InTouch Object Name: %Selector

Optional Selector Properties

An Selector object has four optional properties: SelectionChangeTagName MaxNumberOfRows Filter Sort.

SelectionChangeTagName Property

SelectionChangeTagName lets you identify whether a selection in the selector has changed. SelectionChangeTagName should be set to the name of a Discrete tag to which any important data change script has been attached. General Objects 4-69

MaxNumberOfRows Property

MaxNumberOfRows lets you specify the maximum number of rows to read from the database and display in the selector. If you do not specify a value for this property, the default value 100 is used.

Filter and Sort Properties

Filter and Sort let you specify the type and order of information displayed in the selector. You must attach the Selector object to a selector with the AttachTo method before setting either the Filter or Sort properties. After the Filter and Sort properties have been set, they do not become active until the Refresh method is called. The Filter property of a Selector object determines the sublots or machines displayed in their respective selectors based on specified parameters. Properties, such as lot ID, material type, or machine name, are stored in fields (columns) in InTrack database tables. When setting the Filter property of a Selector object , you must specify: A table alias A valid column name in the database table (including a UDA column) One or more values to serve as the search criteria The Filter property can be up to 131 characters long. Multiple column names and values can be specified using logical operators, such as AND or OR, but do not exceed the character limit. Refer to your database application’s documentation for possible search conditions. To reduce the number of characters required to specify multiple database table names, the tables containing sublot and machine information have been assigned aliases. Aliases are predetermined and cannot be changed. Aliases are different for sublots and machines, as shown in the following tables. For WIP, inventory lots, and bulk inventory:

Table Name Alias Applicable Activity Objects

Lot a WIP, inventory lot, bulk inventory Sublot b WIP, inventory lot, bulk inventory Material c inventory lot, bulk inventory 4-70 Chapter 4

For machines:

Table Name Alias Applicable Activity Objects

Machine a machine MachineStatus b machine

The Sort property of a Selector object specifies the order in which the filtered sublots or machines are displayed in their respective selectors. When setting the Sort property you must specify: The table alias The basis for ordering sublots or machines (for example, date, priority, machine type, or UDA name) Whether the sublots or machines should be listed in the selector in ascending (ASC) or descending (DESC) order For information on valid syntax for the Sort property, which is an ORDER BY expression, refer to the documentation for your database application.

NOTE: After a selector has been created, the order of the sublots or machines in it cannot be changed by the user at runtime. If you are using InTouch to create your runtime application, you can override the selector default settings and the optional Sort property of a Selector object by checking the “Allow user runtime sorting” check box in the appropriate InTrack Grid Configuration dialog box. If this is done, the user can alphabetically resort the selector by any column simply by double-clicking the selected column heading.

For more information on the InTrack Grid Configuration dialog box, see the InTrack Runtime Development User’s Guide.

Example 1 — Using a Selector in a Sublot Transaction

The following script uses a selector to identify a sublot on which a Sublot object will perform transactions. This example creates a Selector object (%Selector_Object) and a Sublot object (%Sublot_Object) and associates the two so that the Sublot object’s SublotKey is updated to the currently highlighted selection in the selector.

Note: SelectionChange must be defined as a Discrete data type.

1. Create a Selector object. OLE_CreateObject(%Selector_Object, “InTrack.Selector”); 2. Attach %Selector_Object to the selector named A WIP Selector. returnCode = %Selector_Object.AttachTo(“A WIP Selector”);

Note: A Selector object must be attached to a selector with the AttachTo method before the Filter and Sort properties can be set. General Objects 4-71

3. Set the SelectionChangeTagName property to return a message when you have highlighted a new selection in A WIP Selector. %Selector_Object.SelectionChangeTagName = SelectionChange; 4. Set the Filter property. %Selector_Object.Filter = “b.RouteName = ‘Route1’”; 5. Set the Sort property. %Selector_Object.Sort = “b.TimeStarted DESC”; 6. Call the Refresh method to make %Selector_Object’s Filter and Sort properties effective. returnCode = %Selector_Object.Refresh();

Note: After the Filter and Sort properties have been set, they do not become active until the Refresh method is called.

7. Create a Sublot object. OLE_CreateObject(%Sublot_Object, “InTrack.Sublot”); 8. Set the SublotKey of %Sublot_Object to update to the currently highlighted selection in A WIP Selector. %Sublot_Object.SublotKey = %Selector_Object.Selection; 4-72 Chapter 4

Properties

The following table describes the properties of a Selector object.

Data Type Data Type Property (InTouch) (VB) Access Description

Selection Message String r/w Object key (SublotKey for a sublot and MachineKey for a machine) AttachedWindow Message String r Name of a selector to which the Selector object is attached SelectionChangeTagName Message String r/w (optional) SelectionChange tag name MaxNumberOfRows Integer Long r/w (optional) Maximum number of rows to read from the database and display ( –1, 0 ≤ value ≤ 32767 ) Default value = 100. Note: Use value –1 to read all rows Filter Message String r/w (optional) SQL WHERE expression used for filtering the data displayed Sort Message String r/w (optional) Order data is displayed General Objects 4-73

Methods

This section describes the methods of a Selector object.

AttachTo

The AttachTo method associates the Selector object with a specific selector (WIP Selector, Inventory Lot Selector, Bulk Inventory Selector, or Machine Selector).

Note: To attach a Selector object to a selector, the selector name in the SelectorName field of the appropriate WindowMaker InTrack Grid Configuration dialog box must be the same as the selector name used in the AttachTo method’s selectorName parameter.

For more information on the WindowMaker InTrack Grid Configuration dialog box, see the InTrack Runtime Development User’s Guide.

Syntax returnCode = %Selector_Object.AttachTo(selectorName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

selectorName Message String Name of the selector containing the sublot or machine of interest

Refresh

The Refresh method updates a selector with current data, applying any set Filter or Sort specifications.

Syntax returnCode = %Selector_Object.Refresh(); 4-74 Chapter 4

SerialNumbers Object Class

A SerialNumbers object provides serial number information as an input parameter for several methods. Serial numbers provide full traceability by letting you serialize the individual units into which lots and sublots can be broken and track each unit separately. A SerialNumbers object identifies the serial numbers to manipulate in the AddSerialNumbers, RemoveSerialNumbers, GetSerialNumbers, and Serialize methods of an Amount object. A Sublot object also requires a SerialNumbers object to specify serialized sublots in the Consume and Assemble methods as well as the serial numbers to manipulate in the AddSerialNumbers and RemoveSerialNumbers methods.

Identification

Object Name: InSerialNumbers Interface Name: IInSerialNumbers InTouch Object Name: %SerialNumbers

Using SerialNumbers Objects

A SerialNumbers object is created empty. It is a collection object that adds serial numbers to an Amount object according to the following procedure: 1. Create a SerialNumbers object. 2. Use the Add method of the SerialNumbers object class to populate it with serial numbers. 3. Create an Amount object . 4. Use one of the following two methods to populate an Amount object with the serial numbers added to the SerialNumbers object in step 2. If the Amount object is empty, use the Serialize method. If the Amount object contains serial numbers, use the AddSerialNumbers method. The following sections provide property and method information for a SerialNumbers object.

Property

The following table describes the property of a SerialNumbers object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of serial numbers in the SerialNumbers object General Objects 4-75

Methods

This section describes the methods of a SerialNumbers object.

Add

The Add method adds serial number(s) specified by serialNumber or %SerialNumbers to a SerialNumbers object. A newly constructed SerialNumbers object contains no serial numbers.

Syntax returnCode = %SerialNumbers_Object.Add(serialNumber); returnCode = %SerialNumbers_Object.Add(%SerialNumbers); where:

Data Type Data Type Parameter (InTouch) (VB) Description

serialNumber Message String Serial number(s) to add; can be a sequence of serial numbers separated by commas %SerialNumbers Object Object Serial number(s) to add

Clear

The Clear method clears all the serial numbers from a SerialNumbers object.

Syntax returnCode = %SerialNumbers_Object.Clear(); 4-76 Chapter 4

IsMember

The IsMember method identifies whether the serial number specified by serialNumber in the method call is a member of the SerialNumbers object.

Syntax returnedDiscreteValue = %SerialNumbers_Object.IsMember(serialNumber); where:

Data Type Data Type Parameter (InTouch) (VB) Description

serialNumber Message String Serial number to verify as a member

Note: returnedDiscreteValue must be defined as a Discrete data type.

Item

The Item method locates the serial number in a SerialNumbers object, as specified by index in the method call. The method returns the corresponding number as a string.

Syntax serialNumbersString = %SerialNumbers_Object.Item(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the serial number to locate (1 ≤ index ≤ Count)

Note: serialNumbersString must be defined as a Message data type. General Objects 4-77

Remove

The Remove method removes the serial numbers from a SerialNumbers object, as specified by serialNumber, index, or %SerialNumbers in the method call.

Syntax returnCode = %SerialNumbers_Object.Remove(serialNumber); returnCode = %SerialNumbers_Object.Remove(index); returnCode = %SerialNumbers_Object.Remove(%SerialNumbers); where:

Data Type Data Type Parameter (InTouch) (VB) Description

serialNumber Message String Serial number(s) to remove; can be a sequence of serial numbers separated by commas index Integer Long List position of the serial number to remove (1 ≤ index ≤ Count) %SerialNumbers Object Object SerialNumbers object to remove

Example — Removing Serial Numbers

The following script uses the Remove method to remove a serial number from a SerialNumbers object. A SerialNumbers object, (%SerialNumbers_Object1), contains four serial numbers (123, 345, 567, and 789). The following script removes serial number 123 from %SerialNumbers_Object1: returnCode = %SerialNumbers_Object1.Remove(“123”); 4-78 Chapter 4

SetpointItem Object Class

The SetpointItem object class manages setpoint items within a setpoint template. SetpointItem objects are identified by a setpoint name unique to a particular setpoint template. To process SetpointItem objects as a collection, use the SetpointItems object class.

Identification

Object Name: InSetpointItem Interface Name: IInSetpointItem InTouch Object Name: %SetpointItem

Properties

The following table describes the properties of a SetpointItem object. Note that depending upon the setpoint’s data type, only one of the four default values will apply, and the limits and string selections may not be applicable.

Data Type Data Type Property (InTouch) (VB) Access Description

Data Type Integer Short r/w Data type of this item: 1 = Single real 2 = Message/String 3 = Discrete/Boolean 4 = InDate date 5 = Long integer 6 = String selection 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 10 = Long integer with limits 11 = Short real with limits 12 = Double real 13 = Double real with limits Description Message String r/w Description of the setpoint item Name Message String r/w Name key identifying the setpoint item StringWidth Integer Long r/w Maximum string length StringSelections Message String r/w Comma-separated string of string selections Value var VARIANT r/w Default value of the setpoint General Objects 4-79

Methods

This section describes the methods of the SetpointItem class.

GetLimits

The GetLimits method retrieves the upper and lower limits for any setpoint item data types with limits.

Syntax returnCode = %SetpointItem_Object.GetLimits(high, low); where:

Data Type Data Type Parameter (InTouch) (VB) Description

High var VARIANT High limit value Low var VARIANT Low limit value

GetLimitValue

The GetLimitValue method returns the value of a specified limit of a setpoint item object. The returned VARIANT limitValue contains the returned data value. This method is used primarily with InTouch.

Syntax value = %SetpointItem_Object.GetLimitValue(limitId, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

LimitId Integer Short Identifier for the desired limit and enumerated value: 2 = high (LimitTypes.High) 3 = low (LimitTypes.Low) value Real Double Real representing the limit value returnCode Integer Long Integer return status of the method call 4-80 Chapter 4

SetLimits

The SetLimits method sets the upper and lower limits for any setpoint item data types with limits.

Syntax returnCode = %SetpointItem_Object.SetLimits(high, low); where:

Data Type Data Type Parameter (InTouch) (VB) Description

High var VARIANT High limit value Low var VARIANT Low limit value General Objects 4-81

SetpointItems Object Class

The SetpointItems object class groups multiple SetpointItem objects for processing as a collection instead of individually.

Identification

Object Name: InSetpointItems Interface Name: IInSetpointItems InTouch Object Name: %SetpointItems

Properties

The following table describes the property of a SetpointItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of SetpointItem objects in the SetpointItems collection.

Methods

This section describes the methods of the SetpointItems class.

Add

The Add method adds SetpointItem objects to a SetpointItems collection, as specified by %SetpointItem in the method call.

Syntax returnCode = %SetpointItems_Object.Add(%SetpointItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

SetpointItem Object Object SetpointItem object(s) to add to the collection. 4-82 Chapter 4

Clear

The Clear method clears all SetpointItem objects from a SetpointItems collection.

Syntax returnCode = %SetpointItems_Object.Clear();

Item

The Item method locates a SetpointItem object within a SetpointItems collection, as specified by index or item name in the method call.

Syntax %SetpointItem_Object = %SetpointItems.Item(index); %SetpointItem_Object = %SetpointItems.Item(setpointName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of SetpointItem object to locate (1 ≤ index ≤ Count) SetpointName Message String Name key identifying the SetpointItem object to locate.

Remove

The Remove method removes a SetpointItem object from a SetpointItems collection, as specified by index, name, or SetpointItem object in the method call.

Syntax returnCode = %SetpointItems.Remove(index); returnCode = %SetpointItems.Remove(setpointName); returnCode = %SetpointItems.Remove(%SetpointItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of SetpointItem object to remove (1 ≤ index ≤ Count) SetpointName Message String Name key identifying the SetpointItem object to remove. %SetpointItem Object Object SetpointItem object to remove. General Objects 4-83

StartItem Object Class

A StartItem object represents the type and amount of material to start. It is used in the Start method of a Machine object. Multiple StartItem objects can be grouped together in a StartItems object for processing as a collection.

Identification

Object Name: InStartItem Interface Name: IInStartItem InTouch Object Name: %StartItem

To use a StartItem object: 1. Create a StartItem object. 2. Set the Sublot, PrimaryAmt, SecondaryAmt, and OverrideQueueTime properties. 3. Use the StartItem object in the Start method of a Machine object.

Example — Creating a StartItem Object

This example creates a StartItem object (%StartItem_Object1) and sets the primary and secondary quantities to start to 100 units and 1200 ounces, respectively. The OverrideQueueTime property is set to override queue time. 1. Create a StartItem object. OLE_CreateObject(%StartItem_Object1, “InTrack.StartItem”); 2. Set the Sublot property to the sublot to start. %StartItem_Object1.Sublot = “Lot_123@waterroute[1]:step1@location”; 3. Set the PrimaryAmt property to the primary quantity to start. %StartItem_Object1.PrimaryAmt.Quantity = 100; %StartItem_Object1.PrimaryAmt.Units = “units”; 4. Set the SecondaryAmt property to the secondary quantity to start. %StartItem_Object1.SecondaryAmt.Quantity = 1200; %StartItem_Object1.SecondaryAmt.Units = “ounces”; 5. Set the OverrideQueueTime property. %StartItem_Object1.OverrideQueueTime = -1; The following section provides property information for a StartItem object. AStartItem object has no methods. 4-84 Chapter 4

Properties

The following table describes the properties of a StartItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

Sublot Message String r/w SublotKey identifying the sublot to start PrimaryAmt Object Object r/w Primary quantity to start SecondaryAmt Object Object r/w Secondary quantity to start OverrideQueueTime Discrete Boolean r/w Boolean value indicating whether to ignore the maximum time allowed between operations where: –1 = override queue time 0 = do not override queue time General Objects 4-85

StartItems Object Class

A StartItems object groups multiple StartItem objects for processing as a collection. When you pass a StartItems object into the Start method of a Machine object, each StartItem object in the collection is processed automatically.

Identification

Object Name: InStartItems Interface Name: IinStartItems InTouch Object Name: %StartItems

To use a StartItems object: 1. Create StartItem objects and set the properties. 2. Create a StartItems object. 3. Use the Add method of the StartItems object to populate it with the individual StartItem objects created in step 1. 4. Use the StartItems object in the Start method of a Machine object. The following sections provide property and method information for StartItems objects.

Property

The following table describes the property of a StartItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of StartItem objects contained in the StartItems collection 4-86 Chapter 4

Methods

This section describes the methods of a StartItems object.

Add

The Add method adds StartItem objects to a StartItems collection, as specified by %StartItems in the method call.

Syntax returnCode = %StartItems_Object.Add(%StartItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%StartItem Object Object StartItem objects to add

Clear

The Clear method clears all StartItem objects from the StartItems collection.

Syntax returnCode = %StartItems_Object.Clear();

Item

The Item method locates StartItem objects in a StartItems collection, as specified by index or sublotKey in the method call.

Syntax %StartItem_Object = %StartItems_Object.Item(index); %StartItem_Object = %StartItems_Object.Item(sublotKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the StartItem object to locate (1 ≤ index ≤ Count) sublotKey Message String SublotKey identifying the StartItem object to locate General Objects 4-87

Remove

The Remove method removes selected StartItem objects from a StartItems collection, as specified by index, sublotKey, or %StartItem in the method call.

Syntax returnCode = %StartItems_Object.Remove(index); returnCode = %StartItems_Object.Remove(sublotKey); returnCode = %StartItems_Object.Remove(%StartItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the StartItem object to remove (1 ≤ index ≤ Count) sublotKey Message String SublotKey identifying the StartItem object to remove %StartItem Object Object StartItem object to remove 4-88 Chapter 4

StepInputItem Object Class

A StepInputItem object represents material inputs at a route step. These items are added to a Route object at a particular route step. The user can initialize the StepInputItem object with default values defined in the bill of material. A Material object can be loaded after specifying the product material as the material key. When loaded, the user can access any BOMItem information through the Material object’s collection of BOMInputItems, and use that item to set default values. StepInputItem objects are uniquely identified by the material key. Multiple StepInputItem objects can be grouped in StepInputItems collection for automatic processing.

Identification

Object Name: InStepInputItem Interface Name: IInStepInputItem InTouch Object Name: %StepInputItem

To use a StepInputItem object 1. Create a StepInputItem object. 2. Set the object properties, or initialize the properties using the InitializeFrom method. 3. Use the StepInputItem object in the AddInputItems method of a Route object.

Example — Retrieving Information from a Material Object

The following example retrieves information from a product material and uses its BOMInputItems collection to extract default values for a particular input item. Assume all materials exist. 1. Create a Material object (%Material_Object). OLE_CreateObject(%Material_Object, "InTrack.Material"); 2. Set the material key and load properties. %Material_Object.MaterialKey = "ChateauNatural"; returnCode = %Material_Object.Load; 3. Create a StepInputItem object (%StepInputItem_Object). OLE_CreateObject(%StepInputItem_Object, "InTrack.StepInputItem"); 4. Locate the input item of interest from the list of input items available. OLE_CreateObject(%BOMItem_Object, "InTrack.BOMItem"); %BOMItem_Object = %Material_Object.BOMInputItems.Item("SpringWater"); 5. Initialize StepInputItem with properties retrieved from the BOMItem. Note: After initialized the user can change any individual property for the item as well. returnCode = %StepInputItem_Object.InitializeFrom(%BOMItem_Object);

The following sections provide property and method information for a StepInputItem object. General Objects 4-89

Properties

The following table describes the properties of a StepInputItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

MaterialKey Message String r/w VersionKey identifying the material Location Message String r/w NameKey identifying the location of input material Quantity Real Double r/w Quantity (> 0) UnitOfMeasure Message String r/w Quantity unit of measure LowerTolerance Real Double r/w Minimum tolerable quantity deviation, expressed as a percent (0 - 100) Default value = 0 UpperTolerance Real Double r/w Maximum tolerable quantity deviation, expressed as a percent (≥ 0) Default value = 0 ScaledQty Discrete Boolean r/w Boolean value indicating whether quantity scaling is enabled: –1 = scale quantity (default) 0 = no scaling (used for input material only)

Methods

This section describes the methods of a StepInputItem object.

InitializeFrom

The InitializeFrom method initializes the StepInputItem object properties from a BOMItem object. This function facilitates initializing the item with default values specified within the bill of material. The Load method of a Material object can be called to load the material, then any BOMItem object can be used to set the initial properties for the StepInputItem object.

Syntax returnCode = %StepInputItem_Object.InitializeFrom(%BOMInputItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%BOMInputItem Object Object BOMItem object to use 4-90 Chapter 4

StepInputItems Object Class

A StepInputItems object groups multiple StepInputItem objects for processing as a collection. When you pass a StepInputItems object into methods of a Route object, each StepInputItem object in the collection is processed automatically.

Identification

Object Name: InStepInputItems Interface Name: IInStepInputItems InTouch Object Name: %StepInputItems

To use a StepInputItems object: 1. Create StepInputItem objects and set their properties. 2. Create a StepInputItems object. 3. Use the Add method of StepInputItems objects to populate it with the individual StepInputItem objects created in step 1. 4. Use the StepInputItems object in the AddInputItems and DeleteInputItems methods of a Route object. The following sections provide property and method information for a StepInputItems object.

Properties

The following table describes the property of a StepInputItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of StepInputItem objects in the collection General Objects 4-91

Methods

This section describes the methods of a StepInputItems object.

Add

The Add method adds StepInputItem objects to a StepInputItems collection, as specified by %StepInputItem in the method call.

Syntax returnCode = %StepInputItems_Object.Add(%StepInputItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%StepInputItem Object Object StepInputItem objects to add

Clear

The Clear method clears all StepInputItem objects from the StepInputItems collection.

Syntax returnCode = %StepInputItems_Object.Clear();

Item

The Item method locates StepInputItem objects in a StepInputItems collection, as specified by index or materialKey in the method call.

Syntax %StepInputItem_Object = %StepInputItems_Object.Item(index); %StepInputItem_Object = %StepInputItems_Object.Item(materialKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the StepInputItem object to locate (1 ≤ index ≤ Count) materialKey Message String VersionKey identifying the StepInputItem object to locate

Remove

The Remove method removes selected StepInputItem objects from a StepInputItems collection, as specified by index, materialKey, or %StepInputItem in the method call.

Syntax 4-92 Chapter 4

returnCode = %StepInputItems_Object.Remove(index); returnCode = %StepInputItems_Object.Remove(materialKey); returnCode = %StepInputItems_Object.Remove(%StepInputItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the StepInputItem object to remove (1 ≤ index ≤ Count) materialKey Message String VersionKey identifying the StepInputItem object to remove %StepInputItem Object Object StepInputItem object to remove General Objects 4-93

StepOutputItem Object Class

A StepOutputItem object represents material outputs at a route step. These items are added to a Route object at a particular route step. The user can initialize the StepOutputItem object with default values defined in the bill of material. A Material object can be loaded after specifying the product material as the material key. When loaded, the user can access any BOMItem information through the Material object’s collection of BOMOutputItems, and use that item to set default values.

Note: StepOutputItem objects are uniquely identified by the disposition code. The disposition code key (in addition to the material key) must be set. In addition, if the destination is a route, the Route and RouteStep properties also must be specified.

Multiple StepOutputItem objects can be grouped in a StepOutputItems object for processing as a collection.

Identification

Object Name: InStepOutputItem Interface Name: IInStepOutputItem InTouch Object Name: %StepOutputItem

To use a StepOutputItem object 1. Create a StepOutputItem object. 2. Set the object properties, or initialize the properties using the InitializeFrom method. 3. Use the StepOutputItem object in the AddOutputItems method of a Route object. 4-94 Chapter 4

Example — Extracting BOM Values for an Output Item

The following example retrieves information from a product material and uses its BOMOutputItems collection to extract default values for a particular output item. Set the output item destination to a route. Assume all materials exist. 1. Create a Material object (%Material_Object). OLE_CreateObject(%Material_Object, "InTrack.Material"); 2. Set the material key and load properties. %Material_Object.MaterialKey = "ChateauNatural"; returnCode = %Material_Object.Load; 3. Create a StepOutputItem object (%StepOutputItem_Object). OLE_CreateObject(%StepOutputItem_Object, "InTrack.StepOutputItem"); 4. Locate the output item of interest from the list of output items available. OLE_CreateObject(%BOMItem_Object, "InTrack.BOMItem"); %BOMItem_Object = %Material_Object.BOMOutputItems.Item("BentCaps[1]"); 5. Initialize StepOutputItem with properties retrieved from the BOMItem. returnCode = %StepOutputItem_Object.InitializeFrom(%BOMItem_Object); 6. Set the disposition code as "Rework", destination as Route, and location at "Production line 1". %StepOutputItem_Object.DispositionCodeKey = "Rework"; %StepOutputItem_Object.Destination = 2; %StepOutputItem_Object.Route = "CapRoute[1]"; %StepOutputItem_Object.RouteStep = "1"; %StepOutputItem_Object.Location = "Production line 1";

The following sections provide property and method information for StepOutputItem objects. General Objects 4-95

Properties

The following table describes the properties of a StepOutputItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

DispositionCodeKey Message String r/w NameKey identifying the disposition code Material Message String r/w VersionKey identifying the material Destination Integer Short r/w Output destination: 1 = inventory 2 = route Default = 1 Route Message String r/w VersionKey identifying destination route (required only if destination is to route) RouteStep Message String r/w NameKey identifying destination route step (required only if destination is to route) Location Message String r/w NameKey identifying the location for output material Default value = NONE Quantity Real Double r/w Quantity (> 0) UnitOfMeasure Message String r/w Quantity unit of measure LowerTolerance Real Double r/w Minimum tolerable quantity deviation, expressed as a percent (0 – 100) Default value = 0 UpperTolerance Real Double r/w Maximum tolerable quantity deviation, expressed as a percent (≥ 0) Default value = 0 DecQty Discrete Boolean r/w Boolean value indicating to decrease primary quantity by material output: –1 = yes (default) 0 = no ScaledQty Discrete Boolean r/w Boolean value indicating whether quantity scaling is enabled: –1 = scale quantity (default) 0 = no scaling 4-96 Chapter 4

Methods

This section describes the methods of a StepOutputItem object.

InitializeFrom

The InitializeFrom method initializes the StepOutputItem object properties from a BOMItem object. This function facilitates initializing the item with default values specified in the bill of material. The Load method of a Material object can be called to load the material, then any BOMItem object can be used to set the initial properties for the StepOutputItem object.

Syntax returnCode = %StepOutputItem_Object.InitializeFrom(%BOMOutputItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%BOMOutputItem Object Object BOMItem object from which to initialize General Objects 4-97

StepOutputItems Object Class

A StepOutputItems object groups multiple StepOutputItem objects for processing as a collection. When you pass a StepOutputItems object into methods of a Route object, each StepOutputItem object in the collection is processed automatically.

Identification

Object Name: InStepOutputItems Interface Name: IInStepOutputItems InTouch Object Name: %StepOutputItems

To use a StepOutputItems object: 1. Create StepOutputItem objects and set their properties. 2. Create a StepOutputItems object. 3. Use the Add method of the StepOutputItems object to populate it with the individual StepOutputItem objects created in step 1. 4. Use the StepOutputItems objects in the AddOutputItems and DeleteOutputItems methods of a Route object. The following sections provide property and method information for a StepOutputItems object.

Property

The following table describes the property of a StepOutputItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of StepOutputItem objects in the collection 4-98 Chapter 4

Methods

This section describes the methods of a StepOutputItems object.

Add

The Add method adds StepOutputItem objects class to a StepOutputItems collection, as specified by %StepOutputItem in the method call.

Syntax returnCode = %StepOutputItems_Object.Add(%StepOutputItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%StepOutputItem Object Object StepOutputItem objects to add

Clear

The Clear method clears all StepOutputItem objects from a StepOutputItems collection.

Syntax returnCode = %StepOutputItems_Object.Clear();

Item

The Item method locates StepOutputItem objects in a StepOutputItems collection, as specified by index or dispCodeKey in the method call.

Syntax %StepOutputItem_Object = %StepOutputItems_Object.Item(index); %StepOutputItem_Object = %StepOutputItems_Object.Item(dispCodeKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the StepOutputItem object to locate (1 ≤ index ≤ Count) dispCodeKey Message String NameKey identifying the StepOutputItem object to locate General Objects 4-99

Remove

The Remove method removes selected StepOutputItem objects from a StepOutputItems collection, as specified by index, dispCodeKey, or %StepOutputItem in the method call.

Syntax returnCode = %StepOutputItems_Object.Remove(index); returnCode = %StepOutputItems_Object.Remove(dispCodeKey); returnCode = %StepOutputItems_Object.Remove(%StepOutputItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the StepOutputItem object to remove (1 ≤ index ≤ Count) dispCodeKey Message String NameKey identifying the StepOutputItem object to remove %StepOutputItem Object Object StepOutputItem object to remove 4-100 Chapter 4

StepSetpointItem Object Class

The StepSetpointItem object class represents setpoints for a product material at a route step. These items are added to a route object at a particular route step for a particular product. The user can initialize the StepSetpointItem object with default values defined in the associated SetpointItem from the SetpointTemplate. StepSetpointItem objects are identified by the setpoint template name and version, as well as the setpoint name. To process StepSetpointItem objects as a collection, use the StepSetpointItems object class.

Identification

Object Name: InStepSetpointItem Interface Name: IInStepSetpointItem InTouch Object Name: %StepSetpointItem

Properties

The following table describes the properties of a StepSetpointItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

SetpointTemplate Message String r/w Version key identifying the setpoint template SetpointName Message String r/w Name key identifying the name of the setpoint Data Type Integer Short r Data type of this item: 1 = Single real 2 = Message/String 3 = Discrete/Boolean 4 = InDate date 5 = Long integer 6 = String selection 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 10 = Long integer with limits 11 = Short real with limits 12 = Double real 13 = Double real with limits Value var VARIANT r/w Actual value of the setpoint General Objects 4-101

Methods

This section describes the methods of the StepSetpointItem class.

InitializeFrom

The InitializeFrom method initializes the StepSetpointItem object properties from a SetpointTemplate and SetpointItem object. This function enables initializing the item with default values specified within the setpoint template. The setpoint template key and setpoint item names must be set before calling this method.

Syntax returnCode = %StepSetpointItem_Object.InitializeFrom(%SetpointTemplate, %SetpointItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

SetpointTemplate Object Object SetpointTemplate object or version key string identifying the setpoint template SetpointItem Object Object SetpointItem object 4-102 Chapter 4

StepSetpointItems Object Class

The StepSetpointItems object class groups multiple StepSetpointItem objects for processing as a collection instead of individually.

Identification

Object Name: InStepSetpointItems Interface Name: IInStepSetpointItems InTouch Object Name: %StepSetpointItems

Properties

The following table describes the property of a StepSetpointItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of StepSetpointItem objects in the StepSetpointItems collection.

Methods

This section describes the methods of the StepSetpointItems class.

Add

The Add method adds a StepSetpointItem object(s) to a StepSetpointItems object. The StepSetpointItem object is specified by the %StepSetpointItem in the method call.

Syntax returnCode = %StepSetpointItems_Object.Add(%StepSetpointItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

StepSetpointItem Object Object StepSetpointItem object(s) to add to the collection. General Objects 4-103

Clear

The Clear method clears all StepSetpointItem objects from a StepSetpointItems object.

Syntax returnCode = %StepSetpointItems_Object.Clear();

Item

The Item method locates a StepSetpointItem object within a StepSetpointItems object. The StepSetpointItem object is specified by index in the method call.

Syntax %StepSetpointItem_Object = %StepSetpointItems.Item(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of StepSetpointItem object to locate (1 ≤ index ≤ Count)

Remove

The Remove method removes a StepSetpointItem object from a StepSetpointItems object. The StepSetpointItem object is specified by index, name, or StepSetpointItem object in the method call.

Syntax returnCode = %StepSetpointItems.Remove(index); returnCode = %StepSetpointItems.Remove(%StepSetpointItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of StepSetpointItem object to remove (1 ≤ index ≤ Count) StepSetpointItem Object Object StepSetpointItem object to remove. 4-104 Chapter 4

TransferFromTaglist

The TransferFromTaglist method transfers all setpoint values from a TagList to each StepSetpointItem object in the collection. The order of the tags in the list must match the order of the StepSetpointItems in this collection. This method will work only when called from an InTouch script.

Syntax returnCode = %StepSetpointItems.TransferFromTaglist(tagList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

TagList Message String Name of the TagList from which to transfer setpoint values

TransferToTaglist

The TransferToTaglist method transfers setpoint values from each StepSetpointItem object in the collection to a TagList, so the values can be later manipulated or displayed. The order of the tags in the list must match the order of the StepSetpointItems in this collection. This method will work only when called from an InTouch script.

Syntax returnCode = %StepSetpointItems.TransferToTaglist(tagList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

TagList Message String Name of the TagList to which to transfer setpoint values General Objects 4-105

Time Object Class

A Time object sets time properties. When created, a single Time object can be used in any property or method parameter requiring the same time. The following sections provide property and method information for a Time object.

Identification

Object Name: InTime Interface Name: IInTime InTouch Object Name: %Time

Properties

The following table describes the properties of a Time object.

Data Type Data Type Property (InTouch) (VB) Access Description

Hour Integer Short r/w Two digit number, from 0 to 23, representing hours Minute Integer Short r/w Two digit number, from 0 to 59, representing minutes Second Integer Short r/w Two digit number, from 0 to 59, representing seconds 4-106 Chapter 4

Methods

This section describes the methods of a Time object.

Add

The Add method adds a Time or TimeInterval object to a Time object, as specified by %Time or %TimeInterval in the method call.

Syntax returnCode = %Time_Object.Add(%Time); returnCode = %Time_Object.Add(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%Time Object Object Time object to add %TimeInterval Object Object TimeInterval object to add

Diff

The Diff method subtracts a Time or TimeInterval object from a Time object, as specified by %Time or %TimeInterval in the method call.

Syntax returnCode = %Time_Object.Diff(%Time); returnCode = %Time_Object.Diff(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%Time Object Object Time object to subtract %TimeInterval Object Object TimeInterval object to subtract

GetString

The GetString method converts the current property settings of a Time object to a string that can be displayed as text.

Syntax timeString = %Time_Object.GetString();

Note: timeString must be defined as a Message data type. General Objects 4-107

SetHourMinSec

The SetHourMinSec method sets the Hour, Minute, and Second properties of a Time object in military format: 00:00:00.

Syntax returnCode = %Time_Object.SetHourMinSec(hour, minute, second); where:

Data Type Data Type Parameter (InTouch) (VB) Description

hour Integer Short Two digit number, from 0 to 23, representing hours minute Integer Short Two digit number, from 0 to 59, representing minutes second Integer Short Two digit number, from 0 to 59, representing seconds

SetLocalTime

The SetLocalTime method sets the Hour, Minute, and Second properties of a Time object to the current computer time.

Syntax returnCode = %Time_Object.SetLocalTime(); 4-108 Chapter 4

TimeInterval Object Class

A TimeInterval object identifies the time interval between activities. A TimeInterval object provides time interval information as an input parameter in the Purge, PurgeDataSet, PurgeMachineLogs, and PurgeMachineLogs methods of a Database object. It also identifies the time interval(s) to manipulate in the Add and Diff methods of the Date, DateTime, Time, and TimeInterval classes. It also is used in the UserCertification object class. After created, a TimeInterval object can be reused in any method requiring the same time interval.

Identification

Object Name: InTimeInterval Interface Name: IInTimeInterval InTouch Object Name: %TimeInterval

The following sections provide property and method information for a TimeInterval object.

Properties

The following table describes the properties of a TimeInterval object.

Data Type Data Type Property (InTouch) (VB) Access Description

TotalSeconds Integer Short r/w Total time, in seconds, between activities Days Integer Short r Time, in days, between activities Hours Integer Short r Time, in hours, between activities Minutes Integer Short r Time, in minutes, between activities Seconds Integer Short r Time, in seconds, between activities General Objects 4-109

Methods

This section describes the methods of a TimeInterval object.

Add

The Add method adds a TimeInterval object, I2, or I4, to a Time Interval object.

Syntax returnCode = %TimeInterval_Object.Add(%TimeInterval); returnCode = %TimeInterval_Object.Add(i2); returnCode = %TimeInterval_Object.Add(i4); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%TimeInterval Object Object TimeInterval object to add i2 Integer Short 2-byte integer to add i4 Integer Long 4-byte integer

Example — Using the Add Method of a TimeInterval Object

The following script adds two TimeInterval objects with the Add method. A Time Interval object (%TimeInterval_Object1) has the Seconds property set for 10 seconds. An interval of 25 seconds is required between operations. This example creates another TimeInterval object (%TimeInterval_Object2), sets the Seconds property to 15, then adds the properties of %TimeInterval_Object1 and %TimeInterval_Object2 together so that %TimeInterval_Object1 has a new time interval of 25 seconds. OLE_CreateObject(%TimeInterval_Object2, “InTrack.TimeInterval”); %TimeInterval_Object2.TotalSeconds = 15; returnCode = %TimeInterval_Object1.Add(%TimeInterval_Object2); 4-110 Chapter 4

Diff

The Diff method subtracts a TimeInterval object , I2, or I4 from a TimeInterval object.

Syntax returnCode = %TimeInterval_Object.Diff(%TimeInterval); returnCode = %TimeInterval_Object.Diff(i2); returnCode = %TimeInterval_Object.Diff(i4); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%TimeInterval Object Object TimeInterval object to subtract i2 Integer Short 2-byte integer to subtract i4 Integer Long 4-byte integer to subtract

GetString

The GetString method converts the current property settings of a TimeInterval object to a string that can be displayed as text.

Syntax timeIntervalString = %TimeInterval_Object.GetString();

Note: timeIntervalString must be defined as a Message data type. General Objects 4-111

SetDaysHoursMinutesSeconds

The SetDaysHoursMinutesSeconds method sets the days, hours, minutes, and seconds properties of a TimeInterval object.

Syntax returnCode = %TimeInterval_Object.SetDaysHoursMinutesSeconds(days, hours, minutes, seconds); where:

Data Type Data Type Parameter (InTouch) (VB) Description

days Integer Short Time, in days, between activities hours Integer Short Time, in hours, between activities minutes Integer Short Time, in minutes, between activities seconds Integer Short Time, in seconds, between activities

Note: A value must be assigned to each parameter. Use 0 (zero) for any parameter that does not apply.

5-1

CHAPTER 5

Structural Objects

The Structural object class is used to create objects in the InTrack database. Structural objects can be used in place of ModelMaker to create all modeling objects (except for Calendar information). Many of the properties and/or methods of the objects in this section require general objects from the previous section. For example, the Material object uses the BOMItem general object. The Machine, User, and WorkInstructions object classes play a role in material processing during runtime. Machine and User objects keep track of manufacturing resources to make sure all necessary criteria have been met before an operation begins. These two objects have some methods that are activity based, but they are included in this section. A WorkInstructions object provides work instructions for an operation. DataSetTemplate, SetpointTemplate, Machine, Material, Route, User, and WorkInstructions classes have object keys that must be set before methods are called. In each class, the key is used to identify a specific database object for use in a method or transaction. After the object key is set, the Load method populates the automation object’s read-only properties for viewing with script.

Contents Classification Object Class, 3 ClassificationItem Object Class, 8 ClassificationItems Object Class, 13 CustomerSpecification Object Class, 15 DataSetItem Object Class, 19 DataSetItems Object Class, 24 DataSetTemplate Object Class, 26 DataSetTemplates Object Class, 37 DispositionCode Object Class, 39 DispositionCodes Object Class, 42 FailureReasons Object Class, 44 FailureSymptoms Object Class, 46 Location Object Class, 48 Machine Object Class, 51 Machines Object Class, 68 MachineTask Object Class, 70 MachineTasks Object Class, 72 MachineType Object Class, 74 Material Object Class, 80 5-2 Chapter 5

Operation Object Class, 105 Privilege Object Class, 114 Privileges Object Class, 116 Route Object Class, 118 RoutePath Object Class, 132 RoutePaths Object Class, 133 RouteStep Object Class, 135 RouteSteps Object Class, 137 SecurityGroup Object Class, 139 SecurityGroups Object Class, 142 SetpointTemplate Object Class, 144 SetpointTemplates Object Class, 149 Table Object Class, 151 TableColumn Object Class, 158 TableColumns Object Class, 160 User Object Class, 162 UserCertification Object Class, 167 UserCertifications Object Class, 171 WorkInstructions Object Class, 173 WorkInstructionsList Object Class, 179

Structural Objects 5-3

Classification Object Class

The Classification object class enables the definition of classification hierarchies in which a machine object or location object can have a single parent. Like the parent-child relationship among setpoint templates and setpoint items, the classification system can be used to extend “basic” properties to related objects and to reduce the time needed to perform actions. For example, several locations could be classified as belonging to “Plant Complex A.” Several machines could fall under the classification “Mixing B.” Work instructions could be grouped together for “Holiday C.” Classification hierarchies comprise Classification objects (parents), ClassificationItem objects (children) and ClassificationItems objects (collection of multiple children). The Classification object’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method. To process Classification children, use the ClassificationItem object class. To process the children as a collection, use the ClassificationItems object class.

Identification

Object Name: InClassification Interface Name: IinClassification InTouch Object Name: %Classification

Properties

The following table describes the properties of a Classification object.

Data Type Data Type Property (InTouch) (VB) Access Description

ClassificationKey Message String r/w Version key identifying the Classification object (default property) Description Message String r Text describing the parent classification RootItemKey Message String r Root node classification item primary key identifier 5-4 Chapter 5

Example

This example creates a classification grouping called “Class1”. Within Class1, there is a parent object and two children objects. The parent object is a material called Cushion[NONE]. The two child objects are locations: Raw Materials and Receive Quarantine. Note that the labels for the children objects must be unique. Also, the root item key of the classification is the ClassificationItemKey for the parent item. 1. Create the base class. OLE_CreateObject(%Classification, “InTrack.Classification”); %Classification.Create(“Class1”, “Description”, “”); %Classification.ClassificationKey = “Class1”; %Classification.Load(); sRootItem = %Classification.RootItemKey; 2. Build the children objects OLE_CreateObject(%ClassificationItems , "InTrack.ClassificationItems"); OLE_CreateObject(%ClassificationItem, "InTrack.ClassificationItem"); %ClassificationItem.ObjectKey = “Raw Materials”; %ClassificationItem.ObjectClassID = 5; %ClassificationItem.Label = “Location 1”; returnCode = %ClassificationItems.Add(%ClassificationItem);

OLE_CreateObject(%ClassificationItem, "InTrack.ClassificationItem"); %ClassificationItem.ObjectKey = “Receive Quarantine”; %ClassificationItem.ObjectClassID = 5; %ClassificationItem.Label = “Location 2”; returnCode = %ClassificationItems.Add(%ClassificationItem); 3. Create the parent object} OLE_CreateObject(%ClassificationItem, "InTrack.ClassificationItem"); returnCode = %ClassificationItem.Create(sRootItem, “Material Parent Label”, 10, “Cushion[NONE]”, %ClassificationItems); Structural Objects 5-5

Methods

This section describes the methods of the Classification class.

Create

The Create method creates a Classification object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %Classification_Object.Create(ClassificationKey, Description, RootItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ClassificationKey Message String Version key string identifying the classification Description Message String Classification description RootItem Message String Root item key

Delete

The Delete method removes a Classification object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %Classification_Object.Delete(); 5-6 Chapter 5

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the classification object..

Syntax ReturnCode = %Classification_Object.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 12 = Double real

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of a classification object. The udaValue is a VARIANT data type containing the returned UDA value. This method is provided primarily for InTouch programming..

Syntax udaValue = %Classification_Object.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

UdaValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call Structural Objects 5-7

Load

The Load method populates the read-only properties of the Classification object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %Classification_Object.Load();

SetRoot

The SetRoot method assigns the root item key of a Classification object..

Syntax returnCode = %Classification_Object.SetRoot(rootItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RootItem Message String Root item key

SetUDAValue

The SetUDAValue method sets the value of a specified UDA of a classification object. The udaValue is a VARIANT data type containing the returned UDA value. This method is provided primarily for InTouch programming..

Syntax udaValue = %Classification_Object.SetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaValue var VARIANT The UDA Value to be written to the database udaName Message String Name of the UDA returnCode Integer Long Error code returned for the method call 5-8 Chapter 5

ClassificationItem Object Class

The ClassificationItem object class enables the definition of “children” in classification hierarchies. ClassificationItem hierarchies comprise ClassificationItem objects (parents), ClassificationItemItem objects (children) and ClassificationItemItems objects (collection of multiple children). The ClassificationItem object’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read- only properties are set by calling the Load method. To process Classification parents, use the Classification object class. To process the children as a collection, use the ClassificationItems object class.

Identification

Object Name: InClassificationItem Interface Name: IInClassificationItem InTouch Object Name: %ClassificationItem

Structural Objects 5-9

Properties

The following table describes the properties of a ClassificationItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

ItemKey `Message String r/w Version key identifying the ClassificationItem object (default property) Label Message String r Display label or text for this item ObjectClassID Integer Short r Internal InTrack class ID of the structural object referenced by this item: 1 = Calendar 2 = Customer_Spec 3 = Dataset 4 = Disposition 5 = Location 6 = Lot 7 = Machine 8 = Machine_Status 9 = Machine_Type 10 = Material 11 = Operation 12 = Route 14 = Serial# 15 = Sublot 16 = Certification 17 = WorkInstruction 25 = SetpointTemplate 27 = Classification 28 = ClassificationItem

ObjectKey Message String r Primary key string of this classification item Children Object Object r ClassificationItems object(s) created as children to this object in the hierarchy ParentItemKey Message String r Name of the parent to this ClassificationItem object 5-10 Chapter 5

Methods

This section describes the methods of the ClassificationItem class.

Attach

The Attach method attaches objects that will be children to the ClassificationItem object. .

Syntax returnCode = %ClassificationItem_Object.Attach(Children); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Children Object Object InClassificationItems object, children to this item

Create

The Create method creates a ClassificationItem object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %ClassificationItem_Object.Create(ClassificationItemKey, Label, ObjectClassID, ObjectKey, Children); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ClassificationItemKey Message String Version key string identifying the ClassificationItem Label Message String Label or descriptive text ObjectClassID Integer Short InTrack internal identification ObjectKey Message Short Version key of the object referenced by this item Children Object Object InClassificationItems object, children to this item

Delete

The Delete method removes a ClassificationItem object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %ClassificationItem_Object.Delete(); Structural Objects 5-11

Detach

The Detach method removes objects that have been assigned as children to the ClassificationItem object.

Syntax returnCode = %ClassificationItem_Object.Detach(Children); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Children Object Object InClassificationItems object, children to this item

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the ClassificationItem object..

Syntax ReturnCode = %ClassificationItem_Object.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 12 = Double real 5-12 Chapter 5

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of a ClassificationItem object. The udaValue is a VARIANT data type containing the returned UDA value. This method is provided primarily for InTouch programming..

Syntax udaValue = %ClassificationItem_Object.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

UdaValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the ClassificationItem object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %ClassificationItem_Object.Load();

SetUDAValue

The SetUDAValue method sets the value of a specified UDA of a ClassificationItem object. The udaValue is a VARIANT data type containing the returned UDA value. This method is provided primarily for InTouch programming..

Syntax udaValue = %ClassificationItem_Object.SetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaValue var VARIANT The UDA Value to be written to the database udaName Message String Name of the UDA returnCode Integer Long Error code returned for the method call Structural Objects 5-13

ClassificationItems Object Class

The ClassificationItems object class is a collection class. It groups multiple ClassificationItem objects for processing as a group instead of individually.

Identification

Object Name: InClassificationItems Interface Name: IInClassificationItems InTouch Object Name: %ClassificationItems

Properties

The following table describes the property of a ClassificationItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of ClassificationItem objects in the ClassificationItems collection.

Methods

This section describes the methods of the ClassificationItems class.

Add

The Add method adds a ClassificationItem object(s) to a ClassificationItems object. The ClassificationItem object is specified through the %ClassificationItem in the method call..

Syntax returnCode = %ClassificationItems_Object.Add(%ClassificationItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ClassificationItem Object Object ClassificationItem object(s) to add. 5-14 Chapter 5

Clear

The Clear method clears all ClassificationItem objects from a ClassificationItems object..

Syntax returnCode = %ClassificationItems_Object.Clear();

Item

The Item method locates a ClassificationItem object within a ClassificationItems object. The ClassificationItem object is specified by index or template key name in the method call..

Syntax %ClassificationItem = %ClassificationItems_Object.Item(index); %ClassificationItem = %ClassificationItems_Object.Item(itemKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of ClassificationItem object to locate (1 ≤ index ≤ Count) ItemKey Message String Version key identifying the ClassificationItem object to locate.

Remove

The Remove method removes a ClassificationItem object from a ClassificationItems collection. The ClassificationItem object is specified by index, key, or ClassificationItem object in the method call..

Syntax returnCode = %ClassificationItems_Object.Remove(index); returnCode = %ClassificationItems_Object.Remove(itemKey); returnCode = %ClassificationItems_Object.Remove(item); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of ClassificationItem object to remove (1 ≤ index ≤ Count) ItemKey Message String Name identifying the ClassificationItem object to remove. Item Object Object ClassificationItem object to remove. Structural Objects 5-15

CustomerSpecification Object Class

A CustomerSpecification object lets you create a customer specification object, identical to the object created in the ModelMaker Customer Specification editor.

Identification

Object Name: InCustomerSpecification Interface Name: IInCustomerSpecification InTouch Object Name: %CustomerSpecification

Automation Interface

The InCustomerSpecification object class provides an OLE automation interface to the InTrack customer specification object. The creation string for the InCustomerSpecification object class is InTrack.CustomerSpecification. The customer specification’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method.

Properties

The following table describes the properties of a CustomerSpecification object.

Data Type Data Type Property (InTouch) (VB) Access Description

SpecificationKey Message String r/w Version key identifying the CustomerSpecification object (default property) Description Message String r Description

5-16 Chapter 5

Methods

This section describes the methods of a CustomerSpecification object.

Create

The Create method creates a CustomerSpecification object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %CustomerSpecification_Object.Create(specificationKey, Description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

SpecificationKey Message String Customer specification key Description Message String Description

Example The following script creates a CustomerSpecification object and uses the Create method to create a database structural object for the customer specification. 1. Create a CustomerSpecification object. OLE_CreateObject(%CustSpec_Object, "InTrack.CustomerSpecification"); 2. Set up temporary variables for calling the Create method. newCustSpec = "Wonderware[22896]"; description = "description"; 3. Create the database structural object for the customer specification. returnCode = %CustSpec_Object.Create(newCustSpec, description);

Delete

The Delete method removes a CustomerSpecification object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %CustomerSpecification_Object.Delete(); Structural Objects 5-17

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the CustomerSpecification object class.

Syntax ReturnCode = %CustomerSpecification_Object.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the CustomerSpecification object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %CustomerSpecification_Object.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the CustomerSpecification object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %CustomerSpecification_Object.Load(); 5-18 Chapter 5

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of a CustomerSpecification object.

Syntax returnCode = %CustomerSpecification_Object.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type Structural Objects 5-19

DataSetItem Object Class

The DataSetItem object class provides an OLE automation interface to the InTrack dataset template data items. The creation string for the DataSetItem object class is InTrack.DataSetItem. To process DataSetItem objects as a collection, use the DataSetItems object class.

Identification

Object Name: InDataSetItem Interface Name: IInDataSetItem InTouch Object Name: %DataSetItem

Properties

The following table describes the properties of a DataSetItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

Data Type Integer Short r/w Data type of this item: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 6 = String selection 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 10 = Long integer with limits 11 = Short real with limits 12 = Double real 13 = Double real with limits Description Message String r/w Description of data item Label Message String r/w Label associated with data item Name Message String r/w Data item name (default property) Required Discrete Boolean r/w Data item required flag: –1 = yes 0 = no StringSelections Message String r/w Comma-separated list of selections for the string selection data type StringWidth Integer Long r/w Maximum allowed width for the string and string selection data types Value var VARIANT r/w Data item value matching the data type 5-20 Chapter 5

Methods

This section describes the methods of the DataSetItem class.

GetHoldFlags

The GetHoldFlags method returns the lot hold flag information for a data item, with type defined as long interger with limits, short real with limits, or double real with limits.

Syntax returnCode = %DataSetItem.GetHoldFlags(highHighFlag, highFlag, lowFlag, lowLowFlag); where:

Data Type Data Type Parameter (InTouch) (VB) Description

HighHighFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds high-high limit: –1 = yes 0 = no HighFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds high limit: –1 = yes 0 = no LowFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds low limit: –1 = yes 0 = no LowLowFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds low-low limit: –1 = yes 0 = no Structural Objects 5-21

GetLimitValue

The GetLimitValue method returns the value of a specified limit of a dataset item object. The returned VARIANT limitValue contains the returned data value. This method is used primarily with InTouch.

Syntax LimitValue = %DataSetItem.GetLimitValue(limitId, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

LimitValue Real Double Returned limit value expressed as a double LimitId Integer Short Identifier for the desired limit and enumerated value: 0 = instrument high (LimitTypes.InstrumentHigh) 1 = high-high (LimitTypes.HighHigh) 2 = high (LimitTypes.High) 3 = low (LimitTypes.Low) 4 = low-low (LimitTypes.LowLow) 5 = instrument low (LimitTypes.InstrumentLow) returnCode Integer Long Returned status from the method call

GetRanges

The GetRanges method returns the limit values for a data item, with a type defined as long integer with limits, short real with limits, or double real with limits.

Syntax returnCode = %DataSetItem.GetRanges(instrumentHigh, highHigh, high, low, lowLow, instrumentLow); where:

Data Type Data Type Parameter (InTouch) (VB) Description

InstrumentHigh var VARIANT Returned instrument-high value HighHigh var VARIANT Returned high-high value High var VARIANT Returned high value Low var VARIANT Returned low value LowLow var VARIANT Returned low-low value InstrumentLow var VARIANT Returned instrument-low value 5-22 Chapter 5

SetHoldFlags

The SetHoldFlags method sets the lot hold flag information for a data item, with type defined as long integer with limits, short real with limits, or double real with limits.

Syntax returnCode = %DataSetItem.SetHoldFlags(highHighFlag, highFlag, lowFlag, lowLowFlag); where:

Data Type Data Type Parameter (InTouch) (VB) Description

HighHighFlag Discrete Boolean Value indicating to place lot on hold if collected data exceeds high-high limit: -1 = yes 0 = no HighFlag Discrete Boolean Value indicating to place lot on hold if collected data exceeds high limit: -1 = yes 0 = no LowFlag Discrete Boolean Value indicating to place lot on hold if collected data exceeds low limit: -1 = yes 0 = no LowLowFlag Discrete Boolean Value indicating to place lot on hold if collected data exceeds low-low limit: -1 = yes 0 = no Structural Objects 5-23

SetRanges

The SetRanges method sets the limit values for a data item, with a type defined as long integer with limits, short real with limits, or double real with limits.

Syntax returnCode = %DataSetItem.SetRanges(instrumentHigh, highHigh, high, low, lowLow, instrumentLow); where:

Data Type Data Type Parameter (InTouch) (VB) Description

InstrumentHigh var VARIANT Returned instrument-high value HighHigh var VARIANT Returned high-high value High var VARIANT Returned high value Low var VARIANT Returned low value LowLow var VARIANT Returned low-low value InstrumentLow var VARIANT Returned instrument-low value 5-24 Chapter 5

DataSetItems Object Class

The DataSetItems object class is a collection class. It groups multiple DataSetItem objects for processing as a group instead of individually.

Identification

Object Name: InDataSetItems Interface Name: IInDataSetItems InTouch Object Name: %DataSetItems

Properties

The following table describes the property of a DataSetItems object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of DataSetItem objects in the DataSetItems collection.

Methods

This section describes the methods of the DataSetItems class.

Add

The Add method adds a DataSetItem object(s) to a DataSetItems object. The DataSetItem object is specified through the %DataSetItem in the method call.

Syntax returnCode = %DataSetItems.Add(%DataSetItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

DataSetItem Object Object DataSetItem object(s) to add to the collection.

Clear

The Clear method clears all DataSetItem objects from a DataSetItems object.

Syntax returnCode = %DataSetItems.Clear(); Structural Objects 5-25

Item

The Item method locates a DataSetItem object within a DataSetItems object. The DataSetItem object is specified by index or item name in the method call.

Syntax %DataSetItem = %DataSetItems.Item(index); %DataSetItem = %DataSetItems.Item(itemName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of DataSetItem object to locate (1 ≤ index ≤ Count) ItemName Message String Name key identifying the DataSetItem object to locate.

Remove

The Remove method removes a DataSetItem object from a DataSetItems object. The DataSetItem object is specified by index, name, or DataSetItem object in the method call.

Syntax returnCode = %DataSetItems.Remove(index); returnCode = %DataSetItems.Remove(itemName); returnCode = %DataSetItems.Remove(template); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of DataSetItem object to remove (1 ≤ index ≤ Count) ItemName Message String Version key identifying the DataSetItem object to remove. template Object Object DataSetItem object to remove.

5-26 Chapter 5

DataSetTemplate Object Class

The DataSetTemplate object class enables retrieval of information from the InTrack database using dataset templates. The DataSetTemplateKey identifies the dataset template to be used. The following section provides property and method information for a DataSetTemplate object.

Identification

Object Name: InDataSetTemplate Interface Name: IInDataSetTemplate InTouch Object Name: %DataSetTemplate

Automation Interface

The InDataSetTemplate object class provides an OLE automation interface to the InTrack dataset template object. The creation string for the InDataSetTemplate object class is InTrack.DataSetTemplate. The dataset template’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method. Structural Objects 5-27

Properties

The following table describes the properties of a DataSetTemplate object.

Data Type Data Type Property (InTouch) (VB) Access Description

DataSetTemplateKey Message String r/w VersionKey identifying the dataset template Description Message String r Text describing the dataset template object ParentDataSetTemplateKey Message String r VersionKey identifying the parent dataset template RuntimeDataTable Message String r Name of the table in which to store runtime data SamplingPlanType Integer Short r Value that identifies the sample collection: 0 = fixed 1 = variable RequiredSampleCount Integer Long r Number of samples to collect (for variable sample collection only) RequiredSampleRatio Real Double r Returned quantity of required samples to collect as a percentage of the lot size to collect (for variable sample collection only) DataSetItems Object Object r Collection of DataSetItem objects SampleNames Message String r Comma-separated list of sample names 5-28 Chapter 5

Methods

This section describes the methods of the InDataSetTemplate object class.

AddDataSetItems

The AddDataSetItems method appends new dataset item(s) and saves the modified template to the database. The template key property must be set before calling this method.

Syntax returnCode = %DataSetTemplate.AddDataSetItems(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Items Object Object DataSetItem or DataSetItems (collection) to append to the dataset template list of data items

AssociateParent

The AssociateParent method attaches this child dataset template to another template and saves the modified template to the database. The template key property must be set before this method can be called.

Syntax returnCode = %DataSetTemplate.AssociateParent(parentTemplate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

parentTemplate Object Object Dataset template object or version key string identifying the parent template Structural Objects 5-29

Create

The Create method creates a DataSetTemplate object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %DataSetTemplate.Create(templateKey, description, tableName, planType, sampleCount, sampleRatio, parentTemplate, samples, items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

TemplateKey Message String Version key string identifying the template Description Message String Dataset template description TableName Message String Name of the table in which to store runtime data PlanType Integer Long Value that identifies if sample collection is: 0 = fixed 1 = variable SampleCount Integer Short Number of samples to collect (for variable data collection only) SampleRatio Real Single Fraction of lot quantity to sample(for variable data collection only) ParentTemplate Object Object Dataset template object or version key string identifying the parent template Samples Message String List of sample name(s), comma-separated Items Object Object A single DataSetItem or a collection of DataSetItem objects

Delete

The Delete method removes a DataSetTemplate object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %DataSetTemplate.Delete(); 5-30 Chapter 5

DeleteDataSetItems

The DeleteDataSetItems method removes the data items and saves the modified dataset template to the InTrack database. The template key property must be set before this method is called.

Syntax returnCode = %DataSetTemplate.DeleteDataSetItems(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Items Object Object DataSetItem object(s) to remove from the template list of data items, or a comma-separated list of data item names to remove

DisassociateParent

The DisassociateParent method detaches the child dataset template from another template and saves the modified template to the InTrack database with a new runtime data table name. The template key property must be set before this method can be called.

Syntax returnCode = %DataSetTemplate.DisassociateParent(tableName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

TableName Message String Name of the new table in which to store runtime data Structural Objects 5-31

GetItemIntegerRanges

The GetItemIntegerRanges method returns the limit information for a data item, defined as type integer with limits. The returned parameters are based on the DataSetTemplateKey property as well as the item parameter. The DataSetTemplateKey must be set before this method is called. This method is obsolete since property information can be obtained from the DataSetItem object class.

Syntax ReturnCode = %DataSetTemplate.GetItemIntegerRanges(item, instrumentHigh, highHigh, high, low, lowLow, instrumentLow, highHighFlag, highFlag, lowFlag, lowLowFlag); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Item Integer Long Position of this data item in the dataset template IntrumentHigh Integer Long Returned instrument high value HighHigh Integer Long Returned instrument high-highvalue High Integer Long Returned high value Low Integer Long Returned low value LowLow Integer Long Returned low-low value IntrumentLow Integer Long Returned instrument low value HighHighFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds high-high limit: –1 = yes 0 = no HighFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds high limit: –1 = yes 0 = no LowFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds low limit: –1 = yes 0 = no LowLowFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds low-low limit: –1 = yes 0 = no 5-32 Chapter 5

Example — Retrieving Data from the Database The following script creates a DataSetTemplate object, sets the key, and retrieves the ranges of a data item from the database. 1. Create a DataSetTemplate object. OLE_CreateObject(%DataSetTemplate_Object, "InTrack.DataSetTemplate"); 2. Set the value of the DataSetTemplateKey property. %DataSetTemplate_Object.DataSetTemplateKey = "dataSetItem"; 3. Retrieve information for the data set template from the database. returnCode = %DataSetTemplate_Object.GetItemIntegerRanges(item, instHigh, highHigh, high, low, lowLow, instLow, highHighFlag, highFlag, lowFlag, lowLowFlag); Structural Objects 5-33

GetItemRealRanges

The GetItemRealRanges method returns limit information for a data item, defined as real type with limits. The returned parameters are based on the DataSetTemplateKey property as well as the item parameter. The DataSetTemplateKey must be set before this method is called. This method is obsolete since property information can be obtained from the DataSetItem object class.

Syntax ReturnCode = %DataSetTemplate.GetItemRealRanges(item, instrumentHigh, highHigh, high, low, lowLow, instrumentLow, highHighFlag, highFlag, lowFlag, lowLowFlag); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Item Integer Long Position of this data item in the dataset template IntrumentHigh Real Double Returned instrument high value HighHigh Real Double Returned instrument high-highvalue High Real Double Returned high value Low Real Double Returned low value LowLow Real Double Returned low-low value IntrumentLow Real Double Returned instrument low value HighHighFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds high-high limit: –1 = yes 0 = no HighFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds high limit: –1 = yes 0 = no LowFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds low limit: –1 = yes 0 = no LowLowFlag Discrete Boolean Returned value indicating to place lot on hold if collected data exceeds low-low limit: –1 = yes 0 = no 5-34 Chapter 5

Example — Retrieving Ranges of Data from the Database The following script creates an automation object of the DataSetTemplate class, sets the key, and retrieves the ranges of a data item from the database. 1. Create a DataSetTemplate object. OLE_CreateObject(%DataSetTemplate_Object, "InTrack.DataSetTemplate"); 2. Set the value of the DataSetTemplateKey property. %DataSetTemplate_Object.DataSetTemplateKey = "dataSetItem"; 3. Retrieve information for the data set template from the database. returnCode = %DataSetTemplate_Object.GetItemRealRanges(item, instHigh, highHigh, high, low, lowLow, instLow, highHighFlag, highFlag, lowFlag, lowLowFlag);

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the dataset template object.

Syntax ReturnCode = %DataSetTemplate.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 12 = Double real Structural Objects 5-35

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of a dataset template object. The udaValue is a VARIANT data type containing the returned UDA value. This method is provided primarily for InTouch programming.

Syntax ReturnedUDAValue = %DataSetTemplate.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the DataSetTemplate object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %DataSetTemplate.Load();

Example — Loading Properties from the Database The following script creates an automation object of the DataSetTemplate class, sets the key, and loads the properties from the database. 1. Create a DataSetTemplate object. OLE_CreateObject(%DataSetTemplate_Object, "InTrack.DataSetTemplate"); 2. Set the value of the DataSetTemplateKey property. %DataSetTemplate_Object.DataSetTemplateKey = "dataSet"; 3. Retrieve information for the data set template from the database. returnCode = %DataSetTemplate_Object.Load(); 5-36 Chapter 5

SetUDA

The SetUDA method updates the value of a specified UDA of a DataSetTemplate object.

Syntax returnCode = %DataSetTemplate.SetUDA(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type Structural Objects 5-37

DataSetTemplates Object Class

The DataSetTemplates object class is a collection class. It groups multiple DataSetTemplate objects for processing as a group instead of individually.

Identification

Object Name: InDataSetTemplates Interface Name: IinDataSetTemplates InTouch Object Name: %DataSetTemplates

Properties

The following table describes the property of a dataSetTemplates object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of DataSetTemplate objects in the DataSetTemplates object.

Methods

This section describes the methods of the DataSetTemplates class.

Add

The Add method adds a DataSetTemplate object(s) to a DataSetTemplates object. The DataSetTemplate object is specified through the %DataSetTemplate in the method call.

Syntax returnCode = %DataSetTemplates.Add(%DataSetTemplate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

DataSetTemplate Object Object DataSetTemplate object(s) to add.

Clear

The Clear method clears all DataSetTemplate objects from a DataSetTemplates object.

Syntax returnCode = %DataSetTemplates.Clear(); 5-38 Chapter 5

Item

The Item method locates a DataSetTemplate object within a DataSetTemplates object. The DataSetTemplate object is specified by index or template key name in the method call.

Syntax %DataSetTemplate = %DataSetTemplates.Item(index); %DataSetTemplate = %DataSetTemplates.Item(templateKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of DataSetTemplate object to locate (1 ≤ index ≤ Count) TemplateKey Message String Version key identifying the DataSetTemplate object to locate.

Remove

The Remove method removes a DataSetTemplate object from a DataSetTemplates object. The DataSetTemplate object is specified by index, key, or DataSetTemplate object in the method call.

Syntax returnCode = %DataSetTemplates.Remove(index); returnCode = %DataSetTemplates.Remove(templateKey); returnCode = %DataSetTemplates.Remove(template); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of DataSetTemplate object to remove (1 ≤ index ≤ Count) TemplateKey Message String Name identifying the DataSetTemplate object to remove. template Object Object DataSetTemplate object to remove.

Structural Objects 5-39

DispositionCode Object Class

The DispositionCode object class provides an OLE automation interface to the InTrack disposition code object. The creation string for the DispositionCode object class is InTrack.DispositionCode. The disposition code’s name key string is the default property. All other properties are read-only. The read-only properties are set by calling the Load method. To process DispositionCode objects as a collection, use the DispositionCodes object class.

Identification

Object Name: InDispositionCode Interface Name: IInDispositionCode InTouch Object Name: %DispositionCode

Properties

The following table describes the properties of a DispositionCode object.

Data Type Data Type Property (InTouch) (VB) Access Description

DispositionCodeKey Message String r/w Version key identifying the DispositionCode object (default property) Description Message String r Description Type Integer Short r Disposition code type enumerated value: 0 = Reject 1 = Rework 2 = Good 3 = Scrap 5-40 Chapter 5

Methods

This section describes the methods of the DispositionCode class.

Create

The Create method creates a DispositionCode object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %DispositionCode.Create(DispCodeKey, Description, Type); where:

Data Type Data Type Parameter (InTouch) (VB) Description

DispCodeKey Message String Disposition code key Description Message String Description Type Message String Disposition code type

Delete

The Delete method removes a DispositionCode object from the InTrack database. The DispCode key property must be set before calling the Delete Method.

Syntax returnCode = %DispositionCode.Delete();

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the DispositionCode object class.

Syntax ReturnCode = %DispositionCode.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type Structural Objects 5-41

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the DispositionCode object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %DispositionCode.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the DispositionCode object with values read from the database. The DispCode key property must be set before this method can be called.

Syntax returnCode = %DispositionCode.Load();

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of a DispositionCode object.

Syntax returnCode = %DispositionCode.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type 5-42 Chapter 5

DispositionCodes Object Class

The DispositionCodes object class is a collection class. It groups multiple DispositionCode objects for processing as a group instead of individually.

Identification

Object Name: InDispositionCodes Interface Name: IInDispositionCodes InTouch Object Name: %DispositionCodes

Properties

The following table describes the property of a DispositionCodes collection.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of DispositionCode objects in the DispositionCodes collection.

Methods

This section describes the methods of the DispositionCodes object class.

Add

The Add method adds a DispositionCode object(s) to a DispositionCodes object. The DispositionCode object is specified through the argument in the method call.

Syntax returnCode = %DispositionCodes.Add(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Items Object Object DispositionCode(s) object to add to the collection. Structural Objects 5-43

Clear

The Clear method clears all DispositionCode objects from a DispositionCodes object.

Syntax returnCode = %DispositionCodes.Clear();

Item

The Item method locates a DispositionCode object within a DispositionCodes object, as specified by index or item name in the method call.

Syntax %DispositionCode = %DispositionCodes.Item(index); %DispositionCode = %DispositionCodes.Item(itemName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of DispositionCode object to locate (1 ≤ index ≤ Count) ItemName Message String Name identifying the DispositionCode object to locate.

Remove

The Remove method removes a DispositionCode object from a DispositionCodes object, as specified by index, item name, or DispositionCode object in the method call.

Syntax returnCode = %DispositionCodes.Remove(index); returnCode = %DispositionCodes.Remove(itemName); returnCode = %DispositionCodes.Remove(item); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of DispositionCode object to remove (1 ≤ index ≤ Count) ItemName Message String Name key identifying the DispositionCode object to remove. Item Object Object DispositionCode object to remove. 5-44 Chapter 5

FailureReasons Object Class

The FailureReasons object class is a collection class used with the MachineType object. It groups failure reason for processing as a group instead of individually.

Identification

Object Name: InFailureReasons Interface Name: IInFailureReasons InTouch Object Name: %FailureReasons

Properties

The following table describes the property of a FailureReasons object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of failure reasons in the FailureReasons collection.

Methods

This section describes the methods of the FailureReasons class.

Add

The Add method adds a failure reason string to a FailureReasons collection.

Syntax returnCode = %FailureReasons.Add(failurereason); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Failurereason Message String Failure reasons to add.

Clear

The Clear method clears all failure reasons from a FailureReasons collection.

Syntax returnCode = %FailureReasons.Clear(); Structural Objects 5-45

Item

The Item method locates a failure reasons within a FailureReasons object. The failure reason string is specified by name in the method call.

Syntax FailureReason = %FailureReasons.Item(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

failurereason Message String Name or index number identifying the failure reason to locate. Index Integer Long Integer position of item (1 ≤ index ≤ Count)

Remove

The Remove method removes a failure reason from a FailureReasons object, as specified by name in the method call.

Syntax returnCode = %FailureReasons.Remove(failurereason); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Failurereason Message String Name or index number identifying the failure reason to remove. 5-46 Chapter 5

FailureSymptoms Object Class

The FailureSymptoms object class is a collection class used with the MachineType object. It groups failure symptom for processing as a group instead of individually.

Identification

Object Name: InFailureSymptoms Interface Name: IinFailureSymptoms InTouch Object Name: %FailureSymptoms

Properties

The following table describes the property of a FailureSymptoms object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of failure symptoms in the FailureSymptoms collection.

Methods

This section describes the methods of the FailureSymptoms class.

Add

The Add method adds a failure symptom string to a FailureSymptoms collection.

Syntax returnCode = %FailureSymptoms.Add(failuresymptom); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Failuresymptom Message String Failure symptoms to add.

Clear

The Clear method clears all failure symptoms from a FailureSymptoms collection.

Syntax returnCode = %FailureSymptoms.Clear(); Structural Objects 5-47

Item

The Item method locates a failure symptoms within a FailureSymptoms object. The failure symptom string is specified by name in the method call.

Syntax FailureSystom = %FailureSymptoms.Item(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

failuresymptom Message String Name or index number identifying the failure symptom to locate. Index Integer Long Integer position of item (1 ≤ index ≤ Count)

Remove

The Remove method removes a failure symptom from a FailureSymptoms object, as specified by name in the method call.

Syntax returnCode = %FailureSymptoms.Remove(failuresymptom); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Failuresymptom Message String Name or index number identifying the failure symptom to remove.

5-48 Chapter 5

Location Object Class

The Location object class (creation string of “InTrack.Location”) provides an OLE automation interface to an InTrack location object.

Identification

Object Name: InLocation Interface Name: IInLocation InTouch Object Name: %Location

Properties

The following table describes the properties of a Location object.

Data Type Data Type Property (InTouch) (VB) Access Description

LocationKey Message String r/w String identifying the location object (default property) Description Message String r Location description

Methods

This section describes the methods of the Location class. The standard methods provide all the functions necessary to insert, update and delete InTrack objects from the database. The first time Create is called, an initial version of the object is inserted into the database. After Load is called (and edits performed), a second call to Create saves an updated version of the object. Note that it is not necessary to call Delete before calling a second Create for the same object. Structural Objects 5-49

Create

The Create method creates a Location object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %Location.Create (LocationKey, Description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

LocationKey Message String Object key Description Message String Description

Delete

The Delete method removes a Location object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %Location.Delete();

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the Location object class.

Syntax returnCode = %Location.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type 5-50 Chapter 5

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the Location object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %Location.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status of the method call

Load

The Load method populates the properties of the Location object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %Location.Load();

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of a Location object.

Syntax returnCode = %Location.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type

Structural Objects 5-51

Machine Object Class

The Machine object class uses the MachineKey to identify the following attributes of a specific machine: name, location, type, manufacturer, model number, serial number, capacity, and contact information. InTrack uses this information prior to an operation to determine whether the requested machine is available, that the requested machine can perform the operation, and that it has the proper capacity to perform the operation as requested. After a machine is in operation, resource tracking provides warnings that a procedure needs to be performed (for example, maintenance) to prevent the machine from going offline. To handle batch scrap transactions on a machine, the properties (AtRoute, AtRouteStep, and decrement quantity flag) are added to the CompleteItem class for the machine Complete method. The machine method handles scrapping for one or more sublots with the capability of assigning the scrap transaction to another route step A Machine object has Start, Complete, and Close methods to process multiple sublots at once. This feature makes the Start, Complete, and Close methods of a Machine object different from the Start, Complete, and Close methods of a Sublot object, which can process only a single sublot at one time.The following sections provide property and method information for a Machine object.

Identification

Object Name: InMachine Interface Name: IInMachine InTouch Object Name: %Machine

5-52 Chapter 5

Properties

The following table describes the properties of a Machine object.

Data Type Data Type Property (InTouch) (VB) Access Description

MachineKey Message String r/w Version key identifying the Machine object (default property) Capacity Object Object r Amount object representing machine capacity ContactInfo Message String r Contact information Location Message String r Location MachineType Message String r Machine type Model Message String r Model number Serial Number Message String r Serial number Vendor Message String r Vendor Description Message String r Description DataSetTemplates Collection Object r Collection of DataSetTemplate objects

Methods

This section describes the methods of the Machine class.

AddDataSetTemplates

The AddDataSetTemplates method appends new data set template objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %Machine.AddDataSetTemplates(DataSetTemplates); where:

Data Type Data Type Parameter (InTouch) (VB) Description

DataSetTemplates Object Object Object(s) to add to the Machine collection Structural Objects 5-53

AssignRepairPerson

The AssignRepairPerson method records the name of the person assigned to fix the machine in the resource tracking logs.

Syntax returnCode = %Machine.AssignRepairPerson(repairPerson); where:

Data Type Data Type Parameter (InTouch) (VB) Description

repairPerson Message String Name of the repair person

BringOnLine

The BringOnLine method identifies when the machine was brought online in the resource tracking logs.

Syntax returnCode = %Machine.BringOnLine(); 5-54 Chapter 5

Close

The Close method closes the single or multiple sublots contained in a CloseItem(s) object to inventory. This Close method can close one sublot while another sublot is still processing. It also can close multiple sublots to inventory at one time. Thus, this Close method is very useful in batch manufacturing. There also are two methods of the Sublot class used to close quantity. Use the method that is appropriate for the quantity you wish to close. To close a specified quantity of a single sublot, use the Close method of a Sublot object. To specify the machine on which to close a specified quantity of a single a sublot with a Sublot object, use the CloseOnMachine method. For more information on the Sublot object class, see Chapter 6, “Activity Objects.”

Note: To move a coproduct or by-product to inventory, use a Complete method.

Since Close identifies the sublot(s) to close though a parameter that is a CloseItem(s) object, you must create a CloseItem(s) object and set the properties before calling Close.

Syntax returnCode = %Machine.Close(closeLots); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CloseLots Object Object CloseItem object(s) to close Structural Objects 5-55

CloseRepair

The CloseRepair method identifies when repairs on a machine have been finished. The text provided in the description parameter is saved as part of the log entry in the MachineMaintActivityLog table.

Notes: When repairs are started, the OpenRepair method is called. When repairs are completed, the CloseRepair method is called. Between these two methods, use the StartRepair method and StopRepair method as repairs are started and stopped (but not completed) on a machine. Only one repair can be open on the same machine at the same time.

Syntax returnCode = %Machine.CloseRepair(Description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Description Object Object Description 5-56 Chapter 5

Complete

The Complete method completes the single or multiple sublots contained in a CompleteItem(s) object at the current operation(s) and dispositions sublot quantities based on the assigned disposition code(s). This Complete method can complete one sublot while another sublot is still processing. It also can complete multiple sublots at one time. Thus, this Complete method is very useful in batch manufacturing. There are also two methods of the Sublot class with which you can complete quantity. Use the method that is appropriate for the quantity you wish to complete. • To complete a specified quantity of a single sublot, use the Complete method of a Sublot object. • To specify the machine on which to complete a specified quantity of a single a sublot with a Sublot object, use the CompleteOnMachine method. For more information on the Sublot object class, see Chapter 6, “Activity Objects.”

Note: Complete methods can only be used if there are disposition options other than closing the entire sublot to inventory (for example, closing part of a sublot to inventory or closing a sublot to another route). If closing the entire sublot to inventory is the only option, use a Close method.

Since Complete identifies the sublot(s) to complete though a parameter that is a CompleteItem(s) object, you must create a CompleteItem(s) object and set the properties before calling Complete.

Syntax returnCode = %Machine.Complete(completeLots); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CompleteLots Object Object CompleteItem object(s) to close Structural Objects 5-57

CompleteTask

The CompleteTask method records when a task is completed in the InTrack Resource Tracking logs. Tasks are maintenance procedures defined in ModelMaker. A task can be periodic (for example, after 20 starts, recalibrate the machine) or nonperiodic (for example, recalibrate the machine at any one time). The text provided in the description parameter is saved as part of the log entry in the MachineMaintActivityLog table.

Note: A Query.MachineTask object retrieves information about the machine tasks associated with a specific machine type. Multiple tasks can be started at one time.

Syntax returnCode = %Machine.CompleteTask(taskId, description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

TaskId Message String ID of task to complete Description Message String Description 5-58 Chapter 5

Create

The Create method creates a Machine object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %Machine.Create(MachineKey, Description, MachineType, Location, Capacity, ContactInfor, Vendor, Model, SerialNumber, DataSetTemplates); where:

Data Type Data Type Parameter (InTouch) (VB) Description

MachineKey Message String Machine key Description Message String Description MachineType var VARIANT Machine type key or InMachineType object Location var VARIANT String or InLocation object Capacity Object Object InAmount object ContactInfo Message String Contact information Vendor Message String Vendor Model Message String Model number SerialNumber Message String Serial number DataSetTemplates var VARIANT Data set template key(s) or DataSetTemplate object(s)

Delete

The Delete method removes a Machine object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %Machine.Delete(); Structural Objects 5-59

DeleteAllDataSetTemplates

The DeleteAllDataSetTemplates method removes all InDataSetTemplate objects and saves the empty collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %Machine.DeleteAllDataSetTemplates();

DeleteDataSetTemplates

The DeleteDataSetTemplates method removes the InDataSetTemplate objects and saves the modified collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %Machine.DeleteDataSetTemplates(DataSetTemplates); where:

Data Type Data Type Parameter (InTouch) (VB) Description

DataSetTemplates Object Object InDataSetTemplate object(s) to remove from the Machine collection

GetTaskWorkInstructions

The GetTaskWorkInstructions method returns the work instructions associated with a specific task.

Note: A Query.MachineTask object can be used to retrieve information about machine tasks associated with a specific machine type.

Syntax returnCode = %Machine.GetTaskWorkInstructions(task, workInstructions); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Task Message String Task name WorkInstructions Message String Returned work instructions 5-60 Chapter 5

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the Machine object class.

Syntax ReturnCode = %Machine.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the Machine object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %Machine.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the Machine object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %Machine.Load(); Structural Objects 5-61

OpenRepair

The OpenRepair method changes a machine’s maintenance status to AWAITING_REPAIR. The text provided in the description parameter is saved as part of the log entry in the MachineMaintActivityLog table. Only one repair can be opened on a machine at a time.

Note: When repairs are started, the OpenRepair method is called. When repairs are completed, the CloseRepair method is called. Between these two methods, use the StartRepair method and StopRepair method as repairs are started and stopped (but not completed) on a machine.

Syntax ReturnCode = %Machine.OpenRepair(repairId, description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RepairId Message String Repair name, can be linked to a failure symptom Description Message String Description

Example The following script opens a repair record for machine MACH1. 1. Create a Machine object (%Machine_Object1). OLE_CreateObject(%Machine_Object1, "InTrack.Machine"); 2. Set the key value for %Machine_Object1. %Machine_Object1.MachineKey = "MACH1"; 3. Open a repair record for machine MACH1. returnCode = %Machine_Object1.OpenRepair("Repair 1", "Replace bad air filter");

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of a Machine object.

Syntax returnCode = %Machine.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type 5-62 Chapter 5

Start

The Start method changes the single or multiple sublots contained in a StartItem(s) object from “queued” to “in-process” at an operation. This Start method can start one sublot while another sublot is processing. It also can start multiple sublots at one time. Thus, this Start method is very useful in batch manufacturing. There also are two methods of the Sublot class with which you can start quantity. Use the method that is appropriate for the quantity you want to start. To start a specified quantity of a single sublot, use the Start method of a Sublot object. To specify the machine on which to start a specified quantity of a single sublot with a Sublot object, use the StartOnMachine method. For more information on the Sublot object class, see Chapter 6, “Activity Objects.” Since Start identifies the sublot(s) to start though a parameter that is an automation object of the StartItem(s) class, you must create a StartItem(s) object and set the properties before calling Start.

Syntax returnCode = %Machine.Start(startLots); where:

Data Type Data Type Parameter (InTouch) (VB) Description

StartLots Object Object InStartItem object(s) to start

Example The following script starts multiple sublots on a specific machine with the Start method of a Machine object (%Machine_Object). In this example, create a StartItem object (%StartItem_Object1) with 100 units (and 1200 ounces) of Lot_123 queued at Step 1 of waterroute[1]. Next, create a StartItem(s) object (%StartLots). %StartItem_Object1 is added to %StartLots. %StartLots identifies all the sublots to start in the Start method of a Machine object on the machine named BottleFiller1. 1. Create StartItem objects. Create a StartItem object. OLE_CreateObject(%StartItem_Object1, “InTrack.StartItem”); Set the PrimaryAmt property to the primary quantity to start. %StartItem_Object1.PrimaryAmt.Quantity = 100; %StartItem_Object1.PrimaryAmt.Units = “units”; Set the SecondaryAmt property to the secondary amount to start. %StartItem_Object1.SecondaryAmt.Quantity = 1200; %StartItem_Object1.SecondaryAmt.Units = “ounces”; Set the Sublot property to the sublot to start. %StartItem_Object1.Sublot = “Lot_123@waterroute[1]:step1”; Repeat steps 1a to 1d to create all needed StartItem objects. Structural Objects 5-63

2. Create a StartItems object. OLE_CreateObject (%StartLots, “InTrack.StartItems”); Add individual StartItem objects to the StartItems object with the Add method. %StartLots.Add(%StartItem_Object1); Repeat step 2a to add additional StartItem objects to the StartItems object. 3. Create a Machine object. OLE_CreateObject(%Machine_Object, “InTrack.Machine”); 4. Set the MachineKey to the machine on which to start the sublots. %Machine_Object.MachineKey = “BottleFiller1”; 5. Call the Start method. returnCode = %Machine_Object.Start(%StartLots);

StartRepair

The StartRepair method changes a machine’s maintenance status to IN_REPAIR in the resource tracking log.

Notes: When repairs are started, the OpenRepair method is called. When repairs are completed, the CloseRepair method is called. Between these two methods, use the StartRepair method and StopRepair method as repairs are started and stopped (but not completed) on a machine. Only one repair can be open on the same machine at the same time.

Syntax returnCode = %Machine.StartRepair(description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Description Message String Description 5-64 Chapter 5

StartTask

The StartTask method records when a task has been started in the InTrack Resource Tracking logs. Tasks are maintenance procedures defined in ModelMaker. A task can be periodic (for example, after 20 starts, recalibrate the machine) or nonperiodic (for example, recalibrate the machine at any one time). The text provided in the description parameter is saved as part of the log entry in the MachineMaintActivityLog table.

Notes: A Query.MachineTask object retrieves information about machine tasks for a specific machine type. Multiple tasks can be started at one time.

The StartTask method records when a task has been started in the resource tracking logs.

Syntax returnCode = %Machine.StartTask(taskId, Description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

TaskId Message String Task name Description Message String Task start comment Structural Objects 5-65

StopRepair

The StopRepair method identifies when repairs on a machine are stopped. The text provided in the description parameter is saved as part of the log entry in the MachineMaintActivityLog table.

Notes: When repairs are started, the OpenRepair method is called. When repairs are completed, the CloseRepair method is called. Between these two methods, use the StartRepair method and StopRepair method as repairs are started and stopped (but not completed) on a machine. Only one repair can be open on the same machine at the same time.

Syntax returnCode = %Machine.StopRepair(description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Description Message String Description 5-66 Chapter 5

TakeOffline

The TakeOffline method identifies when a machine is not available for processing. This method changes the machine’s status to “OFFLINE.”

Syntax returnCode = %Machine.TakeOffline();

UpdateDiagnosis

The UpdateDiagnosis method records diagnosis messages or comments in the resource tracking logs.

Syntax returnCode = %Machine.UpdateDiagnosis(diagnosis); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Diagnosis Message String Diagnosis string, may be linked to a failure reason

UpdateFailureReason

The UpdateFailureReason method records the appropriate reason for a machine failure in the InTrack resource tracking logs. Failure reasons are defined by machine type.

Syntax returnCode = %Machine.UpdateFailureReason(FailureReason); where:

Data Type Data Type Parameter (InTouch) (VB) Description

FailureReason Message String Failure reason Structural Objects 5-67

UpdateFailureSymptom

The UpdateFailureSymptom method records the appropriate symptom for a machine failure in the InTrack resource tracking logs. Failure symptoms are defined by machine type.

Syntax returnCode = %Machine.UpdateFailureSymptom(FailureSymptom); where:

Data Type Data Type Parameter (InTouch) (VB) Description

FailureSymptom Message String Failure symptom

UpdateWorkStatus

The UpdateWorkStatus method records update messages or comments in the InTrack resource tracking logs.

Syntax returnCode = %Machine.UpdateWorkStatus(workStatus); where:

Data Type Data Type Parameter (InTouch) (VB) Description

WorkStatus Message String Work status code 5-68 Chapter 5

Machines Object Class

The Machines object class is a collection class. It groups multiple Machine objects for processing as a group instead of individually.

Identification

Object Name: InMachines Interface Name: IInMachines InTouch Object Name: %Machines

Properties

The following table describes the property of a Machines object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of Machine objects in the Machines object.

Methods

This section describes the methods of the Machines class.

Add

The Add method adds a Machine object(s) to a Machines object. The Machine object is specified through the %Machine in the method call.

Syntax returnCode = %Machines.Add(%Machine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Machine Objects Object Machine(s) object to add.

Clear

The Clear method clears all Machine objects from a Machines object.

Syntax returnCode = %Machines.Clear(); Structural Objects 5-69

Item

The Item method locates a Machine object within a Machines object. The Machine object is specified by index or key name in the method call.

Syntax %Machine = %Machines.Item(index); %Machine = %Machines.Item(key); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of Machine object to locate (1 ≤ index ≤ Count) key Message String Name identifying the Machine object to locate.

Remove

The Remove method removes a Machine object from a Machines object. The Machine object is specified by index, key, or Machine object in the method call.

Syntax returnCode = %Machines.Remove(index); returnCode = %Machines.Remove(key); returnCode = %Machines.Remove(Machine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of Machine object to remove (1 ≤ index ≤ Count) Key Message String Name identifying the Machine object to remove. Machine Object Object Machine object to remove.

5-70 Chapter 5

MachineTask Object Class

The MachineTask object class stores assigned machine tasks. It is used in conjunction with methods of Machine objects used to assign different machine tasks. The creation string for the MachineTask object class is InTrack.MachineTask. The machine task’s version key string is the default property and it is read/write. All other properties are read-only. MachineTask objects have no methods.

Identification

Object Name: InMachineTask Interface Name: IInMachineTask InTouch Object Name: %MachineTask

Structural Objects 5-71

Properties

The following table describes the properties of a MachineTask object.

Data Type Property (InTouch) (VB) Access Description

TaskName Message String r/w Version key identifying the MachineTask object (default property) TakeOffline Discrete Boolean r/w Boolean value indicating to take the machine offline: –1 = take offline 0 = do not take offline Periodic Discrete Boolean r/w Boolean value indicated if maintenance is periodic: –1 = periodic 0 = not periodic MaintenanceTimeInterval Object Object r/w MaintenanceTimeInterval object (used with wear measures 1 and 2) WarningTimeInterval Object Object r/w WarningTimeInterval object (used with wear measures 1 and 2) MaintenanceLotInterval Integer Long r/w Number of lots processed between maintenance periods (used with wear measure 3) WarningLotInterval Integer Long r/w Number of lots processed between maintenance warnings (used with wear measure 3) MaintenanceQtyInterval Real Double r/w Quantity of units processed between maintenance periods (used with wear measure 4) WearMeasure Integer Short r/w Assigned wear measure for machine type: 1 = Clock Time 2 = Running Time 3 = Lots Completed 4 = Quantity Completed WarningQtyInterval Real Double r/w Quantity of units processed between maintenance warnings (used with wear measure 4) 5-72 Chapter 5

MachineTasks Object Class

The MachineTasks object class is a collection class. It groups multiple MachineTask objects for processing as a group instead of individually.

Identification

Object Name: InMachineTasks Interface Name: IinMachineTasks InTouch Object Name: %MachineTasks

Properties

The following table describes the property of a MachineTasks object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of MachineTask objects in the MachineTasks collection.

Methods

This section describes the methods of the MachineTasks class.

Add

The Add method adds a MachineTask object to a MachineTasks collection. The MachineTask object is specified through the %MachineTask in the method call.

Syntax returnCode = %MachineTasks.Add(%MachineTask); where:

Data Type Data Type Parameter (InTouch) (VB) Description

MachineTask Objects Object MachineTask object to add.

Clear

The Clear method clears all MachineTask objects from a MachineTasks collection.

Syntax returnCode = %MachineTasks.Clear(); Structural Objects 5-73

Item

The Item method locates a MachineTask object within a MachineTasks object. The MachineTask object is specified by index or key name in the method call.

Syntax %MachineTask = %MachineTasks.Item(index); %MachineTask = %MachineTasks.Item(key); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of MachineTask object to locate (1 ≤ index ≤ Count) key Message String Name identifying the MachineTask object to locate.

Remove

The Remove method removes a MachineTask object from a MachineTasks object. The MachineTask object is specified by index, key, or MachineTask object in the method call.

Syntax returnCode = %MachineTasks.Remove(index); returnCode = %MachineTasks.Remove(key); returnCode = %MachineTasks.Remove(MachineTask); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of MachineTask object to remove (1 ≤ index ≤ Count) Key Message String Name identifying the MachineTask object to remove. MachineTask Object Object MachineTask object to remove. 5-74 Chapter 5

MachineType Object Class

The MachineType object class provides an OLE automation interface to the InTrack machine type object. The creation string for the MachineType object class is InTrack.MachineType. The machine type’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method.

Identification

Object Name: InMachineType Interface Name: IInMachineType InTouch Object Name: %MachineType

Properties

The following table describes the properties of a MachineType object.

Data Type Data Type Property (InTouch) (VB) Access Description

MachineTypeKey Message String r/w Version key identifying the MachineType object (default property) Description Message String r Description ProcessingType Integer Short r Machine type processing type: 0 = Batch –1 = Serial FailureReasons Object Object r Collection of failure reason strings FailureSymptoms Object Object r Collection of failure symptom strings Tasks Object Object r Collection of MachineTask objects CapacityUOM Message String r Capacity unit of measure

Note: Two collection objects, FailureReasons and FailureSymptoms, can be used to save time adding or deleting failure reason or failure method properties. You can create the collection, add individual strings of text, then use the collections in the methods of a MachineType object. Structural Objects 5-75

Methods

This section describes the methods of the MachineType class.

AddFailureReasons

The AddFailureReasons method appends new objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %MachineType.AddFailureReasons(failureReasons); where:

Data Type Data Type Parameter (InTouch) (VB) Description

FailureReasons Object Object List of failure reasons

AddFailureSymptoms

The AddFailureSymptoms method appends new objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %MachineType.AddFailureSymptoms(failureSymptoms); where:

Data Type Data Type Parameter (InTouch) (VB) Description

FailureSymptoms Object Object List of failure symptoms

AddMachineTasks

The AddMachineTasks method appends new objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %MachineType.AddMachineTasks(MachineTasks); where:

Data Type Data Type Parameter (InTouch) (VB) Description

MachineTasks Object Object MachineTask object or MachineTasks collection 5-76 Chapter 5

Create

The Create method creates a MachineType object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %MachineType.Create(MachineTypeKey, Description, ProcessingType, CapacityUnits, FailureReasons, FailureSymptoms, MachineTasks); where:

Data Type Data Type Parameter (InTouch) (VB) Description

MachineTypeKey Message String MachineType key Description Message String Description ProcessingType Integer Short Machine type processing type: 0 = Batch –1 = Serial CapacityUnits Message String Machine type capacity, unit of measure FailureReasons var VARIANT String list or InFailureReasons collection FailureSymptoms var VARIANT String list or InFailureSymptoms collection MachineTasks Object Object MachineTask object or MachineTasks collection

Delete

The Delete method removes a MachineType object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %MachineType.Delete();

DeleteAllFailureReasons

The DeleteAllFailureReasons method removes all InFailureReasons objects and saves the empty collection object to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %MachineType.DeleteAllFailureReasons(); Structural Objects 5-77

DeleteAllFailureSymptoms

The DeleteAllFailureSymptoms method removes all InFailureSymptoms objects and saves the empty collection object to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %MachineType.DeleteAllFailureSymptoms();

DeleteAllMachineTasks

The DeleteAllMachineTasks method removes all MachineTasks objects and saves the empty collection object to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %MachineType.DeleteAllMachineTasks();

DeleteFailureReasons

The DeleteFailureReasons method removes the InFailureReasons objects and saves the modified collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %MachineType.DeleteFailureReasons(FailureReasons); where:

Data Type Data Type Parameter (InTouch) (VB) Description

FailureReasons var VARIANT String list or InFailureReasons collection 5-78 Chapter 5

DeleteFailureSymptoms

The DeleteFailureSymptoms method removes the InFailureSymptoms objects and saves the modified collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %MachineType.DeleteFailureSymptoms(FailureSymptoms); where:

Data Type Data Type Parameter (InTouch) (VB) Description

FailureSymptoms var VARIANT String list or InFailureSymptoms collection

DeleteMachineTasks

The DeleteMachineTasks method removes the MachineTask or MachineTasks object(s) and saves the modified collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %MachineType.DeleteMachineTasks(MachineTasks); where:

Data Type Data Type Parameter (InTouch) (VB) Description

MachineTasks Object Object MachineTask object or MachineTasks collection

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the MachineType object class.

Syntax ReturnCode = %MachineType.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type Structural Objects 5-79

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the MachineType object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %MachineType.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the MachineType object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %MachineType.Load();

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of a MachineType object.

Syntax returnCode = %MachineType.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type

5-80 Chapter 5

Material Object Class

The Material object class represents material and bills of material for InTrack. Material objects describe products built on a route (WIP), or inventory (bulk) materials. A material object contains a list of input materials and output materials known as the bill of material. The bill of material is the list of ingredients necessary to build the product material and the list of coproducts and by- products resulting from the production of the product material. The bill of material for the product material is considered an attribute and is not exposed as an independent object. Material objects contain collections of bill of material inputs and outputs called BOMItems. BOMItems objects are collections of objects of the BOMItem class. A BOMItem object can contain a collection of substitute input materials known as BOMSubItems. Since substitute materials apply only to input materials, they should be added only to BOMItem objects intended to be used as input. After materials are fully defined with their inputs, substitute inputs, and outputs, the material can be associated with route(s) that are capable of producing the material. When associated, the material’s bill of material items is distributed along the route at particular route steps. Route steps are where operations are performed and where materials are consumed or produced.

Identification

Object Name: InMaterial Interface Name: IinMaterial InTouch Object Name: %Material

Example — Using a Material Object in a Route The following example creates a Material object with two input materials and a single output material. The material is associated with a route, and added as step inputs and outputs using the default values. The route is a two-step route with each step taking an input, and the last step generating a by-product. 1. Create all material objects. OLE_CreateObject(%Material_Object, "InTrack.Material"); OLE_CreateObject(%TimeInterval_Object, "InTrack.TimeInterval"); %TimeInterval_Object.TotalSeconds = 31536000; %Material_Object.MaterialKey = "SpringWater"; returnCode = %Material_Object.Create("description", 2, "gallons", "gallons", %TimeInterval_Object, -1); %Material_Object.MaterialKey = "BottleCaps[1]"; returnCode = %Material_Object.Create("description", 1, "each", "each", %TimeInterval_Object, -1); %Material_Object.MaterialKey = "BottleCaps[2]"; returnCode = %Material_Object.Create("description", 1, "each", "each", %TimeInterval_Object, -1); %Material_Object.MaterialKey = "BentCaps[1]"; returnCode = %Material_Object.Create("description", 1, "each", "each", %TimeInterval_Object, -1); %Material_Object.MaterialKey = "ChateauNatural"; returnCode = %Material_Object.Create("Fancy name for spring water", 1, "each", "each", %TimeInterval_Object, -1); Structural Objects 5-81

2. Create BOMItem objects to be used as input. OLE_CreateObject(%BOMItem_Object1, "InTrack.BOMItem"); OLE_CreateObject(%BOMItem_Object2, "InTrack.BOMItem"); 3. Set the properties for each object. %BOMItem_Object1.MaterialKey = "SpringWater"; %BOMItem_Object1.Quantity = 1.0; %BOMItem_Object1.UnitOfMeasure = "gallon"; %BOMItem_Object1.LowerTolerance = 50.0; %BOMItem_Object1.UpperTolerance = 120.0; %BOMItem_Object1.ScaledQty = -1; %BOMItem_Object2.MaterialKey = "BottleCaps[1]"; %BOMItem_Object2.Quantity = 16.0; %BOMItem_Object2.UnitOfMeasure = "each"; %BOMItem_Object2.LowerTolerance = 0.0; %BOMItem_Object2.UpperTolerance = 0.0; %BOMItem_Object2.ScaledQty = 0; 4. Create a substitute material for one of the objects. OLE_CreateObject(%BOMSubItem_Object, "InTrack.BOMSubItem"); %BOMSubItem_Object.MaterialKey = "BottleCaps[2]"; %BOMSubItem_Object.UnitOfMeasure = "each"; %BOMSubItem_Object.SubstituteRatio = 1.0; %BOMSubItem_Object.MaxSubstitutionPct = 100.0; 5. Add the substitute material to BOMItem. returnCode = %BOMItem_Object2.AddSubstitutes(%BOMSubItem_Object); 6. Create a BOMItem object to be used as output. OLE_CreateObject(%BOMItem_Object3, "InTrack.BOMItem"); 7. Set the properties for the output object. %BOMItem_Object3.MaterialKey = "BentCaps[1]"; %BOMItem_Object3.Quantity = 8.0; %BOMItem_Object3.UnitOfMeasure = "each"; %BOMItem_Object3.LowerTolerance = 0.0; %BOMItem_Object3.UpperTolerance = 0.0; %BOMItem_Object3.DecQty = -1; 8. Set the material key for the product. %Material_Object.MaterialKey = "ChateauNatural"; 9. Define bill of material for material to the database. Inputs are added to a collection first. OLE_CreateObject(%BOMInputs, "InTrack.BOMItems"); OLE_CreateObject(%BOMOutputs, "InTrack.BOMItems"); returnCode = %BOMInputs.Add(%BOMItem_Object1); returnCode = %BOMInputs.Add(%BOMItem_Object2); returnCode = %BOMOutputs.Add(%BOMItem_Object3); returnCode = %Material_Object.CreateBOM(8.0, "each", %BOMInputs, %BOMOutputs); 10. Associate the material with a route. returnCode = %Material_Object.AssociateRoute("WaterRoute[1]"); 11. Create step inputs using BOMItem objects to set default values. OLE_CreateObject(%StepInputItem_Object1, "InTrack.StepInputItem"); OLE_CreateObject(%StepInputItem_Object2, "InTrack.StepInputItem"); returnCode = %StepInputItem_Object1.InitializeFrom(%BOMItem_Object1); returnCode = %StepInputItem_Object2.InitializeFrom(%BOMItem_Object2); 5-82 Chapter 5

12. Create step output using BOMItem object to set default values. Destination is inventory. Notice that the disposition code is the key and must be set. In addition, if the destination is to a route, both the destination route and route step names must be specified.} OLE_CreateObject(%StepOutputItem_Object, "InTrack.StepOutputItem"); returnCode = %StepOutputItem_Object.InitializeFrom(%BOMItem_Object3); %StepOutputItem_Object.Destination = 1; %StepOutputItem_Object.DispositionCodeKey = "Rework" 13. Create Route object and add step inputs and outputs. Notice that both the route key and the material must be specified before adding step items. OLE_CreateObject(%Route_Object, "InTrack.Route"); %Route_Object.RouteKey = "WaterRoute[1]"; %Route_Object.Material = "ChateauNatural"; returnCode = %Route_Object.AddInputItems(%StepInputItem_Object1, "1", -1); returnCode = %Route_Object.AddInputItems(%StepInputItem_Object2, "2", -1); returnCode = %Route_Object.AddOutputItems(%StepOutputItem_Object, "2", -1); The following sections provide property and method information for a Material object.

Properties

The following table describes the properties of a Material object.

Data Type Data Type Property (InTouch) (VB) Access Description

MaterialKey Message String r/w Version key identifying the Material object (default property) Description Message String r Description ControlType Integer Short r Material control type: 1 = Lot 2 = Bulk ReceiveUOM Message String r Receive unit of measure IssueUOM Message String r Issue unit of measure Lifetime Object Object r Material lifetime, TimeInterval object BOMStandardQty Real Double r Bill of material quantity BOMStandardUOM Message String r Bill of material unit of measure BOMInputItems Object Object r Bill of material inputs BOMOutputItems Object Object r Bill of materials outputs Structural Objects 5-83

Methods

This section describes the methods of the Material class.

AddCycleTimeOverride

The AddCycleTimeOverride method adds a cycle time override to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.AddCycleTimeOverride(custSpec, operation, cycleTime); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name CycleTime Object Object InTimeInterval object representing new cycle time

AddDataSetOverride

The AddDataSetOverride method overrides all the data set templates associated with an operation on a route that produces the target material (product). If customer specification information is supplied to this method, the override is applied to the customer specification data set templates; however, if this information is not supplied, the override is applied to the product data set templates.

Note: The override data set templates specified in the list must exist before calling this method.

Syntax returnCode = %Material.AddDataSetOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification to be overridden Operation Message String Operation name to be overridden ObjectList Message String Data set template objects to add to operation, in the form: DataSetTemplate[Version] 5-84 Chapter 5

Example — Adding an Override to a DataSetTemplate The following script creates a material object, sets the material key for the product where override is to be added, and adds three data set template overrides for customer specification “Wonderware”. 1. Create a Material object. OLE_CreateObject(%Material_Object, "InTrack.Material"); 2. Set the value of the MaterialKey property. %Material_Object.MaterialKey = "Mat001"; 3. Add an override of three data set templates to the Wonderware customer specification. returnCode = %Material_Object.AddDataSetOverride("Wonderware", "Operation", "DST1[1.2],DST2,DST3[2.1]");

AddInputItems

The AddInputItems method adds material input items to the bill of material, based on the material key supplied. The material key must be specified prior to calling the method. Also a bill of material must exist prior to adding any items. To create a bill of material, use the CreateBOM or SetQuantity method. Any substitute material must be added to the BOMItem of interest prior to adding the BOMItem as input.

Syntax returnCode = %Material.AddInputItems(items, replaceExisting); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Items Object Object InBOMItems, BOM input items collection ReplaceExisting Discrete Boolean Boolean value indicating existing items should be replaced –1 = yes (default) 0 = no Structural Objects 5-85

AddMachineOverride

The AddMachineOverride method overrides all the machines associated with an operation on a route that produces the target material (product). If customer specification information is supplied to this method, the override is applied to the customer specification. However, if this information is not supplied, the override is applied to the product machines.

Note: The overridden machines specified in the list must exist before calling this method.

Syntax returnCode = %Material.AddMachineOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification to override Operation Message String Name of operation to override Object List Message String Machine objects to include in operation

Example — Adding Machine Overrides The following script creates a material object, sets the material key for the product where override is to be added, and adds three machine overrides for customer specification “Wonderware”. 1. Create a Material object. OLE_CreateObject(%Material_Object, "InTrack.Material"); 2. Set the value of the MaterialKey property. %Material_Object.MaterialKey = "Mat001"; 3. Add an override of three machines to the Wonderware customer specification. returnCode = %Material_Object.AddMachineOverride("Wonderware", "Operation", " machine1, machine2, machine3"); 5-86 Chapter 5

AddOutputItems

The AddOutputItems method adds material output items to the material, based on the material key supplied. The material key must be specified prior to calling the method. Also a bill of material must exist prior to adding any items. To create a bill of material, use the CreateBOM or SetQuantity method.

Syntax returnCode = %Material.AddOutputItems(items, replaceExisting); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Items Object Object InBOMItems, BOM output items collection ReplaceExisting Discrete Boolean Boolean value indicating that existing items should be replaced –1 = yes (default) 0 = no

AddOverlapOverride

The AddOverlapOverride method adds an overlap override to the material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.AddOverlapOverride(custSpec, operation, overlapped); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name Overlapped Boolean Boolean value indicating whether overlapping is enabled: -1 = yes (default) 0 = no Structural Objects 5-87

AddSetpointTemplateOverride

The AddSetpointTemplateOverrides method overrides all setpoint templates associated with an operation on a route producing the target material. If customer specification information is supplied to this method, the override is applied to the setpoint template for the customer specification. If this information is not supplied, the override is applied to the product setpoint templates.

Note: The override setpoint templates specified in the list must exist before calling this method.

Syntax returnCode = %Material.AddSetpointTemplateOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification to override, can be NULL Operation Message String Name of operation to have its setpoint templates overridden ObjectList Message String SetpointTemplate objects to add to operation

AddTrackingOverride

The AddTrackingOverride method adds a material tracking overrride to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.AddTrackingOverride(custSpec, operation, completeOnly, queueTime, userCertification); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name Complete only Discrete Boolean Boolean value indicating that operation is complete-only: –1 = yes (default) 0 = no QueueTime Object Object InTimeInterval, operation queue time UserCertification Message String Required user certification name 5-88 Chapter 5

AddWorkInstructionsOverride

The AddWorkInstructionsOverride method overrides all the work instructions associated with an operation on a route that produces the target material (product). If customer specification information is supplied to this method, the override is applied to the customer specification work instructions; however, if this information is not supplied, the override is applied to the product work instructions.

Note: The override work instructions specified in the list must exist before calling this method.

Syntax returnCode = %Material.AddWorkInstructionsOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification to be overridden Operation Message String Operation name to have work instructions overridden ObjectList Message String WorkInstruction objects to add to operation

Example — Overriding Work Instructions The following script creates a material object, sets the material key for the product where override is to be added, and adds two work instructions overrides for customer specification “Wonderware”. 1. Create a Material object. OLE_CreateObject(%Material_Object, "InTrack.Material"); 2. Set the value of the MaterialKey property. %Material_Object.MaterialKey = "Mat001"; 3. Add an override of two work instructions to the Wonderware customer specification. returnCode = %Material_Object.AddWorkInstructionsOverride("Wonderware", "Operation", "WorkInst1,WorkInst2"); Structural Objects 5-89

AddYieldOverride

The AddYieldOverride method adds a yield override to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.AddYieldOverride(custSpec, operation, yield); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification to override Operation Message String Operation name to override Yield Real Double Operation yield

AssociateRoute

The AssociateRoute method associates a material with a route. The material key property must be set before calling this method. After the association has been created, material inputs and outputs can be distributed along the appropriate route steps.

Syntax returnCode = %Material.AssociateRoute(routeName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RouteName Message String Route name 5-90 Chapter 5

Create

The Create method creates a structural object in the InTrack database for a material, based on the material key supplied. The material key must be specified prior to calling the method. If a material object with the same material name and version already exists in the database, the action taken depends on the state of the replaceExisting parameter: If True (–1), the attributes of the material are replaced by the values specified in the call parameters. If False (0), an error is returned.

Note: The Create method is preferred over individual “set” methods since this method is more efficient.

Syntax returnCode = %Material.Create(description, controlType, receiveUOM, issueUOM, lifeTime, replaceExisting); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Description Message String Material description ControlType Integer Short Material control type: 1 = Lot 2 = Bulk ReceiveUOM Message String Receive unit of measure IssueUOM Message String Issue unit of measure LifeTime Object Object InTimeInterval, material life time ReplaceExisting Discrete Boolean Boolean value indicating whether to replace existing material: –1 = yes (default) 0 = no Structural Objects 5-91

CreateBOM

The CreateBOM method creates a new bill of material for the material, based on the material key supplied. The material key must be specified prior to calling the method. Any existing bill of material is deleted prior to creating the new bill of material. Since any existing BOM is deleted prior to adding the new BOM, all the route step input and output items are removed from any producing route.

Syntax returnCode = %Material.CreateBOM(standardQty, standard UOM, inputItems, outputItems); where:

Data Type Data Type Parameter (InTouch) (VB) Description

StandardQty Real Double BOM standard quantity Standard UOM Message String BOM standard unit of measure InputItems Object Object InBOMItems, BOM input material collection OutputItems Object Object InBOMItems, BOM output material collection

DelAllDataSetOverride

The DelAllDataSetOverride method removes all dataset template overrides for the specified operation and optional customer specification. The material key property must be set before calling this method.

Syntax returnCode = %Material.DelAllDataSetOverride(custSpec, operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name 5-92 Chapter 5

DelAllMachineOverride

The DeleteMachineOverride method removes all machine overrides for the specified operation and optional customer specification. The material key property must be set before calling this method.

Syntax returnCode = %Material.DelAllMachineOverride(custSpec, operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name

DelAllSetpointTemplateOverrides

The DelAllSetpointTemplateOverride removes all setpoint template overrides for the specified operation and optional customer specification. The material key property must be set before calling this method.

Syntax returnCode = %Material.DelAllSetpointTemplateOverride(custSpec, operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification, can be NULL Operation Message String Operation name Structural Objects 5-93

DelAllWorkInstructionsOverride

The DelAllWorkInstructionsOverride method removes all work instructions overrides for the specified operation and optional customer specification. The material key property must be set before calling this method.

Syntax returnCode = %Material.DelAllWorkInstructionsOverride(custSpec, operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec String Optional customer specification Operation String Operation name

Delete

The Delete method deletes the material based on the material key supplied. The material key must be specified prior to calling the method. Deleting a material removes its corresponding bill of material, which in turn removes any associated step input or output items specified on any producing route. You cannot delete a material if there are existing lots.

Syntax returnCode = %Material.Delete();

DeleteAllInputItems

The DeleteAllInputItems method deletes all input items from the bill of material. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteAllInputItems();

DeleteAllOutputItems

The DeleteAllOutputItems method removes all output items from the bill of material. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteAllOutputItems(); 5-94 Chapter 5

DeleteBOM

The DeleteBOM method removes a bill of materials from the InTrack database. The key property must be set before calling the DeleteBOM Method.All route step input and output items are removed from any producing route.

Syntax returnCode = %Material.DeleteBOM();

DeleteCycleTimeOverride

The DeleteCycleTimeOverride method clears the cycle time override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteCycleTimeOverride(custSpec, operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name

DeleteDataSetOverride

The DeleteDataSetOverride method clears the override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteDataSetOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name ObjectList Message String Objects to delete from override Structural Objects 5-95

DeleteInputItems

The DeleteInputItems method deletes input items from the bill of material and from corresponding producing routes. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteInputItems(items, substitutesOnly); where:

Data Type Data Type Parameter (InTouch) (VB) Description

InputItems Object Object InBOMItems, items to remove SubstitutesOnly Discrete Boolean Boolean value indicating that only substitute items should be removed: –1 = yes (default) 0 = no

DeleteMachineOverride

The DeleteMachineOverride method clears the machine override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteMachineOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name ObjectList Message String Objects to delete from override 5-96 Chapter 5

DeleteOutputItems

The DeleteOutputItems method deletes output items from the bill of material and corresponding producing routes. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteOutputItems(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

OutputItems Object Object InBOMItems, items to remove

DeleteOverlapOverride

The DeleteOverlapOverride method clears the overlap override from a material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteOverlapOverride(custSpec, operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name Structural Objects 5-97

DeleteSetpointTemplateOverride

The DeleteSetpointTemplateOverrides removes the specified setpoint templates associated with an operation on a route producing the target material. If customer specification information is supplied to this method, the removal applies to the setpoint template for the customer specification. If this information is not supplied, the removal applies to the product setpoint templates.

Note: The override setpoint templates specified in the list must exist before calling this method.

Syntax returnCode = %Material.DeleteSetpointTemplateOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name ObjectList Message String SetpointTemplate objects to remove from override

DeleteTrackingOverride

The DeleteTrackingOverride method clears the material tracking overrride from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteTrackingOverride(custSpec, operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name 5-98 Chapter 5

DeleteWorkInstructionsOverride

The DeleteWorkInstructionsOverride method clears an override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteWorkInstructionsOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name ObjectList Message String WorkInstructions objects to remove from the override

DeleteYieldOverride

The DeleteYieldOverride method clears a yield override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %Material.DeleteYieldOverride(custSpec, operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name Structural Objects 5-99

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the Material object class.

Syntax ReturnCode = %Material.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the Material object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %Material.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the Material object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %Material.Load(); 5-100 Chapter 5

RemoveRouteAssociation

The RemoveRouteAssociation method removes the assocation between the material and the route. The material key property must be set before calling this method. After the association is removed, material inputs and outputs cannot be distributed to route steps on the route. Existing step inputs and outputs are deleted.

Syntax returnCode = %Material.RemoveRouteAssociation(routeName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RouteName Message String Route name version key

SetControlType

The SetControlType method updates the material in the InTrack database with a new control type. The material key property must be set before calling this method.

Syntax returnCode = %Material.SetControlType(controlType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ControlType Integer Short Material control type: 1 =Lot 2 = Bulk

SetDescription

The SetDescription method updates the material in the InTrack database with a new description. The material key property must be set before calling this method.

Syntax returnCode = %Material.SetDescription(description); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Description Message String Material description Structural Objects 5-101

SetLifeTime

The SetLifeTime method updates the material in the InTrack database with a new life time. The material key property must be set before calling this method.

Syntax returnCode = %Material.SetLifeTime(lifeTime); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Lifetime Object Object InTimeInterval, material shelf life time (TotalSeconds property)

SetQuantity

The SetQuantity method updates the material in the InTrack database with a BOM standard quantity. The material key property must be set before calling this method.

Syntax returnCode = %Material.SetQuantity(standardQty, standardUOM); where:

Data Type Data Type Parameter (InTouch) (VB) Description

StandardQty Real Double BOM standard quantity StandardUOM Message String BOM standard unit of measure

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of a Material object.

Syntax returnCode = %Material.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type 5-102 Chapter 5

SetUnitsOfMeasure

The SetUnitsOfMeasure method updates the material in the InTrack database with new units of measure. The material key property must be set before calling this method.

Syntax returnCode = %Material.SetUnitsOfMeasure(receiveUOM, issueUOM); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReceiveUOM Message String Receive units of measure IssueUOM Message String Issue units of measure

ToggleDataSetOverride

The ToggleDataSetOverride enables or disables an object that appears on the original operation from a specific operation and material. The material key property must be set before calling this method.

Syntax returnCode = %Material.ToggleDataSetOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name ObjectList Message String Objects to toggle Structural Objects 5-103

ToggleMachineOverride

The ToggleMachineOverride method enables or disables an object that appears on the original operation from a specific operation and material. The material key property must be set before calling this method.

Syntax returnCode = %Material.ToggleMachineOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name Object List Message String Objects to toggle

ToggleSetpointTemplateOverride

The ToggleSetpointTemplateOverride method enables or disables an object that appears on on the original operation from a specific operation and material. The material key property must be set before calling this method.

Syntax returnCode = %Material.ToggleSetpointTemplateOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name ObjectList Message String Objects to toggle 5-104 Chapter 5

ToggleWorkInstructionsOverride

The ToggleWorkInstructionsOverride method enables or disables an object that appears on the original operation from a specific operation and material. The material key property must be set before calling this method.

Syntax returnCode = %Material.ToggleWorkInstructionsOverride(custSpec, operation, objectList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

CustSpec Message String Optional customer specification Operation Message String Operation name ObjectList Message String Objects to toggle Structural Objects 5-105

Operation Object Class

The Operation object class provides an OLE automation interface to the InTrack operation object. The creation string for the Operation object class is InTrack.Operation. The operation’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method.

Identification

Object Name: InOperation Interface Name: IInOperation InTouch Object Name: %Operation

Properties

The following table describes the properties of an Operation object.

Data Type Data Type Property (InTouch) (VB) Access Description

OperationKey Message String r/w Version key of the Operation object Description Message String r Description Yield Real Single r Yield (range 0–1) CycleTime Object Object r InTimeInterval, cycle time QueueTime Object Object r InTimeInterval, maximum queue time CompleteOnly Discrete Boolean r Boolean value indicating that operation is complete-only –1 = yes (default) 0 = no Overlapped Discrete Boolean r Boolean value indicating that operation is overlapped (allows flow lots) –1 = yes (default) 0 = no UserCertification Message String r Required user certification SetpointTemplates Object Object r InSetpointTemplates collection DataSetTemplates Object Object r InDataSetTemplates collection QualifiedMachines Object Object r InMachines collection WorkInstructions Object Object r InWorkInstructionsList collection Bitmap file Message String r Path to bitmap file 5-106 Chapter 5

Methods

This section describes the methods of the Operation class.

AddDataSetTemplates

The AddDataSetTemplates method appends new data set template objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %Operation.AddDataSetTemplates(dataSetTemplates); where:

Data Type Data Type Parameter (InTouch) (VB) Description

DataSetTemplates var VARIANT Data set templates (comma-separated string) or InDataSetTemplate object or InDataSetTemplates collection

AddQualifiedMachines

The AddQualifiedMachines method appends machine objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %Operation.AddQualifiedMachines(qualifiedMachines); where:

Data Type Data Type Parameter (InTouch) (VB) Description

QualifiedMachines var VARIANT Machines (comma-separated string) or InMachine object or InMachines collection Structural Objects 5-107

AddSetpointTemplates

The AddSetpointTemplates method appends new setpoint template objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %Operation.AddSetpointTemplates(setpointTemplates); where:

Data Type Data Type Parameter (InTouch) (VB) Description

SetpointTemplates var VARIANT Setpoint templates (comma-separated string) or InSetpointTemplate object or InSetpointTemplates collection

AddWorkInstructions

The AddWorkInstructions method appends new work instruction objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %Operation.AddWorkInstructions(workInstructions); where:

Data Type Data Type Parameter (InTouch) (VB) Description

WorkInstructions var VARIANT Work instructions (comma-separated string) or InWorkInstructions object or InWorkInstructionsList collection 5-108 Chapter 5

Create

The Create method creates an Operation object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Note: This method has been replaced by the CreateEx method (see next page).

Syntax returnCode = %Operation.Create(OperationKey, description, cycleTime, yield, queueTime, completeOnlyFlag, overlapFlag, bitmapFile, userCertification, dataSetList, workInstList, machineList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

OperationKey Message String Operation key Description Message String Description CycleTime Object Object InTimeInterval object, cycle time Yield Real Single Yield (range 0–1) QueueTime Object Object InTimeInterval object, maximumqueue time CompleteOnlyFlag Discrete Boolean Boolean value indicating the operation is complete-only –1 = yes (default) 0 = no OverlapFlag Discrete Boolean Boolean value indicating the operation is overlapped (allows flow lots) –1 = yes (default) 0 = no BitmapFile Message String Bitmap file name UserCertification Message String Required user certification (string or Operation) DataSetList var VARIANT Data set templates (comma-separated) or InDataSetTemplate object or InDataSetTemplates collection WorkInstList var VARIANT Work instructions (comma-separated) or InWorkInstructions object or InWorkInstructionsList collection MachineList Object or String Machine (comma-separated) or InMachine object or InMachines collection Structural Objects 5-109

Example The following script creates an Operation object and uses the Create method to create a database structural object for the operation. 1. Create an Operation object. OLE_CreateObject(%Operation_Object, "InTrack.Operation"); 2. Create the database structural object for the operation. returnCode = %Operation_Object.Create("newOperation", "description", %CycleTime, 100.0, %QueueTime, -1, -1, "operation.bmp", "certification1", "dataSet1", "WorkInst1,WorkInst2[3.a4]", "machine1");

CreateEx

The CreateEx saves a new or existing operation to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %Operation.CreateEx(OperationKey, description, cycleTime, yield, queueTime, completeOnlyFlag, overlapFlag, bitmapFile, userCertification, dataSetList, workInstList, machineList, setpointTemplateList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

OperationKey Message String Operation key Description Message String Description CycleTime Object Object InTimeInterval object, cycle time Yield Real Single Yield (range 0–1) QueueTime Object Object InTimeInterval object, maximum queue time CompleteOnlyFlag Discrete Boolean Boolean value indicating complete-only –1 = yes (default) 0 = no OverlapFlag Discrete Boolean Boolean value indicating overlap (allows flow lots) –1 = yes (default) 0 = no BitmapFile Message String Bitmap file name UserCertification Message String Required user certification (string or Operation) DataSetList var VARIANT Data set templates or InDataSetTemplate object or InDataSetTemplates collection WorkInstList var VARIANT Work instructions or InWorkInstructions object or InWorkInstructionsList collection MachineList var VARIANT Machine or InMachine object or InMachines collection SetpointTemplateList var VARIANT Setpoint templates or InSetpointTemplate object or InSetpointTemplates collection 5-110 Chapter 5

Delete

The Delete method removes an Operation object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %Operation.Delete();

DeleteAllDataSetTemplates

The DeleteAllDataSetTemplates method removes all data set template objects and saves the empty collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %Operation.DeleteAllDataSetTemplates();

DeleteAllQualifiedMachines

The DeleteAllQualifiedMachines method removes all machine objects and saves the empty collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %Operation.DeleteAllQualifiedMachines();

DeleteAllSetpointTemplates

The DeleteAllSetpointTemplates method removes all setpoint template objects and saves the empty collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %Operation.DeleteAllSetpointTemplates();

DeleteAllWorkInstructions

The DeleteAllWorkInstructions method removes all data set template objects and saves the empty collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %Operation.DeleteAllWorkInstructions(); Structural Objects 5-111

DeleteDataSetTemplates

The DeleteDataSetTemplates method removes data set template objects and saves the modified collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %Operation.DeleteDataSetTemplates(dataSetTemplates); where:

Data Type Data Type Parameter (InTouch) (VB) Description

DataSetTemplates var VARIANT Data set templates (comma-separated string) or InDataSetTemplate object or InDataSetTemplates collection

DeleteQualifiedMachines

The DeleteQualifiedMachines method removes machine objects and saves the modified collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %Operation.DeleteQualifiedMachines(qualifiedMachines); where:

Data Type Data Type Parameter (InTouch) (VB) Description

QualifiedMachines var VARIANT Machines (comma-separated string) or InMachine object or InMachines collection 5-112 Chapter 5

DeleteSetpointTemplates

The DeleteSetpointTemplates method removes setpoint template objects and saves the modified collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %Operation.DeleteSetpointTemplates(setpointTemplates); where:

Data Type Data Type Parameter (InTouch) (VB) Description

SetpointTemplates var VARIANT Setpoint templates (comma-separated string) or InSetpointTemplate object or InSetpointTemplates collection

DeleteWorkInstructions

The DeleteWorkInstructions method removes work instructions objects and saves the modified collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %Operation.DeleteWorkInstructions(workInstructions); where:

Data Type Data Type Parameter (InTouch) (VB) Description

WorkInstructions var VARIANT Work instructions (comma-separated string) or InWorkInstructions object or InWorkInstructionsList collection

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the Operation object class.

Syntax ReturnCode = %Operation.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type Structural Objects 5-113

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the Operation object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %Operation.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the Operation object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %Operation.Load();

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an Operation object.

Syntax returnCode = %Operation.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type

5-114 Chapter 5

Privilege Object Class

The Privileges object class stores codes assigning access privileges to users. For multiple processing, Privilege objects can be grouped in a Priveleges collection.

Identification

Object Name: InPrivilege Interface Name: IInPrivilege InTouch Object Name: %Privilege

Properties

The following table describes the property of a Privilege object. A Privilege object has no methods.

Data Type Data Type Property (InTouch) (VB) Access Description

Code Integer Short r Numeric code used to indicate degree of user privileges: 1 = Read User 2 = Write User 3 = Read Dataset Template 4 = Write Dataset Template 5 = Read Disposition Code 6 = Write Disposition Code 7 = Read Material 8 = Write Material 9 = Read Operation 10 = Write Operation 11 = Read Route 12 = Write Route 13 = Read Work Instructions 14 = Write Work Instructions 15 = Read User-Defined Attributes 16 = Write User-Defined Attributes 17 = Read Customer Specifications 18 = Write Customer Specifications 19 = Read Location 20 = Write Location 21 = Read Machine 22 = Write Machine 23 = Read Machine Type 24 = Write Machine Type 25 = Read User Certification

Table Continues Structural Objects 5-115

Data Type Data Type Property (InTouch) (VB) Access Description

privilegeCode Integer Short Privilege code corresponding to the runtime transaction the user wants to perform: 26 = Write User Certification 27 = Read Calendar 28 = Write Calendar 29 = Read Security Group 30 = Write Security Group 31 = Read Setpoint Template 32 = Write Setpoint Template 41 = Lot Adjust 42 = Lot Close 43 = Lot Complete 44 = Lot Consume 45 = Lot Create 46 = Lot Hold 47 = Lot Release From Hold 48 = Lot Merge 49 = Lot Move 50 = Lot Quarantine 51 = Lot Release From Quarantine 52 = Lot Split 53 = Lot Start 54 = Lot Comment 55 = Lot Ship 56 = Lot Disassemble 91 = Query 92 = Set UDA 93 = Data Collect 94 = Log Machine Repairs 95 = Repair Machines 96 = Maintain Machines 97 = Override Machine Operational Status 101 = Read System Administrator 102 = Write System Administrator 5-116 Chapter 5

Privileges Object Class

The Privileges object class is a collection class used with the Privilege object. It groups privileges for processing as a group instead of individually.

Identification

Object Name: InPrivileges Interface Name: IInPrivileges InTouch Object Name: %Privileges

Properties

The following table describes the property of a Privileges object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of Privilege objects in the Privileges collection.

Methods

This section describes the methods of the Privileges class.

Add

The Add method adds a Privilege object to a Privileges collection.

Syntax returnCode = %Privileges.Add(Privilege); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Privilege Object Object Privilege object to add.

Clear

The Clear method clears all privileges from a Privileges collection.

Syntax returnCode = %Privileges.Clear(); Structural Objects 5-117

Item

The Item method locates a Privilege object within a Privileges object. The Privilege object is specified by name in the method call.

Syntax %Privilege = %Privileges.Item(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Privilege Object Object Name identifying the Privilege object to locate. Index Integer Long Numerical index

Remove

The Remove method removes a Privilege object from a Privileges object, as specified by name in the method call.

Syntax returnCode = %Privileges.Remove(Privilege); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Privilege Object Object Privilege object, name or index to remove. 5-118 Chapter 5

Route Object Class

The Route object class, along with RoutePath, RoutePaths, RouteStep and RouteSteps classes, provide an OLE automation interface to the InTrack route object. The creation string for the Route object class is InTrack.Route. The route’s key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties, except for product material, are read-only. The read-only properties are set by calling the Load method. Since a route can produce many different materials, the product material is a read/write property to enable editing of material inputs, material outputs, or setpoints. Route step and route path classes that do not have a Load method are created and loaded as part of the primary route object. They have read/write properties to enable data collection.

Identification

Object Name: InRoute Interface Name: IInRoute InTouch Object Name: %Route

Properties

The following table describes the properties of a Route object.

Data Type Data Type Property (InTouch) (VB) Access Description

RouteKey Message String r/w Route key identifying the route object (default property) Material Message String r/w Material key identifying a material associated with the route object Description Message String r Route description DefaultDispositionCode Object Object r Default disposition code object RouteSteps Object Object r Collection of route step objects InitialStep Message String r Name of first step on route Structural Objects 5-119

Example 1 — Adding Input and Output Materials to a Route The following example creates a Route object. The route is a two-step route with each step taking an input, and the last step generating a by-product. The input and output items are set using the bill of material retrieved from the product. Assume all materials already exist. 1. Create a Material object. OLE_CreateObject(%Material_Object, "InTrack.Material"); 2. Set the material key for the Material object and load it. %Material_Object.MaterialKey = "ChateauNatural"; returnCode = %Material_Object.Load; 3. Create step inputs using Bill of Material to set default values. OLE_CreateObject(%StepInputItem_Object1, "InTrack.StepInputItem"); OLE_CreateObject(%StepInputItem_Object2, "InTrack.StepInputItem"); OLE_CreateObject(%BOMItem_Object1, "InTrack.BOMItem"); OLE_CreateObject(%BOMItem_Object2, "InTrack.BOMItem"); %BOMItem_Object1 = %Material_Object.BOMInputItems.Item("SpringWater"); %BOMItem_Object2 = %Material_Object.BOMInputItems.Item("Caps"); returnCode = %StepInputItem_Object1.InitializeFrom(%BOMItem_Object1); returnCode = %StepInputItem_Object2.InitialzedFrom(%BOMItem_Object2); 4. Create step output using Bill of Material to set default values. Set destination to inventory and disposition code to "Rework". OLE_CreateObject(%StepOutputItem_Object, "InTrack.StepOutputItem"); OLE_CreateObject(%BOMItem_Object3, "InTrack.BOMItem"); %BOMItem_Object3 = %Material_Object.BOMOutputItems.Item("BentCaps[1]"); returnCode = %StepOutputItem_Object.InitializeFrom(%BOMItem_Object3); %StepOutputItem_Object.Destination = 1; %StepOutputItem_Object.DispositionCodeKey = "Rework"; 5. Create Route object and add step inputs and outputs. OLE_CreateObject(%Route_Object, "InTrack.Route"); %Route_Object.RouteKey = "WaterRoute[1]"; %Route_Object.Material = "ChateauNatural"; returnCode = %Route_Object.AddInputItems(%StepInputItem_Object1, "1", -1); returnCode = %Route_Object.AddInputItems(%StepInputItem_Object2, "2", -1); returnCode = %Route_Object.AddOutputItems(%StepOutputItem_Object, "2", -1); 5-120 Chapter 5

Example 2 — Creating a Two-Step Route The following code creates a two step route. The steps are named "1" and "2". The code assumes there are two operations already in the database called "Op1" and "Op2". There is only one path between the two steps that uses the "OK" disposition code.

OLE_CreateObject(%Route , "InTrack.Route") ; OLE_CreateObject(%RoutePath , "InTrack.RoutePath") ; OLE_CreateObject(%RouteStep1 , "InTrack.RouteStep") ; OLE_CreateObject(%RouteStep2 , "InTrack.RouteStep") ; OLE_CreateObject(%RouteSteps , "InTrack.RouteSteps") ; OLE_CreateObject(%Operation1 , "InTrack.Operation") ; OLE_CreateObject(%Operation2 , "InTrack.Operation") ; OLE_CreateObject(%DispositionCode , "InTrack.DispositionCode") ; OLE_CreateObject(%DefaultCode , "InTrack.DispositionCode") ;

%Operation1.OperationKey = "Op1[NONE]"; %Operation2.OperationKey = "Op2[NONE]"; %RouteStep2.Operation = %Operation2; %RouteStep2.Name = "2"; %RouteSteps.Add(%RouteStep2); %DispositionCode.DispositionCodeKey = "OK"; %RoutePath.DestinationStep = %RouteStep2; %RoutePath.DispositionCode = %DispositionCode; %RoutePath.IsMainPath = 1; %RouteStep1.Name = "1"; %RouteStep1.Operation = %Operation1; %RouteStep1.Paths.Add(%RoutePath); %RouteSteps.Add(%RouteStep1); %DefaultCode.DispositionCodeKey = "OK"; returnCode = %Route.Create("Route1[NONE]", "description", %DefaultCode, %RouteSteps, %RouteStep1); Structural Objects 5-121

Methods

This section describes the methods of the Route class.

AddInputItems

The AddInputItems method appends new input items and saves the modified collection to the database. The route key and material properties must be set before calling this method.

Syntax returnCode = %Route.AddInputItems(inputs, routeStep, replaceExisting); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Inputs Object Object InStepInputItem(s) object, step input item(s) to add or replace RouteStep Message String Name of the route step to which inputs should be added ReplaceExisting Discrete Boolean Boolean value indicating whether existing input items should be replaced –1 = yes (default) 0 = no

AddOutputItems

The AddOutputItems method appends new output items and saves the modified collection to the database. The route key and material properties must be set before calling this method.

Syntax returnCode = %Route.AddOutputItems(outputs, routeStep, replaceExisting); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Outputs Object Object InStepOutputItem(s) object, step output item(s) to add or replace RouteStep Message String Name of the route step to which outputs should be added ReplaceExisting Discrete Boolean Boolean value indicating whether existing output items should be replaced –1 = yes (default) 0 = no 5-122 Chapter 5

AddRoutePaths

The AddRoutePaths method adds new paths or replaces existing paths between existing route steps and saves the modified route to the database. The route key property must be set before calling this method. The paths are specified in the Paths property of the RouteStep object. A new path is created by specifiying a disposition code different from all other paths between the source and and the destination route steps.

Syntax returnCode = %Route.AddRoutePaths(fromSteps, replaceExisting); where:

Data Type Data Type Parameter (InTouch) (VB) Description

FromSteps Object Object RouteStep(s) object, route step(s) containing the path(s) to add or replace ReplaceExisting Discrete Boolean Boolean value indicating that existing paths should be replaced –1 = yes (default) 0 = no

AddRouteSteps

The AddRouteSteps method adds new route steps or replaces existing route steps and saves the modified route to the database. If the route step contains paths, an attempt will be made to add the paths to the route independently of the step. The route key property must be set before calling this method.

Syntax returnCode = %Route.AddRouteSteps(steps, replaceExisting); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Steps Object Object RouteStep(s) object, route step(s) to add or replace ReplaceExisting Discrete Boolean Boolean value indicating whether existing steps should be replaced –1 = yes (default) 0 = no Structural Objects 5-123

AddSetpointItems

The AddSetpointItems method appends new setpoint items and saves the modified collection to the database. The route key and material properties must be set before calling this method.

Syntax returnCode = %Route.AddSetpointItems(setpoints, routeStep, replaceExisting); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Setpoints Object Obbject InStepSetpointItem(s) object, step setpoint item(s) to add or replace RouteStep Message String Name of the route step to which setpoints should be added ReplaceExisting Discrete Boolean Boolean value indicating whether existing setpoint items should be replaced –1 = yes (default) 0 = no 5-124 Chapter 5

Create

The Create method creates a Route object and saves it to the InTrack database. The route key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %Route.Create(routeKey, description, defaultDispCode, routeSteps, initialRouteStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RouteKey Message String Version key identifying the route object Description Message String Route description DefaultDispCode Object or String Default disposition code object or name of the disposition code RouteSteps Object or String InRouteSteps object (collection of route steps in the route) InitialRouteStep Object or String Initial route step object or name of initial route step Structural Objects 5-125

Delete

The Delete method removes a Route object from the InTrack database. The route key property must be set before calling the Delete Method.

Syntax returnCode = %Route.Delete();

DeleteAllInputItems

The DeleteAllInputItems method removes all material inputs for the product and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %Route.DeleteAllInputItems(routeStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RouteStep Message String Route step with material inputs

DeleteAllOutputItems

The DeleteAllOutputItems method removes all material outputs for the product and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %Route.DeleteAllOutputItems(routeStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RouteStep Message String Route step with material outputs 5-126 Chapter 5

DeleteAllSetpointItems

The DeleteAllSetpointItems method removes all setpoints for the product and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %Route.DeleteAllSetpointItems(routeStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RouteStep Message String Route step with setpoints

DeleteInputItems

The DeleteInputItems method removes the specified material inputs and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %Route.DeleteInputItems(inputs, routeStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

inputs Object Object InStepInputItem(s) object, step inputs to delete RouteStep Message String Name of the route step Structural Objects 5-127

DeleteOutputItems

The DeleteOutputItems method removes the specified material outputs and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %Route.DeleteOutputItems(outputs, routeStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

outputs Object Object InStepOutputItem(s) object, step outputs to delete RouteStep Message String Name of the route step

DeleteRoutePaths

The DeleteRoutePaths method removes route step paths and saves the modified route to the InTrack database. The paths are specified in the Paths property of the RouteStep object. The route key property must be set before this method is called.

Syntax returnCode = %Route.DeleteRoutePaths(fromSteps); where:

Data Type Data Type Parameter (InTouch) (VB) Description

FromSteps Object Object RouteStep(s) object, route step(s) containing the path(s) to delete

DeleteRouteSteps

The DeleteRouteSteps method removes route steps and saves the modified route to the InTrack database. The route key property must be set before this method is called.

Syntax returnCode = %Route.DeleteRouteSteps(steps); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Steps Object Object RouteStep(s) object, route steps to delete 5-128 Chapter 5

DeleteSetpointItems

The DeleteSetpointItems method removes the specified setpoints and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %Route.DeleteSetpointItems(setpoints, routeStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Setpoints Object Object InStepSetpointItem(s) object, setpoints to delete RouteStep Message String Name of the route step

GetDispMaterialOutput

The GetDispMaterialOutput method returns information about the output material at a route step. The route key and material properties must be set before calling this method.

Syntax ReturnCode = %Route.GetDispMaterialOutput(step, disposition, destRoute, destRouteStep, destLocation, outputMaterial, quantity, uon, decQty, scaledQty); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Step Message String Route step name (input parameter) Disposition Message String Disposition code (input parameter) DestRoute Message String Destination route version key (output parameter) DestRotueStep Message String Destination route step (output parameter) DestLocation Message String Destination location (output paramter) OutputMaterial Message String Version key of the material output (output parameter) Quantity Real Double Quantity (output parameter) Uom Message String Unit of measure (output parameter) DecQty Discrete Boolean Decrement quantity flag (output parameter) ScaledQty Discrete Boolean Scale quantity flag (output parameter) Structural Objects 5-129

GetInfo

The GetInfo method returns information about the route. The route key and material properties must be set before calling this method.

Syntax ReturnCode = %Route.GetInfo(custSpec, initialStep, cycleTime, yield); where:

Data Type Data Type Parameter (InTouch) (VB) Description

custSpec Message String Customer specification (input parameter) InitialStep Message String Initial route step (output parameter) CycleTime Object Object InTimeInterval object, cycle time (output parameter) Yield Real Double Yield (output parameter)

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the Route object class.

Syntax ReturnCode = %Route.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the Route object class.

Syntax ReturnedUDAValue = %Route.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call 5-130 Chapter 5

Load

The Load method populates the read-only properties of the Route object with values read from the database. The route key property must be set before this method can be called. If the product material key is set, material inputs, outputs and/or setpoints will be loaded.

Syntax returnCode = %Route.Load();

SetDefaultDispositionCode

The SetDefaultDispositionCode method updates the default disposition code of a Route object and saves the changes to the InTrack database.

Syntax returnCode = %Route.SetDefaultDispositionCode(dispCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

dispCode Object Object InDispositionCode object or string, default disposition code for a route path

SetInitialRouteStep

The SetInitialRouteStep method updates the initial route step of a Route object and saves the changes to the InTrack database.

Syntax returnCode = %Route.SetInitialRouteStep(routeStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

RouteStep Object Object RouteStep object or string, first route step on the route Structural Objects 5-131

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of a Route object.

Syntax returnCode = %Route.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type 5-132 Chapter 5

RoutePath Object Class

The RoutePath object class (creation string of InTrack.RoutePath) provides an OLE automation object representation of a path between two steps in the InTrack route object.

Identification

Object Name: InRoutePath Interface Name: IInRoutePath InTouch Object Name: %RoutePath

Properties

The following table describes the properties of a RoutePath object.

Data Type Data Type Property (InTouch) (VB) Access Description

DestinationStep Object Object r/w RouteStep object, destination route step DispositionCode Object Object r/w InDispositionCode object, disposition code associated with this route path IsMainPath Discrete Boolean r/w Flag indicating if this path is the main exit from the source route step: –1 = is main exit 0 = is not main exit

Methods

No methods are associated with the RoutePath object class. Structural Objects 5-133

RoutePaths Object Class

The RoutePaths object class is a collection class used to group multiple RoutePath objects for processing together instead of individually.

Identification

Object Name: InRoutePaths Interface Name: IInRoutePaths InTouch Object Name: %RoutePaths

Property

The following table describes the property of a RoutePaths object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of RoutePath objects in the collection

Methods

This section describes the methods of the RoutePaths class.

Add

The Add method adds the RoutePath object(s) to the RoutePaths object, as specified by the argument in the method call.

Syntax returnCode = %RoutePaths.Add(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

items Object Object RoutePath object to be added to the collection 5-134 Chapter 5

Clear

The Clear method clears all RoutePath objects from the RoutePaths collection.

Syntax returnCode = %RoutePaths.Clear();

Item

The Item method locates the RoutePath object in a RoutePaths collection, as specified by the index in the method call.

Syntax %RoutePath = %RoutePaths.Item(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of RoutePath object to locate (1 ≤ Index ≤ Count)

Remove

The Remove method removes the RoutePath object from the RoutePaths collection, as specified by index or RoutePath object in the method call.

Syntax returnCode = %RoutePaths.Remove(index); returnCode = %RoutePaths.Remove(item); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of RoutePath object to locate (1 ≤ Index ≤ Count) item RoutePath RoutePath object to remove Structural Objects 5-135

RouteStep Object Class

The RouteStep object class (creation string of “InTrack.RouteStep”) provides an OLE automation representation of a route step in the InTrack route.

Identification

Object Name: InRouteStep Interface Name: IInRouteStep InTouch Object Name: %RouteStep

Properties

The following table describes the properties of a RouteStep object.

Data Type Data Type Property (InTouch) (VB) Access Description

Name Message String r/w Name of this route step (default property) Operation Object Object r Operation associated with this route step Inputs Object Object r StepInputItems object, material inputs associated with this route step Outputs Object Object r StepOutputItems object, material outputs associated with this route step Setpoints Object Object r StepSetpoints item, setpoints associated with this route step Paths Object Object r RoutePaths object, route paths associated with this route step ScrapCodes Object Object r DispositionCodes object, scrap disposition codes associated with this route step 5-136 Chapter 5

Methods

There are no methods for a RouteStep object. Although the route step object properties are indicated as read-only, a reference to the corresponding object can be obtained using dot notation (routeStp.ScrapCodes) and used to access member methods.

Example — Adding a Scrap Code to a Route Step For example, a scrap code can be added to the step’s collection by executing Visual Basic code similar to the following:

Dim scraps As InDispositionCodes Dim scrap As New InDispositionCode Dim routeStep as New RouteStep Dim returnCode as Integer

Scrap.DispositionCodeKey = “SCRAPPY” Set scraps = routeStep.ScrapCodes returnCode = %scraps.Add(scrap)

Example 2 — Assigning a Disposition Code to a Route Step A disposition code can be assigned to a route path from a route step by executing Visual Basic code similar to:

Dim exit As New InDispositionCode Dim routePath As New RoutePath

Exit.DispositionCodeKey = “GONE” Set routePath.DispositionCode = exit

ReturnCode = %routeStep.Paths.Add(routePath) Structural Objects 5-137

RouteSteps Object Class

The RouteSteps object class is a collection class used to group multiple RouteStep objects for processing together instead of individually.

Identification

Object Name: InRouteSteps Interface Name: IinRouteSteps InTouch Object Name: %RouteSteps

Properties

The following table describes the property of a RouteSteps object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of RouteStep objects in the collection

Methods

This section describes the methods of the RouteSteps class.

Add

The Add method adds the RouteStep object(s) to the RouteSteps collection, as specified by the argument in the method call.

Syntax returnCode = %RouteSteps.Add(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

items Object Object RouteStep object(s) to be added to the collection

Clear

The Clear method clears all RouteStep objects from the RouteSteps collection.

Syntax returnCode = %RouteSteps.Clear(); 5-138 Chapter 5

Item

The Item method locates the RouteStep object in a RouteSteps collection, as specified by the index or item name in the method call.

Syntax %RouteStep = %RouteSteps.Item(index); %RouteStep = %RouteSteps.Item(itemName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of RouteStep object to locate (1 ≤ Index ≤ Count) itemName Message String Name key identifying the RouteStep object to locate

Remove

The Remove method removes the RouteStep object from the RouteSteps collection, as specified by index, item name or RouteStep object in the method call.

Syntax returnCode = %RouteSteps.Remove(index); returnCode = %RouteSteps.Remove(itemName); returnCode = %RouteSteps.Remove(item); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of RouteStep object to locate (1 ≤ Index ≤ Count) itemName Message String Name key identifying the RouteStep object to remove Item Object Object RouteStep object to remove

Structural Objects 5-139

SecurityGroup Object Class

The SecurityGroup object class stores information about security groups used to provide user access to individual operations. The security group’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method. To process SecurityGroup objects as a collection, use the SecurityGroups object class.

Identification

Object Name: InSecurityGroup Interface Name: IInSecurityGroup InTouch Object Name: %SecurityGroup

Properties

The following table describes the properties of a SecurityGroup object.

Data Type Data Type Property (InTouch) (VB) Access Description

SecurityGroupKey Message String r/w Version key identifying the SecurityGroup object (default property) Description Message String r Text describing the security group Privileges Object Object r Privileges object containing privilege codes 5-140 Chapter 5

Methods

This section describes the methods of the SecurityGroup class.

AddPrivileges

The AddPrivileges method appends new Privilege items and saves the object to the database. The security group key property must be set before calling this method..

Syntax returnCode = %SecurityGroup_Object.AddPrivileges(%Privileges); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Privileges Object Object Privileges object to add

Create

The Create method creates a SecurityGroup object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create. .

Syntax returnCode = %SecurityGroup_Object.Create(Key, description, Privileges); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Key Message String Version key string identifying the security group Description Message String Security group description Privileges Object Object Privileges object to add

Delete

The Delete method removes a SecurityGroup object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %SecurityGroup_Object.Delete(); Structural Objects 5-141

DeletePrivileges

The DeletePrivileges method removes privileges and saves the modified security group to the InTrack database. The security group key property must be set before this method is called...

Syntax returnCode = %SecurityGroup_Object.DeletePrivileges(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Items Object Object Privileges objects to remove, or a comma- separated list of item names to remove

Load

The Load method populates the read-only properties of the SecurityGroup object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %SecurityGroup_Object.Load(); 5-142 Chapter 5

SecurityGroups Object Class

The SecurityGroups object class is a collection class used to group multiple SecurityGroup objects for processing together instead of individually.

Identification

Object Name: InSecurityGroups Interface Name: IInSecurityGroups InTouch Object Name: %SecurityGroups

Properties

The following table describes the property of a SecurityGroups object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of SecurityGroup objects in the collection

Methods

This section describes the methods of the SecurityGroups class.

Add

The Add method adds the SecurityGroup object(s) to the SecurityGroups collection, as specified by the argument in the method call.

Syntax returnCode = %SecurityGroups.Add(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

items Object Object SecurityGroup object(s) to be added to the collection Structural Objects 5-143

Clear

The Clear method clears all SecurityGroup objects from the SecurityGroups collection.

Syntax returnCode = %SecurityGroups.Clear();

Item

The Item method locates the SecurityGroup object in a SecurityGroups collection, as specified by the index or item name in the method call.

Syntax %SecurityGroup = %SecurityGroups.Item(index); %SecurityGroup = %SecurityGroups.Item(itemName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of SecurityGroup object to locate (1 ≤ Index ≤ Count) itemName Message String Name key identifying the SecurityGroup object to locate

Remove

The Remove method removes the SecurityGroup object from the SecurityGroups collection, as specified by index, item name or SecurityGroup object in the method call.

Syntax returnCode = %SecurityGroups.Remove(index); returnCode = %SecurityGroups.Remove(itemName); returnCode = %SecurityGroups.Remove(item); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of SecurityGroup object to locate (1 ≤ Index ≤ Count) itemName Message String Name key identifying the SecurityGroup object to remove Item Object Object SecurityGroup object to remove 5-144 Chapter 5

SetpointTemplate Object Class

The SetpointTemplate object class provides an OLE automation interface to retrieve information about a setpoint template from the InTrack database. An object of this class also enables you to define new setpoint templates (Create method). Individual items within the setpoint templates are managed by the SetpointItem object class and SetpointItems collection class. The setpoint template’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method. To process SetpointTemplate objects as a collection, use the SetpointTemplates object class.

Identification

Object Name: InSetpointTemplate Interface Name: IInSetpointTemplate InTouch Object Name: %SetpointTemplate

Properties

The following table describes the properties of a SetpointTemplate object.

Data Type Data Type Property (InTouch) (VB) Access Description

TemplateKey Message String r/w Version key identifying the SetpointTemplate object (default property) Description Message String r Text describing the setpoint template ParentTemplateKey Message String r Parent setpoint template version key SetpointItems Object Object r SetpointItems object containing the list of setpoint items Structural Objects 5-145

Methods

This section describes the methods of the SetpointTemplate class.

AddSetpointItems

The AddSetpointItems method appends new setpoint item(s) and saves the modified template to the database. The template key property must be set before calling this method..

Syntax returnCode = %SetpointTemplate_Object.AddSetpointItems(%SetpointItems); where:

Data Type Data Type Parameter (InTouch) (VB) Description

SetpointItems Object Object SetpointItem or SetpointItems (collection) to append to the template list of data items

AssociateParent

The AssociateParent method attaches this child setpoint template to another template and saves the modified template to the database. The template key property must be set before this method can be called..

Syntax returnCode = %SetpointTemplate_Object.AssociateParent(parentTemplate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

parentTemplate Object Object Setpoint template object or version key string identifying the parent template 5-146 Chapter 5

Create

The Create method creates a SetpointTemplate object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create. .

Syntax returnCode = %SetpointTemplate_Object.Create(templateKey, description, parentTemplate, SetpointItems); where:

Data Type Data Type Parameter (InTouch) (VB) Description

TemplateKey Message String Version key string identifying the setpoint template Description Message String Setpoint template description ParentTemplate Object Object SetpointTemplate object or version key string identifying the parent template SetpointItems Object Object A single SetpointItem or a collection of SetpointItem objects

Delete

The Delete method removes a SetpointTemplate object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %SetpointTemplate_Object.Delete();

DeleteSetpointItems

The DeleteSetpointItems method removes setpoint items and saves the modified setpoint template to the InTrack database. The template key property must be set before this method is called...

Syntax returnCode = %SetpointTemplate_Object.DeleteSetpointItems(items); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Items Object Object SetpointItem object(s) to remove, or a comma- separated list of item names to remove Structural Objects 5-147

DisassociateParent

The DisassociateParent method detaches the child setpoint template from another template and saves the modified template to the InTrack database. The template key property must be set before this method can be called..

Syntax returnCode = %SetpointTemplate_Object.DisassociateParent();

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the setpoint template object..

Syntax ReturnCode = %SetpointTemplate_Object.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 12 = Double real 5-148 Chapter 5

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of a setpoint template object. The udaValue is a VARIANT data type containing the returned UDA value. .

Syntax udaValue = %SetpointTemplate_Object.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

UdaValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call

Load

The Load method populates the read-only properties of the SetpointTemplate object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %SetpointTemplate_Object.Load();

SetUDA

The SetUDA method updates the value of a specified UDA of a SetpointTemplate object..

Syntax returnCode = %SetpointTemplate_Object.SetUDA(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value Structural Objects 5-149

SetpointTemplates Object Class

The SetpointTemplates object class is a collection class. It groups multiple SetpointTemplate objects for processing as a group instead of individually.

Identification

Object Name: InSetpointTemplates Interface Name: IInSetpointTemplates InTouch Object Name: %SetpointTemplates

Properties

The following table describes the property of a SetpointTemplates object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of SetpointTemplate objects in the SetpointTemplates object.

Methods

This section describes the methods of the SetpointTemplates class.

Add

The Add method adds a SetpointTemplate object(s) to a SetpointTemplates object. The SetpointTemplate object is specified through the %SetpointTemplate in the method call..

Syntax returnCode = %SetpointTemplates_Object.Add(%SetpointTemplate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

SetpointTemplate Object Object SetpointTemplate object(s) to add. 5-150 Chapter 5

Clear

The Clear method clears all SetpointTemplate objects from a SetpointTemplates object..

Syntax returnCode = %SetpointTemplates_Object.Clear();

Item

The Item method locates a SetpointTemplate object within a SetpointTemplates object. The SetpointTemplate object is specified by index or template key name in the method call..

Syntax %SetpointTemplate = %SetpointTemplates_Object.Item(index); %SetpointTemplate = %SetpointTemplates_Object.Item(templateKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of SetpointTemplate object to locate (1 ≤ index ≤ Count) TemplateKey Message String Version key identifying the SetpointTemplate object to locate.

Remove

The Remove method removes a SetpointTemplate object from a SetpointTemplates object. The SetpointTemplate object is specified by index, key, or SetpointTemplate object in the method call..

Syntax returnCode = %SetpointTemplates_Object.Remove(index); returnCode = %SetpointTemplates_Object.Remove(templateKey); returnCode = %SetpointTemplates_Object.Remove(template); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of SetpointTemplate object to remove (1 ≤ index ≤ Count) TemplateKey Message String Name identifying the SetpointTemplate object to remove. Template Object Object SetpointTemplate object to remove. Structural Objects 5-151

Table Object Class

The Table object class, along with the TableColumn and TableColumns classes, provides the ability to define and manage user tables. User-defined tables are created in ModelMaker using the User-Defined Table editor. When the User-Defined Table editor creates a new user table, it calls the UserDefined Table::Create Table method. When this call succeeds, it will create a DataSetDefinition with the name assigned for the new table (DataSetDefinition::SetName) and a version of “None” (DataSetDefinition::SetVersion) with a type set to “UDT” (DataSetDefinition::SetDataSetType). No data item rows are defined. This definition is saved the DSTemplate table so that the new table will appear in subsequent UDA queries. The Table object class (creation string of “InTrack.Table”) provides an OLE automation interface to user-defined table management functions, formerly available only through ModelMaker. A NameKey is used to identify a specific row in a user-defined table. In addition, row management functions enable the ability to save (insert or update), read or delete a row from the database using the OLE automation interface.

Note: Table management functions cannot be part of a transaction. Changes are automatically written to the database each time a method is invoked.

Identification

Object Name: InTable Interface Name: IInTable InTouch Object Name: %Table

Using the Table Object Class

The Table object class is designed to work efficiently with other InTrack functions. Note the following changes made to accommodate the object class: General Database User-defined tables follow the format of existing UDAs on InTrack tables. The UDT row in the DSTemplate table enables use of the ModelMaker UDT editor query. Stored Procedures (SQL Server Only) Like data collection tables, user-defined tables create a set of stored procedures when SQL Server is the RDBMS: UserTableName_I inserts a row into the table. UserTableName_S selects a row based on the primary key. UserTableName_E verifies that a primary key value exists. UserTableName_K updates the primary key value. UserTableName_D deletes a row from the table based on a primary key value.UserTableName_I inserts a row into the table. 5-152 Chapter 5

Migration InTrack will preserve all existing user-defined tables when migrating from a previous version. A new UDTBaseValues table will be created in the database to enable mapping to UDA tables created on older versions. ArchiveItem Class In order to archive data in user-defined tables using the OLE database object, the ArchiveItem Class ID property must be set to 20. The TableName property should be set to the user- defined table name. Archiving procedures for user-defined tables is similar to those used for data collection tables. Query.SQL The generic query method of the Query.SQL class operates with user-defined tables in the same manner as standard InTracktables.

Example 1 — Creating a User Table This example creates a User Defined Table called "MyTable" with a string column of “UserName” and an indexed integer column of “UserValue”.

OLE_CreateObject(%TableColumn, "InTrack.TableColumn"); OLE_CreateObject(%TableColumns, "InTrack.TableColumns"); OLE_CreateObject(%Table, "InTrack.Table");

%TableColumn.Name = “UserName” ; %TableColumn.DataType = 2; %TableColumn.StringWidth = 30; %TableColumn.IsIndexed = 0; %TableColumn.NullsAllowed = 0; returnCode = %TableColumns.Add(%TableColumn);

OLE_CreateObject(%TableColumn, "InTrack.TableColumn"); %TableColumn.Name = “UserValue” ; %TableColumn.DataType = 5; %TableColumn.IsIndexed = -1; %TableColumn.NullsAllowed = 0; returnCode = %TableColumns.Add(%TableColumn);

returnCode = %Table.Create("MyTable",%TableColumns);

Structural Objects 5-153

Example 2 — Saving Data in a Table Column

This example saves a string to column “UserName” and an integer to column “UserValue” in the User Defined Table named "MyTable".

OLE_CreateObject(%TableColumn, "InTrack.TableColumn"); OLE_CreateObject(%TableColumns, "InTrack.TableColumns"); OLE_CreateObject(%Table, "InTrack.Table"); %Table.Name = "MyTable"; returnCode = %Table.Load(); %TableColumn.Name = “UserName” ; %TableColumn.DataType = 2; %TableColumn.Value = "Jeff"; returnCode = %TableColumns.Add(%TableColumn);

OLE_CreateObject(%TableColumn, "InTrack.TableColumn"); %TableColumn.Name = “UserValue” ; %TableColumn.DataType = 5; %TableColumn.Value = 92618; returnCode = %TableColumns.Add(%TableColumn);

returnCode = %Table.SaveRow(“1”, %TableColumns, 1); {This adds a record with the Name column equal to the first parameter “1”.}

Note: The last parameter should always be set to 1 to commit the insert.

Properties

The following table describes the properties of a Table object.

Data Type Data Type Property (InTouch) (VB) Access Description

Name Message String r/w String identifying the table (default property) ColumnDefinition Object Object r A list of TableColumn objects that describes each non-primary key column in the table. 5-154 Chapter 5

Methods

This section describes the methods of the Table class. These methods are used to control the table as a whole

Create

The Create method adds a new user-defined table to the InTrack database.

Syntax returnCode = %Table_Object.Create(name, columns); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Name Message String Table name columns Object Object TableColumn(s) object

Delete

The Delete method removes a user-defined table from the InTrack database.

Syntax returnCode = %Table_Object.Delete();

Load

The Load method populates the properties of the Table object with values read from the database. The table name property must be set before this method can be called.

Syntax returnCode = %Table_Object.Load(); Structural Objects 5-155

Modify

The Modify method edits columns associated with a user-defined table. The table name property must be set before this method can be called. If the old and new table column count is the same, any changes made to the existing column definition will be reflected in the modifed table. If more columns are provided for the new table, the additional columns will be appended to the table in the order listed. If fewer columns are provided, the missing columns will be be deleted from the table.

Syntax returnCode = %Table_Object.Modify(columns); where:

Data Type Data Type Parameter (InTouch) (VB) Description

columns Object Object TableColumn(s) object 5-156 Chapter 5

Row Methods

In addition to the methods that operate on the table as a whole, the following methods deal with a row of data in the tables. The TableColumns object is used to represent a row of data, and each TableColumn object contains the actual data value for the row. In order to set or read the actual column data value, you must determine the data type for the column, then invoke the appropriate property for the data value.

DeleteRow

The DeleteRow method removes a row of data from the user-defined table. The row is identified by name.

Syntax returnCode = %Table_Object.DeleteRow(rowID, commit); where:

Data Type Data Type Parameter (InTouch) (VB) Description

rowID Message String NameKey of the row to delete commit Discrete Boolean Boolean value indicating whether to commit the row: –1 = commit changes 0 = do not commit

ReadRow

The ReadRow method reads a row of data from the user-defined table into the TableColumns object. The row is identified by name.

Syntax returnCode = %Table_Object.ReadRow(rowID, columns); where:

Data Type Data Type Parameter (InTouch) (VB) Description

rowID Message String NameKey of the row to read columns Object Object Table Columns object, columns with actual row data Structural Objects 5-157

SaveRow

The SaveRow method writes a row of data into the user-defined table from the TableColumns object. The row is identified by name. If the row does not exist, it is inserted into the table. If the row exists, it is updated with new data values.

Syntax returnCode = %Table_Object.SaveRow(rowID, columns, commit) where:

Data Type Data Type Parameter (InTouch) (VB) Description

rowID Message String NameKey of the row to insert/update columns Object Object TableColumns object, columns with actual row data commit Discrete Boolean Boolean value indicating whether to commit the row: –1 = commit changes 0 = do not commit 5-158 Chapter 5

TableColumn Object Class

The TableColumn object class (creation string of “InTrack.TableColumn”) provides an OLE automation interface to columns in user-defined tables (identified by the Table object class). It is called directly from the Table object class.

Note: Table management functions cannot be part of a transaction.

Identification

Object Name: InTableColumn Interface Name: IinTableColumn InTouch Object Name: %TableColumn

Properties

The following table describes the properties of a TableColumn object.

Data Type Data Type Property (InTouch) (VB) Access Description

DataType Integer Short r/w Data type of this column, where: 1 = real 2 = message/string 3 = discrete/boolean 4 = date 5 = long integer 7 = date and time of day 8 = time of day 9 = time interval 12 = double Description Message String r/w Description of this column IsIndexed Discrete Boolean r/w Boolean value indicating if the column: –1 = is indexed 0 = is not indexed Label Message `String r/w An optional label for the column Name Message String r/w Column name NullsAllowed Discrete Boolean r/w Boolean value indicating if nulls are: –1 = allowed 0 = not allowed StringWidth Integer Long r/w Maximum column width (up to 255) Value var VARIANT r/w Column value corresponding to the data type. Structural Objects 5-159

Methods

No methods exist for the TableColumn object class. Refer to the row methods for the Table object class. 5-160 Chapter 5

TableColumns Object Class

The TableColumns object class is a collection class. It groups multiple TableColumn objects for processing as a group instead of single entries.

Identification

Object Name: InTableColumns Interface Name: IInTableColumns InTouch Object Name: %TableColumns

Properties

The following table describes the property of a TableColumns object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of TableColumn objects in the TableColumns object.

Methods

This section describes the methods of the TableColumns class.

Add

The Add method adds a TableColumn object(s) to a TableColumns object. The TableColumn object is specified through the %TableColumn in the method call.

Syntax returnCode = %TableColumns_Object.Add(TableColumn); where:

Data Type Data Type Parameter (InTouch) (VB) Description

TableColumn Object Object TableColumn(s) object to add.

Clear

The Clear method clears all TableColumn objects from a TableColumns object.

Syntax returnCode = %TableColumns_Object.Clear(); Structural Objects 5-161

Item

The Item method locates a TableColumn object within a TableColumns object. The TableColumn object is specified by index or column name in the method call.

Syntax %TableColumn_Object = %TableColumns_Object.Item(index); %TableColumn_Object = %TableColumns_Object.Item(columnName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of TableColumn object to locate (1 ≤ index ≤ Count) columnName Message String Name identifying the TableColumn object to locate.

Remove

The Remove method removes a TableColumn object from a TableColumns object. The TableColumn object is specified by index, columnName, or %TableColumn object in the method call.

Syntax returnCode = %TableColumns_Object.Remove(index); returnCode = %TableColumns_Object.Remove(columnName); returnCode = %TableColumns_Object.Remove(inTableColumn); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of TableColumn object to remove (1 ≤ index ≤ Count) columnName Message String Name identifying the TableColumn object to remove. TableColumn Object Object TableColumn(s) object to remove. 5-162 Chapter 5

User Object Class

The User class records when an operator clocks in and clocks out and identifies whether a user has the proper certification to perform a specified operation.

Identification

Object Name: InUser Interface Name: IinUser InTouch Object Name: %User

Property

The following table describes the properties of a User object.

Data Type Data Type Property (InTouch) (VB) Access Description

UserKey Message String r/w NameKey identifying the name of a user defined in ModelMaker Certifications Object Object r UserCertification object(s) assigned to this user CommonName Message String r Common name used to identify the user SecurityGroups Object Object r SecurityGroups collection object of security groups assigned to the user Privileges Object Object r Privileges object(s) assigned to the user Structural Objects 5-163

Methods

This section describes the methods of a User object.

ChangePassword

The ChangePassword method allows the currently logged on user to change their password. The current password must be the same as the user’s password, and the verification password must be the same as the new password.

Syntax returnCode = %User_Object.ChangePassword(currentPassword,newPassword, verifyPassword); where:

Data Type Data Type Parameter (InTouch) (VB) Description

currentPassword Message String Password that user logged in with newPassword Message String Password that user wants to change to verifyPassword Message String Copy of the new password 5-164 Chapter 5

ClockIn

The ClockIn method identifies the time an operator clocks in.

Syntax returnCode = %User_Object.ClockIn();

ClockOut

The ClockOut method identifies the time an operator clocks out.

Syntax returnCode = %User_Object.ClockOut();

Create

The Create method creates a User object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create. .

Syntax returnCode = %User_Object.Create(Key, password, commonName, securityGroups, certifications); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Key Message String Version key string identifying the user Password Message String User password CommonName Message String Name commonly used to identify the user SecurityGroups Object Object SecurityGroups object or version key string identifying the security groups Certifications Object Object UserCertification object, UserCertifications collection, or string

Delete

The Delete method removes a User object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %User_Object.Delete(); Structural Objects 5-165

GetQualificationStatus

The GetQualificationStatus method identifies whether a user is qualified to perform a specified operation.

Syntax returnCode = %User_Object.GetQualificationStatus(operation, qualificationStatus); where:

Data Type Data Type Parameter (InTouch) (VB) Description

operation Message String VersionKey identifying the operation for which to check user’s qualification status qualificationStatus Integer Long Returned constant identifying whether the user is certified for this operation where: 0 = USER_QUALIFIED 1 = USER_UNQUALIFIED 2 = USER_FORMERLY_QUALIFIED

GrantPrivileges

The GrantPrivileges method appends new Privileges object(s) to the user record and saves the modified record to the database. Granting privileges gives the user the access rights assigned in the Privileges object. The user key property must be set before calling this method..

Syntax returnCode = %User_Object.GrantPrivileges(%Privileges); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Privileges Object Object Privileges collection or string to assign to the user

Load

The Load method populates the properties of the User object with values read from the database. The user name property must be set before this method can be called.

Syntax returnCode = %User_Object.Load(); 5-166 Chapter 5

RevokePrivileges

The RevokePrivileges method removes selected Privileges object(s) from the user record and saves the modified record to the database. Revoking privileges removes the user’s access rights assigned in the Privileges object. The user key property must be set before calling this method..

Syntax returnCode = %User_Object.RevokePrivileges(%Privileges); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Privileges Object Object Privileges collection or string to be revoked Structural Objects 5-167

UserCertification Object Class

The UserCertification object class stores information about user certifications used to grant authority to perform InTrack operations. An object of this class also enables you to define new user certifications (Create method). The user certification’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method. To process UserCertification objects as a collection, use the UserCertifications object class.

Identification

Object Name: InUserCertification Interface Name: IInUserCertification InTouch Object Name: %UserCertification

Properties

The following table describes the properties of a UserCertification object.

Data Type Data Type Property (InTouch) (VB) Access Description

CertificationKey Message String r/w Version key identifying the UserCertification object (default property) Description Message String r Text describing the user certification ExpirationInterval Object Object r TimeInterval object, amount of time certification is valid WhenIssued Object Object r DateTime object, date when certification is valid 5-168 Chapter 5

Methods

This section describes the methods of the UserCertification class.

Create

The Create method creates a UserCertification object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create. .

Syntax returnCode = %UserCertification_Object.Create(certification, description, ExpirationInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Certification Message String Version key string identifying the user certification Description Message String User certification description ExpirationInterval Object Object TimeInterval object, duration of valid certification

Delete

The Delete method removes a UserCertification object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %UserCertification_Object.Delete(); Structural Objects 5-169

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the user certification object..

Syntax ReturnCode = %UserCertification_Object.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 12 = Double real

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of a user certification object. The udaValue is a VARIANT data type containing the returned UDA value..

Syntax udaValue = %UserCertification_Object.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

UdaValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status from the method call 5-170 Chapter 5

Load

The Load method populates the read-only properties of the UserCertification object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %UserCertification_Object.Load();

SetUDA

The SetUDA method updates the value of a specified UDA of a UserCertification object..

Syntax returnCode = %UserCertification_Object.SetUDA(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value

SetWhenIssued

The SetWhenIssued method sets the date of issue of the UserCertification object. .

Syntax returnCode = %UserCertification_Object.SetWhenIssued(issueDate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

IssueDate Object Object DateTime object, date of issue of user certification Structural Objects 5-171

UserCertifications Object Class

The UserCertifications object class is a collection class. It groups multiple UserCertification objects for processing as a group instead of individually.

Identification

Object Name: InUserCertifications Interface Name: IInUserCertifications InTouch Object Name: %UserCertifications

Properties

The following table describes the property of a UserCertifications object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of UserCertification objects in the UserCertifications object.

Methods

This section describes the methods of the UserCertifications class.

Add

The Add method adds a UserCertification object(s) to a UserCertifications object. The UserCertification object is specified through the %UserCertification in the method call..

Syntax returnCode = %UserCertifications_Object.Add(%UserCertification); where:

Data Type Data Type Parameter (InTouch) (VB) Description

UserCertification Object Object UserCertification object(s) to add. 5-172 Chapter 5

Clear

The Clear method clears all UserCertification objects from a UserCertifications object..

Syntax returnCode = %UserCertifications_Object.Clear();

Item

The Item method locates a UserCertification object within a UserCertifications object. The UserCertification object is specified by index or template key name in the method call..

Syntax %UserCertification = %UserCertifications_Object.Item(index); %UserCertification = %UserCertifications_Object.Item(itemKey); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of UserCertification object to locate (1 ≤ index ≤ Count) ItemKey Message String Version key identifying the UserCertification object to locate.

Remove

The Remove method removes a UserCertification object from a UserCertifications object. The UserCertification object is specified by index, key, or UserCertification object in the method call..

Syntax returnCode = %UserCertifications_Object.Remove(index); returnCode = %UserCertifications_Object.Remove(itemKey); returnCode = %UserCertifications_Object.Remove(item); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of UserCertification object to remove (1 ≤ index ≤ Count) ItemKey Message String Name identifying the UserCertification object to remove. Item Object Object UserCertification object to remove. Structural Objects 5-173

WorkInstructions Object Class

The WorkInstructions class creates a database structural object for work instructions. This functionality is parallel to creating a work instructions object in the Work Instructions editor in ModelMaker. Another method lets you return information for a work instructions object from the database. Among the returned information is the file name of the work instructions, which is returned in the FileName property. The FileName property is a read-only property viewable with script after calling the Load method, which populates all the read-only properties. Every time the WorkInstructionsKey is set to identify a new set of work instructions, you must call the Load method to reset the FileName property. The actual work instructions can be viewed by passing the file name returned in the FileName property of a WorkInstructions object into the FileName property of a Dialog.Instruct object.

Note: For internal work instructions, it is recommended that, as part of the application system test, you verify that the information is displayed in viewable form in the runtime dialog.

To process WorkInstructions objects as a collection, use the WorkInstructionsList object class.

Identification

Object Name: InWorkInstructions Interface Name: IInWorkInstructions InTouch Object Name: %WorkInstructions

5-174 Chapter 5

Properties

The following table describes the properties of a WorkInstructions object.

Data Type Data Type Property (InTouch) (VB) Access Description

WorkInstructionsKey Message String r/w String identifying the WorkInstructions object (default property) Description Message String r Description Label Message String r Label TimeLastChanged Object Object r DateTime object, last date and time work instructions object was changed DaysToNotify Integer Long r Number of days to notify an operator that this work instruction has changed IsInternal Discrete Boolean r Boolean value indicating that work instructions are: TRUE = internal FALSE = linked or embedded FileName Message String r If the work instructions are linked (IsInternal = FALSE), the actual file name and path of linked instructions. If the work instructions are embedded, the actual file name and temporary path containing the work instructions. For example, “c:\temp\filename.doc” for an embedded file, or a temporary file name and path for internal work instructions (IsInternal = TRUE), such as “c:\temp\itr9.txt.” Structural Objects 5-175

Methods

This section describes the methods of the WorkInstructions class. The standard methods provide all the functions necessary to insert, update and delete InTrack objects from the database. The first time Create is called, an initial version of the object is inserted into the database. After Load is called (and edits performed), a second call to Create saves an updated version of the objecct. Note that it is not necessary to call Delete before calling a second Create for the same object.

Create

The Create method creates a WorkInstruction object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Note: The maximum text length for work instructions stored internally is 60,000 bytes. For internal work instructions, verification that work instructions can be displayed in runtime is recommended.

Syntax returnCode = %WorkInstructions.Create (Key, Description, LastChanged, DaysToNotify, InternalFlag, Text, Label); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Key Message String Object key Description Message String Description LastChanged Object Object InDateTime object, last date and time this work instruction was changed DaysToNotify Object Object InTimeInterval object, number of days to notify an operator that this work instruction has been changed. InternalFlag Discrete Boolean TRUE if the work instructions are internal. FALSE if the work instructions are linked or embedded. Text Message String Work instruction text, if internal. File name and path if external and linked. File name and path prefaced with an “[EMBED]” string if work instructions are to be embedded. For example, “[EMBED]c:\folder\filename.doc”. Label Message String Label 5-176 Chapter 5

Example — Creating a WorkInstructions Object The following script creates a WorkInstructions object and adds it to the InTrack database. 1. Create a WorkInstructions object. OLE_CreateObject(%WorkInstructions_Object, "InTrack.WorkInstructions"); 2. Add a new work instructions object to the InTrack database. returnCode = %WorkInstructions_Object.Create("newWorkInst", "description for newWorkInst", %LastChanged, %DaysToNotify, -1, "repair procedure", "Label");

Delete

The Delete method removes a WorkInstructions object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %WorkInstructions.Delete();

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the WorkInstructions object class.

Syntax returnCode = %WorkInstructions.GetUDAType(udaName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaType Integer Long Returned value identifying the UDA data type Structural Objects 5-177

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the WorkInstructions object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %WorkInstructions.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA value udaName Message String Name of the UDA returnCode Integer Long Returned status of the method call

Load

The Load method populates the properties of the WorkInstructions object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %WorkInstructions.Load();

Example — Using the Load Method The following script sets the read-only properties of a WorkInstructions object (%WorkInstructions_Object) with the Load method. This example sets the WorkInstructionsKey of a WorkInstructions object to the work instructions file for which to load property information. Script demonstrating how to view a loaded property also is shown. 1. Set the WorkInstructionsKey. %WorkInstructions_Object.WorkInstructionsKey = “WorkInstructions[1]”; 2. Call the Load method. returnCode = %WorkInstructions_Object.Load(); 3. View a property. returnedFileName = %WorkInstructions_Object.FileName; 5-178 Chapter 5

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of a WorkInstructions object.

Syntax returnCode = %WorkInstructions.SetUDAValue(udaName, udaValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String Name of the UDA udaValue var VARIANT New UDA value of the data type corresponding to the UDA data type Structural Objects 5-179

WorkInstructionsList Object Class

The WorkInstructionsList class is a collection class. It groups multiple WorkInstructions objects for processing as a collection instead of as single entities.

Identification

Object Name: InWorkInstructionsList Interface Name: IInWorkInstructionsList InTouch Object Name: %WorkInstructionsList

Property

The following table describes the property of a WorkInstructionsList object.

Data Type Data Type Property (InTouch) (VB) Access Description

Count Integer Long r Number of WorkInstructions objects in the collection.

Methods

This section describes the methods of the WorkInstructionsList class.

Add

The Add method adds the WorksInstructions object(s) to the WorkInstructionsList object, as specified by the argument in the method call.

Syntax returnCode = %WorkInstructionsList.Add(WorkInstructions); where:

Data Type Data Type Parameter (InTouch) (VB) Description

WorkInstructions Object Object WorkInstructions object(s) to add to the collection 5-180 Chapter 5

Clear

The Clear method clears all WorkInstructions objects from the WorkInstructionsList collection.

Syntax returnCode = %WorkInstructionsList.Clear();

Item

TheItem method locates the WorkInstructions object in a WorkInstructionsList collection. The WorkInstructions object is specified by the index or key name in the call method.

Syntax WorkInstructions = WorkInstructionsList.Item(index); WorkInstructions – WorkInstructionsList.Item(key): where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of WorkInstructions object to locate (1 ≤ index ≤ Count) Key Message String Name identifying the Work-Instructions object to locate

Remove

The Remove method removes WorkInstructions object from the WorkInstructionsList collection, as specified by index, key or WorkInstructions object in the method call.

Syntax returnCode = %WorkInstructionsList.Remove(index); returnCode = %WorkInstructionsList.Remove(key); returnCode = %WorkInstructionsList.Remove(WorkInstructions); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Index Integer Long List position of WorkInstructions object to remove (1 ≤ index ≤ Count) Key Message String Name identifying the Work-Instructions object to remove WorkInstructions Object Object WorkInstructions object to remove 6-1

CHAPTER 6

Activity Objects

The Activity object category comprises Lot, Sublot, and DataSetSample classes. Each of these object classes plays a role in material processing. The Sublot class has methods that move a material along the route. The Lot class provides a summary of all sublot-level activities. The DataSetSample class supports data collection during the manufacturing process. Lot and Sublot objects have object keys that must be set before methods are called. A Sublot object uses the SublotKey to identify material to be used in material transactions. A Lot object uses the LotKey to set the lot name. After the object key has been set, the Load method can be used to populate the object’s read-only properties for viewing with script. Note that, in most situations, you also can use the initialize sample operation instead of using the Load method.

Contents

InTrack Object Class Constants, 2 DataSetSample Object Class, 3 Lot Object Class, 25 Sublot Object Class, 37

6-2 Chapter 6

InTrack Object Class Constants

Throughout this chapter you may need to reference the InTrack Object Class Constants. The following provides a quick-reference to help you write scripts: 1 Calendar CALENDAR_CLASS 2 CustomerSpecifications CUSTOMER_SPECIFICATION_CLASS 3 DatasetTemplate DATASET_TEMPLATE_CLASS 4 DispositionCode DISPOSITION_CODE_CLASS 5 Location LOCATION_CLASS 6 Lot LOT_CLASS 7 Machine MACHINE_CLASS 8 MachineStatus MACHINE_STATUS_CLASS 9 MachineType MACHINE_TYPE_CLASS 10 Material MATERIAL_CLASS 11 Operation OPERATION_CLASS 12 Route ROUTE_CLASS 13 SecurityGroup SECURITY_GROUP_CLASS 14 Serial# SERIAL_NUMBER_CLASS 15 Sublot SUBLOT_CLASS 16 User USER_CLASS 17 Certification USER_CERTIFICATION_CLASS 18 WorkInstruction WORK_INSTRUCTION_CLASS 25 SetpointTemplate SETPOINT_TEMPLATE_CLASS 27 Classification CLASSIFICATION_CLASS 28 ClassificationItem CLASSIFICATION_ITEM_CLASS Activity Objects 6-3

DataSetSample Object Class

The DataSetSample class supports engineering or process quality data collection for a sublot or a machine at runtime.

Note: Before using a DataSetSample object , you must define a dataset template and associate data collection with specific operations or machines, respectively. This can be performed through ModelMaker or with an automation interface.

Identification

Object Name: InDataSetSample Interface Name: IInDataSetSample InTouch Object Name: %DataSetSample

For more information on setting up data collection, see the ModelMaker User's Guide. The DataSetSample class uses a dataset template to identify the number of samples and types of data to collect at runtime. A dataset template also classifies a sampling plan as fixed or variable, which determines which properties of a DataSetSample object are set. The properties of a DataSetSample object include: SampleName, Sublot, AtRoute, AtRouteStep, DataSetTemplate, Machine Name, Machine Location, and CollectTime. The SampleName property identifies the name of a collected sample. You must set the SampleName property for a fixed sampling plan. If data collection is specific to a sublot, a machine, or generic, use Query.LotDataSetSample, Query.MachineDataSetSample objects, or the Query.DataSetSample object, to obtain data sample names. The Sublot property identifies the specific sublot to sample. To perform data collection for a specific sublot, set the Sublot property and use the Lot methods, LoadLotSample, SaveLotSample and, SupersedeLotSample. To perform generic data collection, leave the Sublot property blank and use the non-Lot methods, LoadSample, SaveSample, and SupersedeSample. Usually data is collected on the route at the route step specified by the Sublot property. However, by setting the AtRoute and AtRouteStep properties, data can be recorded at any step to satisfy data collection requirements—whether the sublot is at that step or not. Two examples of this use are QA sampling and laboratory data collection. To successfully collect data in this manner, both the AtRoute and AtRouteStep properties must be set. The DataSetTemplate property identifies the dataset template to use for data collection. Set the DataSetTemplate property with the InitializeSample method. InitializeSample must be called each time the dataset template changes. To retrieve dataset template names associated with a sublot or a machine, use a Query.LotDataSet class or Query.MachineDataSet object. The MachineName and MachineLocation properties identify the machine with which the data sample is associated. When working with machine data using the LoadMachineSample, SaveMachineSample, or SupersedeMachineSample methods, these two properties must be set before calling the method. If sublot data collection is performed, these properties provide additional information about which machine is processing the sublot when data is collected 6-4 Chapter 6

The CollectTime property differentiates one data sample from another. Set the CollectTime property by calling either LoadSample for generic data collection, LoadLotSample for data collection associated with a specific sublot, or LoadMachineSample for data collection associated with a specific machine. The Load methods load previously collected runtime data samples from a data collection table to a DataSetSample object for use. Each Load method contains a parameter for the time stamp of the collected data sample using a DateTime object. This collection time stamp is the key that points to a specific sample and sets the CollectTime property when a Load method is called. You must have the collection time stamp objects before calling a Load method. If data collection is specific to a sublot, a machine, or generic, use Query.LotDataSetTimeStamp, Query.MachineDataSetTimeStamp, or the Query.DataSetTimeStamp class, to obtain data sample collection times.

Note: When you use Query objects to obtain sample names and sample collection times, the sample name index corresponds to the time stamp index, so the first sample name will correspond to the first time stamp, and so forth.

After you have loaded a data sample with the appropriate Load method, you can update the data sample's data items as a group or one at a time. To update the data items as a group, use the TransferFromTagList method. TransferFromTagList transfers all the values from an existing TagList to a DataSetSample object for use. To update the data items one at a time, use the SetItem method with the GetItemType and GetItemValue methods. The Get and Set methods contain a parameter for a data item name. You must have the data item name before calling these methods. To retrieve the data item names in a dataset template, use a Query.DataSetItem object. The updated data samples can be saved to a TagList or to a data collection table. To save updated data samples to a TagList, use the TransferToTagList method. To save updated data samples to a data collection table, use the Save and Supersede methods. DataSetSample objects have three Save methods and three Supersede methods: for data collection associated with a specific sublot (SaveLotSample, SupersedeLotSample), for data collection associated with a specific machine (SaveMachineSample, SupersedeMachineSample), and for generic data collection (LoadSample, SupersedeSample). The Save methods save updated data sample information to a data collection table. The Supersede methods save the updated data sample to a data collection table and also mark the original record with a supersede flag. This flag allows you to filter original and updated data sample records. Identify the record to mark as superseded with the data sample’s original collection time stamp. Each Supersede method has a parameter for the original data sample collection time stamp using a DateTime class. You must have the collection time stamp objects before calling either Supersede method. For data collection is for a specific sublot, machine, or generic, use Query.LotDataSetTimeStamp, Query.MachineDataSetTimeStamp, or the Query.DataSetTimeStamp objects to obtain data sample collection times. Activity Objects 6-5

To use a DataSetSample object: 1. Create a DataSetSample object.

Note: You can set the SampleName and Sublot, MachineName, or MachineLocation properties in any order, as long as each applicable property is set before you call the appropriate Load method, which sets the CollectTime property.

2. Indicate the dataset template to use. When loading an existing sample, set the DataSetTemplate property. When saving a new sample, call the InitializeSample method. To obtain dataset template names associated with a sublot, use Query.LotDataSet. To obtain dataset template names associated with a machine, use Query.MachineDataSet. 3. Set the SampleName property (optional for variable sampling plan): To obtain sample names associated with a sublot, use Query.LotDataSetSample. To obtain sample names not associated with a sublot, use Query.DataSetSample. To obtain sample names associated with a machine, use Query.MachineDataSetSample. 4. Set the property for which to obtain a data sample: If the data sample is associated with a specific sublot (for example, if you are using the LoadLotSample, SaveLotSample, or SupersedeLotSample method), set the Sublot property to the sublot for which to obtain a data sample. The AtRoute and AtRouteStep properties are used when the sublot is at a different route and step than desired. If the data sample is associated with a specific machine (for example, if you are using a LoadMachineSample, SaveMachineSample, or SupersedeMachineSample method), set the MachineName or MachineLocation property to reflect the machine for which to obtain a data sample. 5. Obtain a DateTime object to pass into the %CollectTime parameter of the Load method in step 6. This step is required when superseding a sample. To obtain a data sample collection time for a data sample associated with a sublot, use Query.LotDataSetTimeStamp. To update a data sample collection time for a data sample not associated with a sublot, use Query.DataSetTimeStamp. To obtain a data sample collection time for a data sample associated with a machine, use Query.MachineDataSetTimeStamp. 6. Load the data sample to manipulate. This step is required when superseding a sample. To load a data sample associated with a sublot, call the LoadLotSample method. To load a data sample not associated with a sublot call the LoadSample method. To load a data sample associated with a machine, call the LoadMachineSample method. 7. Before calling the GetItemType, GetItemValue or SetItem methods in step 8, use Query.DataSetItem to retrieve the appropriate data item names for the itemName parameter of the method call. 6-6 Chapter 6

8. Update the data items in the data sample by doing one of the following: To update individual data items, one at a time, use the following methods a. To get a data item type, call the GetItemType method. b. To get a data item value, use the GetItemValue method. c. To update a data item value, use the SetItem method. To update all applicable data items at one time with values from a TagList, call the TransferFromTagList method (available in InTouch only). 9. Save the updated data sample by doing one of the following: Save the updated data sample to a data collection table. To save a data sample not associated with a sublot, call the SaveSample method. To save a data sample not associated with a sublot and mark the previous data sample record with a supersede time stamp, call the SupersedeSample method. To save a data sample associated with a sublot, call the SaveLotSample method. To save a data sample associated with a sublot and mark the previous data sample record with a supersede time stamp, call the SupersedeLotSample method. To save a data sample associated with a machine, call the SaveMachineSample method. To save a data sample associated with a machine and mark the previous data sample record with a supersede time stamp, call the SupersedeMachineSample method. Save the updated data samples to a TagList, call the TransferToTagList method (available in InTouch only). Activity Objects 6-7

Properties

The following table describes the properties of a DataSetSample object.

Data Type Data Type Property (InTouch) (VB) Access Description

SampleName Message String r/w NameKey identifying the collected sample—if not specified for a variable sampling plan, a name will be generated automatically Sublot Message String r/w SublotKey identifying the sublot to sample (LoadLotSample, SaveLotSample, and SupersedeLotSample methods only) DataSetTemplate Message String r/w VersionKey identifying the dataset template containing the data sample MachineName Message String r/w NameKey identifying the machine for which data is being collected MachineLocation Message String r/w NameKey identifying the location of the machine for which data is being collected AtRoute Message String r/w VersionKey identifying the route on which to record data collection (SaveLotSample and SupersedeLotSample only) AtRouteStep Message String r/w NameKey identifying the route step at which to record data collection (SaveLotSample and SupersedeLotSample only) HoldFlag Discrete Boolean r Boolean value indicating that the sublot was put on hold after data collection: –1 = on hold 0 = not on hold CollectTime Object Object r DateTime object, used as key for sample collection time 6-8 Chapter 6

Methods

This section describes the methods of a DataSetSample object.

GetItem

The GetItem method returns the value of a specified data item. You can update the returned data item value with the SetItem method.

Important: This method cannot be used in InTouch. Use the GetItemValue method in conjunction with the GetItemType method instead.

Syntax returnCode = %DataSetSample_Object.GetItem(itemName, returnedItemValue); where:

Data Type Data Type Parameter (InTouch) (VB) Description

itemName Message String Name of the data item for which to return the value ReturnedItemValue var VARIANT Returned value of data item, which can be one of the following data types: Discrete Boolean, Integer, Integer with Limits, Real, Real with Limits, Message String, Message String Selection, Object Date, Object DateTime, Object Time, Object TimeInterval

Tip: The Query.DataSetItem object retrieves the data item names for a dataset template. Activity Objects 6-9

GetItemType

The GetItemType method returns the data type of a specified data item. You can update the returned data item value with the SetItem method.

Tip: A Query.DataSetItem object retrieves the data item names for a dataset template.

Syntax returnCode = %DataSetSample_Object.GetItemType(itemName, type); where:

Data Type Data Type Parameter (InTouch) (VB) Description

itemName Message String Name of the sample item for which to get the data type: 1 = String 3 = Integer 4 = Real 5 = Double 6 = Date 7 = Time 8 = DateTime 9 = TimeInterval 10 = Discrete type Integer Long Returned value identifying the data type 6-10 Chapter 6

GetItemValue

The GetItemValue method returns the value of a specified data item. You can update the returned data item value with the SetItem method.

Tip: A Query.DataSetItem object retrieves the data item names for a dataset template.

Syntax returnedItemValue = %DataSetSample_Object.GetItemValue(itemName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

itemName Message String Name of the data item for which to return the value returnCode Integer Long Return code

Note: returnedItemValue must be defined as one of the following data types: Discrete Boolean, Integer, Integer with Limits, Real, Real with Limits, Message String, Message String Selection, Object Date, Object DateTime, Object Time, Object TimeInterval. Activity Objects 6-11

InitializeSample

The InitializeSample method sets the DataSetTemplate property of a DataSetSample object. InitializeSample identifies the dataset template used for data collection and must be called each time a new dataset template is used.

To use the InitializeSample method: 1. Create a DataSetSample object. 2. Call the InitializeSample method to set the DataSetTemplate property.

Syntax returnCode = %DataSetSample_Object.InitializeSample(dataSetTemplate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

dataSetTemplate Message String VersionKey identifying a specific dataset template

LoadLotSample

The LoadLotSample method loads a sublot’s collected runtime data samples from its collection table to a DataSetSample object and sets the CollectTime. The data collection time parameter (DateTime object) serves as a key to differentiate one data sample from another. You must have a data sample collection time before calling LoadLotSample.

Note: If a sample is not found that meets the sample name (if applicable) and collection time criteria, InTrack loads default values defined in ModelMaker.

To use the LoadLotSample method: 1. Create a DataSetSample object. 2. Set the DataSetTemplate property or call the InitializeSample method. 3. Set the SampleName property. 4. Set the Sublot property to the sublot for which to obtain samples. Optionally, set the AtRoute and AtRouteStep properties to the original route and step of the sample to load. 5. Obtain a DateTime object to pass into the %CollectTime parameter of the Load method call.

Note: A Query.LotDataSetTimeStamp object retrieves a DateTime object for each data sample collection time.

6. Call the LoadLotSample method to load the data sample to manipulate. 7. Update the data items in the data sample. 8. Save the updated data sample. 6-12 Chapter 6

Syntax returnCode = %DataSetSample_Object.LoadLotSample(%CollectTime,sampleFound); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%CollectTime Object Object DateTime object, time sample was collected sampleFound Discrete Boolean Returned Boolean value indicating the sample was: –1 = found and sample values loaded 0 = not found and default values loaded

LoadMachineSample

The LoadMachineSample method loads a machine’s runtime data samples from its collection table to a DataSetSample object and sets the CollectTime property. The data collection time (DateTime object) is the key that differentiates one data sample from another. You must have the data collection time before calling LoadMachineSample.

Note: If a sample is not found that meets the sample name (if applicable) and collection time criteria, InTrack loads default values defined in ModelMaker.

To use the LoadMachineSample method: 1. Create a DataSetSample object. 2. Set the DataSetTemplate property or call the InitializeSample method. 3. Set the SampleName property. 4. Set the MachineName and MachineLocation property to reflect the machine for which to obtain samples. If the location was not used originally, use “NONE” as the MachineLocation property value. 5. Obtain a DateTime object to pass into the %CollectTime parameter of the method call.

Note: A Query.MachineDataSetTimeStamp object retrieves DateTime object for each data sample collection time.

6. Call the LoadMachineSample method to load the data sample to manipulate. 7. Update the data items in the data sample. 8. Save the updated data sample. Activity Objects 6-13

Syntax returnCode = %DataSetSample_Object.LoadMachineSample(%CollectTime, sampleFound); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%CollectTime Object Object DateTime object, time data sample was collected sampleFound Discrete Boolean Returned value identifying the sample as: –1 = found and sample values loaded 0 = not found and default values loaded

Example The following script loads a previously collected sample for a machine. 1. Create a DataSetSample object. OLE_CreateObject(%DataSetSample, "InTrack.DataSetSample"); 2. Set the DataSetTemplate property. %DataSetSample.DataSetTemplate = "template[1]"; 3. Set the SampleName and MachineName properties. %DataSetSample.SampleName = “sample1”; %DataSetSample.MachineName = "machineX"; %DateSetSample.MachineLocation = “NONE”; 4. Establish the previously collected time. OLE_CreateObject(%CollectTime, "InTrack.DateTime"); %CollectTime.Month = 1; %CollectTime.Day = 1; %CollectTime.Year = 2000; %CollectTime.Hour = 0; %CollectTime.Minute = 0; %CollectTime.Second = 0; 5. Load the machine sample. returnCode = %DataSetSample.LoadMachineSample(%CollectTime, foundIt); 6-14 Chapter 6

LoadSample

The LoadSample method loads collected runtime data samples (not associated with a sublot or machine) from a data collection table to a DataSetSample object and sets the CollectTime. The data collection time parameter (DateTime object) serves as a key to differentiate one data sample from another. You must have the data sample collection time before calling LoadSample.

Note: If a sample is not found that meets the sample name (if applicable) and collection time criteria, InTrack loads default values defined in ModelMaker.

To use the LoadSample method: 1. Create a DataSetSample object. 2. Set the DataSetTemplate property or call the InitializeSample method. 3. Set the SampleName property. 4. Obtain a DateTime object to pass into the %CollectTime parameter.

Note: A Query.DataSetTimeStamp object retrieves the DateTime object for each data sample collection time.

5. Call the LoadSample method to load the data sample to manipulate. 6. Update the data items in the data sample. 7. Save the updated data sample.

Syntax returnCode = %DataSetSample_Object.LoadSample(%CollectTime, sampleFound); swhere:

Data Type Data Type Parameter (InTouch) (VB) Description

%CollectTime Object Object DateTime object, time data sample was collected sampleFound Discrete Boolean Returned value identifying the sample as: –1 = found and sample values loaded 0 = not found and default values loaded Activity Objects 6-15

SaveLotSample

The SaveLotSample method saves data collected in runtime for a specific sublot to a data collection table.

Note: To record changes in the LotBaseLog and DataCollectLog tables, set the DataCollectionLogFlag property of the Database object before calling this method.

To use the SaveLotSample method: 1. Create a DataSetSample object. 2. Set the DataSetTemplate property or call the InitializeSample method. 3. Set the SampleName property (optional for variable sampling plan). 4. Set the Sublot property to the sublot for which to obtain samples. 5. Load the data sample to manipulate with the LoadLotSample method. This is an optional step. If you do not perform a load, you must initialize the sample. 6. Update the data items in the data sample. 7. Call the SaveLotSample method.

Syntax returnCode = %DataSetSample_Object.SaveLotSample(holdFlag); where:

Data Type Data Type Parameter (InTouch) (VB) Description

holdFlag Discrete Boolean Returned Boolean value indicating that the sublot is placed on hold when sample values exceed the defined data item limits: –1 = on hold 0 = not on hold 6-16 Chapter 6

SaveMachineSample

The SaveMachineSample method saves data collected in runtime for a specific machine to a data collection table.

Note: To record changes in the ResourceBaseLog and MachineDataCollectLog tables, set the DataCollectionLogFlag property of the Database object before calling this method.

To use the SaveMachineSample method: 1. Create a DataSetSample object. 2. Set the DataSetTemplate property or call the InitializeSample method. 3. Set the SampleName property (optional for variable sampling plan). 4. Set the MachineName property to the machine for which to obtain samples. Note that the MachineLocation has a default value of “NONE”. If needed, set the MachineLocation property. 5. Load the data sample to manipulate with the LoadMachineSample method. This is an optional step. If you do not perform a load, you must initialize the sample. 6. Update the data items in the data sample. 7. Call the SaveMachineSample method.

Syntax returnCode = %DataSetSample_Object.SaveMachineSample();

Example The following script saves a previously loaded sample for a machine. 1. Create a DataSetSample object. OLE_CreateObject(%DataSetSample, "InTrack.DataSetSample"); 2. Initialize the sample with default values. %DataSetSample.InitializeSample("template[1]"); 3. Set the SampleName and MachineName properties. %DataSetSample.SampleName = "sample1"; %DataSetSample.MachineName = "machineX"; 4. Save the machine sample default values. returnCode = %DataSetSample.SaveMachineSample(); Activity Objects 6-17

SaveSample

The SaveSample method saves data (not associated with a sublot or a machine) collected in runtime to a data collection table.

Note: To record changes in the ResourceBaseLog and MachineDataCollectLog tables, set the DataCollectionLogFlag property of the Database object before calling this method.

To use the SaveSample method: 1. Create a DataSetSample object. 2. Set the DataSetTemplate property or call the InitializeSample method. 3. Set the SampleName property (optional for variable sampling plan). 4. Load the data sample to manipulate with the LoadSample method. This is an optional step. If you do not perform a load, you must initialize the sample. 5. Update the data items in the data sample. 6. Call the SaveSample method.

Syntax returnCode = %DataSetSample_Object.SaveSample(); 6-18 Chapter 6

SetItem

The SetItem method updates the value of a single sample item.

To use the SetItem method: 1. Create a DataSetSample object. 2. Set the DataSetTemplate property or call the InitializeSample method. 3. Set the SampleName property (optional for variable sampling plan). 4. Load the data sample to manipulate. 5. Obtain the names of the data item(s) to update in the data sample.

Note: Query.DataSetItem class will retrieve the data item names from a dataset template.

6. Identify the data item(s) to update in the data sample: To get a data item type, call the GetItemType method. To get a data item value, use the GetItemValue method. 7. To update the data item(s), call the SetItem method. 8. Save the updated data sample.

Syntax returnCode = %DataSetSample_Object.SetItem(itemName, value); where:

Data Type Data Type Parameter (InTouch) (VB) Description

itemName Message String Name of the data item to update value var VARIANT Data item of one of the following data types: Discrete (Boolean), Integer, Integer with Limits, Real, Real with Limits, Message (String), Message String Selection, Object Date, Object DateTime, Object Time, Object TimeInterval Activity Objects 6-19

SupersedeLotSample

The SupersedeLotSample method saves data collected in runtime for a sublot to a data collection table and marks the previous data sample record with a supersede flag. The data collection time parameter (DateTime object) serves as the key that identifies the data sample record to be marked with a supersede flag. You must have a data sample collection time before calling SupersedeLotSample.

Notes 1. If multiple samples are saved and superseded under transaction control, only the last sample will be recorded. When multiple samples occur within a transaction, all the samples bear the same time stamp, and only one can be saved with a specific time stamp. 2. To record changes in the LotBaseLog and DataCollectLog tables, set the DataCollectionLogFlag property before calling this method.

To use the SupersedeLotSample method: 1. Create a DataSetSample object. 2. Set the SampleName property. This property is required for the Load in step 5. 3. Set the Sublot property to the sublot for which to obtain samples. 4. Set the DataSetTemplate property or call the InitializeSample method. 5. Load the data sample to manipulate with the LoadLotSample method. 6. Update the data items in the data sample. 7. Obtain a DateTime object to pass into the %SupersedeRecord parameter.

Note: Query.LotDataSetTimeStamp retrieves a DateTime object for each data sample collection time.

8. Call the SupersedeLotSample method.

Syntax returnCode = %DataSetSample_Object.SupersedeLotSample(%SupersedeRecord, holdFlag); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%SupersedeRecord Object Object DateTime object, time stamp identifying the data sample record to mark with a supersede flag holdFlag Discrete Boolean Returned Boolean value indicating that sublot is placed on hold when the sample values exceed defined data item limits: –1 = on hold 0 = not on hold 6-20 Chapter 6

SupersedeMachineSample

The SupersedeMachineSample method saves data collected in runtime for a specific machine to a data collection table and marks the previous data sample record with a supersede flag. The data collection time parameter (DateTime object) serves as the key that identifies the data sample record to mark with a supersede flag. You must have the data sample collection time before calling SupersedeMachineSample.

Notes 1. If multiple samples are saved and superseded under transaction control, only the last sample will be recorded. When multiple samples occur within a transaction, all the samples bear the same time stamp, and only one can be saved with a specific time stamp. 2. To record changes in the ResourceBaseLog and MachineDataCollectLog tables, set the DataCollectionLogFlag property before calling this method.

To use the SupersedeMachineSample method: 1. Create a DataSetSample object. 2. Set the DataSetTemplate property or call the InitializeSample method. 3. Set the SampleName property. This property is required for the Load in step 5. 4. Set the MachineName property to the machine for which to obtain samples. 5. Load the data sample to manipulate with the LoadMachineSample method. 6. Manipulate the data items in the data sample. 7. Obtain a DateTime object to pass into the %SupersedeRecord parameter.

Note: Query.MachineDataSetTimeStamp retrieves a DateTime object for each data sample collection time.

8. Call the SupersedeMachineSample method.

Syntax returnCode = %DataSetSample_Object.SupersedeMachineSample(%SupersedeRecord); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%SupersedeRecord Object Object DateTime object, time stamp identifying the data sample record to mark with a supersede flag Activity Objects 6-21

Example The following script supersedes a previously loaded sample for a machine. 1. Create the DataSetSample object. OLE_CreateObject(%DataSetSample, "InTrack.DataSetSample"); 2. Initialize the sample with default values. %DataSetSample.InitializeSample("template[1]"); 3. Set the SampleName and MachineName properties. %DataSetSample.SampleName = "sample1"; %DataSetSample.MachineName = "machineX"; 4. Establish the previously collected time. OLE_CreateObject(%CollectTime, "InTrack.DateTime"); %CollectTime.Month = 1; %CollectTime.Day = 1; %CollectTime.Year = 2000; %CollectTime.Hour = 0; %CollectTime.Minute = 0; %CollectTime.Second = 0; 5. Load the machine sample. %DataSetSample.LoadMachineSample(%CollectTime, found); 6. Save the machine sample default values, superseding the previous record. returnCode = %DataSetSample.SupersedeMachineSample(%CollectTime); 6-22 Chapter 6

SupersedeSample

The SupersedeSample method saves data collected in runtime not associated with a specific sublot or machine to a data collection table and marks the previous data sample record with a supersede flag. The data collection time parameter (DateTime object) class serves as the key that identifies the data sample record to mark with a supersede flag. You must have the data sample collection time before calling SupersedeSample.

Note: If multiple samples are saved and superseded under transaction control, only the last sample will be recorded. When multiple samples occur within a transaction, all the samples bear the same time stamp, and only one can be saved with a specific time stamp.

To use the SupersedeSample method: 1. Create a DataSetSample object. 2. Set the SampleName property. This property is required for the Load in step 4. 3. Set the DataSetTemplate property or call the InitializeSample method. 4. Load the data sample to manipulate with the LoadSample method. 5. Manipulate the data items in the data sample. 6. Obtain a DateTime object to pass into the %SupersedeRecord parameter.

Note: Query.DataSetTimeStamp class retrieves the DateTime object for each data sample collection time.

7. Call the SupersedeSample method.

Syntax returnCode = %DataSetSample_Object.SupersedeSample(%SupersedeRecord); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%SupersedeRecord Object Object DateTime object, time stamp identifying the data sample record to mark with a supersede flag Activity Objects 6-23

TransferFromTagList

The TransferFromTagList method transfers all the data samples from a TagList to a DataSetSample object. This method is available only in InTouch.

To use the TransferFromTagList method: 1. Create a DataSetSample object. 2. Initialize the sample. 3. Set the SampleName property (optional for variable sampling plan). 4. If the TagList is associated with a specific sublot, set the Sublot property. 5. Call the TransferFromTagList method. 6. Save the updated data sample.

Syntax returnCode = %DataSetSample_Object.TransferFromTagList(tagList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

tagList Message String Name of the TagList from which to transfer data 6-24 Chapter 6

TransferToTagList

The TransferToTagList method transfers data samples from a DataSetSample object to a TagList, where it can be manipulated or displayed. This method is available only in InTouch.

To use the TransferToTagList method: 1. Create a DataSetSample object. 2. Initialize the sample. 3. Set the SampleName property. 4. If required, set the Sublot property or the Machine properties. 5. Call the appropriate Load method to retrieve an existing sample. 6. Call the TransferToTagList method.

Syntax returnCode = %DataSetSample_Object.TransferToTagList(tagList); where:

Data Type Data Type Parameter (InTouch) (VB) Description

tagList Message String Name of the TagList to which to transfer data Activity Objects 6-25

Lot Object Class

A Lot object is a summary of all corresponding sublots distributed among route steps and/or locations. For example, if a lot has two sublots, each with a primary quantity of 10, the PrimaryAmt property of the Lot object will be 20. An activity performed at the lot level will affect all sublots corresponding to it. For example, placing a lot on hold with the SetHoldStatus method of a Lot object places the lot and all its sublots on hold.

Identification

Object Name: InLot Interface Name: IInLot InTouch Object Name: %Lot The following sections provide property and method information for a Lot object.

Properties

The following table describes the properties of a Lot object.

Data Type Data Type Property (InTouch) (VB) Access Description

LotKey Message String r/w NameKey identifying the lot name Material Message String r VersionKey identifying the material (for example, bottles[1]); use NONE if the material is not versioned PrimaryAmt Object Object r Amount object, primary quantity (sum of all corresponding sublots) SecondaryAmt Object Object r Amount object. secondary amount (sum of all corresponding sublots) HoldStatus Discrete Boolean r Boolean value identifying the lot is: –1 = on hold 0 = not on hold QuarantineStatus Discrete Boolean r Boolean value identifying the lot is: –1 = in quarantine 0 = not in quarantine Priority Integer Short r Priority level CustomerSpec Message String r VersionKey of customer specification name CreateDate Object Object r DateTime object, lot creation date DueDate Object Object r DateTime object, expected completion ExpirationDate Object Object r DateTime object, lot expiration date 6-26 Chapter 6

Methods

This section describes the methods of a Lot object.

Create

The Create method creates a lot and its initial sublot. The Create method of the Sublot class also creates a lot and an initial sublot.

Note: The Create method does not create a Lot or Sublot object. The Create method creates lot and initial sublot activity objects.

Use the Lot Create method to perform lot level activities on the lot and initial sublot. Use the Sublot Create method to perform sublot level activities on the lot and initial sublot activity objects. For example, if you need to create a lot and sublot and assign a customer specification, the Lot Create method would be the most direct approach, because the SetCustomerSpecification method belongs to the Lot class. After you have created a Lot object and activitiy object, use the SetCustomerSpecification method for the Lot. The methods available for the Lot and Sublot class determine whether it is more practical to use the Lot Create or the Sublot Create method. The Lot methods perform activities at the lot level, and the Sublot method performs activities at the sublot level. However, you can use both methods to perform activities. For example, if you need to perform sublot-level transactions, create a Sublot object and perform the transactions. To assign a customer specification at a later time (lot level), create the Lot object and call its SetCustomerSpecification method. Create contains parameters for primary and secondary quantities (Amount objects). The material quantities are tracked based on the PrimaryAmt. The SecondaryAmt may be an empty amount object. Create also contains a parameter for the due date (DateTime object). This is provided for use with WIP lots with an expected due date. For inventory lots, this parameter can be set to the local time. Create also has a sublot key parameter, in the general form of LotID@Route[vers]:Step@location. For inventory lots, the route information can be skipped and the sublot key expressed as LotID@location. If the material is bulk material, the only valid LotID is Material[vers]. Before calling Create, create an Amount object for each quantity and a DateTime object for the due date, and set the properties.

Activity Objects 6-27

Syntax returnCode = %Lot_Object.Create(initialSublot, material, %PrimaryAmt, %SecondaryAmt, priority, custSpec, vendorID, vendorLotID, %DueDate); where:

Data Type Data Type Parameter (InTouch) (VB) Description initialSublot Message String SublotKey identifying the initial sublot material Message String VersionKey identifying the material (for example, bottles[1]); use NONE if the material is not versioned %PrimaryAmt Object Object Amount object, primary quantity to create %SecondaryAmt Object Object Amount object, secondary quantity to create priority Integer Short Priority level custSpec Message String VersionKey identifying the customer specification vendorID Message String Name of the company providing inventory vendorLotID Message String Vendor company’s lot identifier for the inventory material %DueDate Object Object DateTime object, date and time the lot is expected to complete the route 6-28 Chapter 6

Example The following script creates a lot and initial sublot with the Create method of the Lot class (%Lot_Object). This example creates a lot (Lot_123) and initial sublot with a primary quantity (PrimaryAmt) of 100 units and a secondary quantity (SecondaryAmt) of 1200 ounces. Lot_123 is created from inventory material from Smith_Brothers that has a VendorID “xyz”. Lot_123 will be queued at the initial step of the route, waterroute[1], which produces a target product, bottles[2]. Lot_123 is expected to complete the route at 11:59:59 on March 31, 1996. It uses a customer specification for the Jones_Company and has a priority of 1. The primary and secondary amount quantities to create are represented by Amount objects (%PrimaryAmt and %SecondaryAmt). The due date of the new lot is represented by a DateTime object (%DueDate). 1. Create a Lot object. OLE_CreateObject(%Lot_Object, “InTrack.Lot”); 2. Set the LotKey to the lot to create. %Lot_Object.LotKey = “Lot_123”; 3. Perform the following steps before calling a Create method: Set the initial SublotKey to the sublot to create. initialSublot = “Lot_123@waterroute[1]:step1”; Identify the material to create. material = “bottles[2]”; Create an Amount object to represent the primary quantity to create. OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); %PrimaryAmt.Quantity = 100; %PrimaryAmt.Units = “units”; Create an Amount object to represent the secondary quantity to create. OLE_CreateObject(%SecondaryAmt, “InTrack.Amount”); %SecondaryAmt.Quantity = 1200; %SecondaryAmt.Units = “ounces”; Identify the customer specification for the target product. custSpec = “Jones_Company”; 3. Perform the following steps before calling a Create method (continued): Create a DateTime object to represent the due date of the created lot. OLE_CreateObject(%DueDate, “InTrack.DateTime”); %DueDate.Month = 3; %DueDate.Day = 31; %DueDate.Year = 1996; %DueDate.Hour = 11; %DueDate.Minute = 59; %DueDate.Second = 59; 4. Call the Create method. returnCode = %Lot_Object.Create(initialSublot, material, %PrimaryAmt, %SecondaryAmt, 1, custSpec, “Smith_Brothers”, “xyz”, %DueDate); Activity Objects 6-29

Delete

The Delete method deletes the lot specified in the LotKey from the database, along with its corresponding logs and dataset records, only if the lot has a primary quantity of zero. Use the purgeLogs parameter to purge the corresponding base and transaction logs, and the purgeData parameter to purge the corresponding dataset records.

Note: To remove lots, logs, and dataset records from the database based on the last activity date, instead of the lot name, use the PurgeLot method of the Database class.

returnCode = %Lot_Object.Delete(purgeLot, purgeLogs, purgeData); where:

Data Type Data Type Parameter (InTouch) (VB) Description

purgeLot Discrete Boolean Boolean value indicating to: –1 = purge lot 0 = not purge lot purgeLogs Discrete Boolean Boolean value indicating to: –1 = purge all logs 0 = not purge all logs purgeData Discrete Boolean Boolean value indicating to: –1 = purge all datasets 0 = not purge all datasets 6-30 Chapter 6

GetUDAType

The GetUDAType method returns the data type of a specified UDA.

Syntax returnCode = %Lot_Object.GetUDAType(itemName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

itemName Message String UDA name udaType Integer Long Returned value identifying the UDA data type 1 = Real 2 = String 3 = Boolean 4 = Date 5 = Integer 7 = DateTime 8 = Time 9 = TimeInterval 12 = Double Activity Objects 6-31

GetUDAValue

The GetUDAValue method returns the value of a specified UDA.

Syntax returnedUDAValue = %Lot_Object.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

udaName Message String UDA name returnCode Integer Long Returned value identifying the method return code

Note: returnedUDAValue must be defined as one of the following data types: Integer, Real, Message, Object Date, Object DateTime, Object Time, Object TimeInterval.

Load

The Load method populates the read-only properties of a Lot object. The read-only properties are filled with data from the database and the LotKey, so set the LotKey before calling Load. After you have called Load, view the properties using script.

Syntax returnCode = %Lot_Object.Load();

SetCustomerSpecification

The SetCustomerSpecification method updates the current CustomerSpec property of a Lot object.

Syntax returnCode = %Lot_Object.SetCustomerSpecification(newCustSpec); where:

Data Type Data Type Parameter (InTouch) (VB) Description

newCustSpec Message String VersionKey identifying the new customer specification 6-32 Chapter 6

SetDueDate

The SetDueDate method updates the current DueDate property of a Lot object.

Syntax returnCode = %Lot_Object.SetDueDate(%DateTime); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%DateTime Object Object DateTime object, new due date

SetExpirationDate

The SetExpirationDate method updates the current ExpirationDate property of a Lot object.

Syntax returnCode = %Lot_Object.SetExpirationDate(%DateTime); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%DateTime Object Object DateTime object, new expiration date

SetHoldStatus

The SetHoldStatus method updates the current HoldStatus property of a Lot object. Identify the lot to put on hold or release using the LotKey before calling SetHoldStatus.

Note: Calling the SetHoldStatus method puts a lot and all corresponding sublots on hold or releases a lot and all corresponding sublots from hold. Activity Objects 6-33

Syntax returnCode = %Lot_Object.SetHoldStatus(holdStatus); where:

Data Type Data Type Parameter (InTouch) (VB) Description

holdStatus Discrete Boolean Boolean value that: –1 = puts a lot on hold 0 = releases a lot from hold

Example The following script places a lot (and corresponding sublots) on hold with the SetHoldStatus method of a Lot object (%Lot_Object). This example creates a Lot object and identifies the lot to place on hold (Lot_123) with the LotKey. 1. Create a Lot object. OLE_CreateObject(%Lot_Object, “InTrack.Lot”); 2. Set the LotKey to the lot to place on hold. %Lot_Object.LotKey = “Lot_123”; 3. Call the SetHoldStatus method to put a Lot into "On Hold" status. returnCode = %Lot_Object.SetHoldStatus(-1);

SetMaterial

The SetMaterial method updates the current Material property of a Lot object.

Note: The SetMaterial method can be used only for WIP lots and inventory lots. It cannot be used for bulk material.

Syntax returnCode = %Lot_Object.SetMaterial(newMaterial); where:

Data Type Data Type Parameter (InTouch) (VB) Description

newMaterial Message String VersionKey identifying the new material

Example The following script changes the Material property of a Lot object (%Lot_Object) with the SetMaterial method. This example changes the material name of a Lot object from bottles[2] to cans[1]. returnCode = %Lot_Object.SetMaterial(“cans[1]”); 6-34 Chapter 6

SetName

The SetName method updates the current LotKey of a Lot object.

Note: The SetName method can be used only for WIP lots and inventory lots. It cannot be used for bulk material.

Syntax returnCode = %Lot_Object.SetName(newName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

newName Message String NameKey identifying the new lot name

Example The following script changes the lot name of a Lot object (%Lot_Object) with the SetName method. This example changes the lot name of a Lot object from Lot_123 to Lot_124: returnCode = %Lot_Object.SetName(“Lot_124”);

SetPriority

The SetPriority method updates the current Priority property of a Lot object.

Syntax returnCode = %Lot_Object.SetPriority(priority); where:

Data Type Data Type Parameter (InTouch) (VB) Description

priority Integer Short New priority level Activity Objects 6-35

SetQuarantineStatus

SetQuarantineStatus updates the current QuarantineStatus property of a Lot object. Identify the lot to put in or release from quarantine using the LotKey before calling SetQuarantineStatus.

Note: Calling the SetQuarantineStatus method puts a lot and all corresponding sublots in quarantine or releases a lot and all corresponding sublots from quarantine.

Syntax returnCode = %Lot_Object.SetQuarantineStatus(quarantineStatus); where:

Data Type Data Type Parameter (InTouch) (VB) Description

quarantineStatus Discrete Boolean Boolean value that: –1 = puts a lot in quarantine 0 = releases a lot from quarantine

SetSecondaryAmount

The SetSecondaryAmount method updates the current SecondaryAmt property of a Lot object. The SetSecondaryAmount parameter contains an Amount object. Create the Amount object to represent secondary quantity before calling the SetSecondaryAmount method.

Syntax returnCode = %Lot_Object.SetSecondaryAmount(%Amount); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%Amount Object Object Amount object, new secondary quantity. 6-36 Chapter 6

SetUDA

The SetUDA method updates the value of a specified UDA. One way to use SetUDA is to set a lot UDA to require serialization before processing.

Syntax returnCode = %Lot_Object.SetUDA(itemName, value); where:

Data Type Data Type Parameter (InTouch) (VB) Description

itemName Message String UDA name value var VARIANT UDA value to change (UDA value must be one of the following data types: Integer, Real, Message, Object Date, Object DateTime, Object Time, Object TimeInterval)

Undo

The Undo method returns the selected lot or sublot to the status it had prior to the most recent method. Several consecutive methods can be undone by repeatedly calling Undo.

Notes: 1. If a Split method of the Sublot class is called, and subsequent methods for the split sublot are issued, you cannot undo transactions performed before the split unless you undo the transactions for both the original and split-off sublots. 2. To undo a Consume transaction (of the Sublot class), select the sublot that did the consumption, not the sublot from which the material was consumed. 3. To undo a Merge transaction (of the Sublot class), select the sublot that was merged to, not the sublot that was merged from. 4. Use a Query.LotUndo object to find the transactionID, if needed. (See Chapter 8.)

Syntax returnCode = %Lot_Object.Undo(transactionID); where:

Data Type Data Type Parameter (InTouch) (VB) Description

transactionID Message String Unique identifier of the lot or sublot transaction to undo Activity Objects 6-37

Sublot Object Class

Most material transactions occur at the sublot level. Sublot-level methods such as Start, Complete, Split, Merge, etc. are used to move materials along a route.. If Sublot methods contain a secondary amount parameter, an Amount object must be created to represent the quantity. If there is no secondary quantity, use the CreateObject function to create an Amount object to represent the secondary amount quantity, but do not set the properties, which will default to zero/null. When created, the Amount object representing secondary amount can be used in all methods that contain a secondary amount parameter but do not have a secondary amount quantity. The following sections provide property and method information for a Sublot object.

Sublot Identification

Within different types of lots, the following sublot keys are used: WIP Lot: LotID@Route[Version]:Step@Location Lot Inventory: LotID@Location Bulk Inventory: Material[Version]@Location

Identification

Object Name: InSublot Interface Name: IinSublot InTouch Object Name: %Sublot

6-38 Chapter 6

Properties

The following table describes the properties of a Sublot object.

Data Type Data Type Property (InTouch) (VB) Access Description

SublotKey Message String r/w SublotKey identifying the sublot on which to perform transactions LotID Message String r NameKey of the lot containing the sublot Material Message String r VersionKey of the material (for example, bottles[2]); use NONE if the material is not versioned Route Message String r VersionKey of the route; NONE is valid RouteStep Message String r NameKey of the route step Location Message String r NameKey of a user-defined location Operation Message String r VersionKey of the operation QueuedAmt Object Object r Amount object, amount queued for a transaction StartedAmt Object Object r Amount object, amount started SerialTrackingState Integer Short r Serial tracking state:: 0 = Unserialized 1 = Partial 2 = Serialized WorkState Integer Short r Sublot process state: 0 = Queued 1 = In_process 2 = Closed TimeQueued Object Object r DateTime object, time the sublot was queued for a transaction TimeStarted Object Object r DateTime object, time the transaction started CollectionDone Discrete Boolean r When no data collection has been specified, this value is always (–1). When data collection is specified at a step, Boolean value indicating: –1 = collection done 0 = collection not done The UpdateDataCollectFlag method must be called for this property to reflect the state correctly.

Table continues… Activity Objects 6-39

Data Type Data Type Property (InTouch) (VB) Access Description

ConsumptionDone Discrete Boolean r When no consumption has been specified, this value is always (–1). When consumption is specified at a step, Boolean value indicating: –1 = consumption done 0 = consumption not done The UpdateConsumptionFlag method must be called for this property to reflect the state correctly. CompletionDate Object Object r DateTime object, estimated completion date. The UpdateCompletionDate method must be called for this property to reflect the state correctly. CriticalRatio Real Double r Ratio between the due date and the remaining time needed to process the route. The UpdateCriticalRatio method must be called for this property to reflect the state correctly. 6-40 Chapter 6

Methods

This section describes the methods of a Sublot object.

AddSerialNumbers

The AddSerialNumbers method adds serial numbers to a Sublot object. AddSerialNumbers can add serial numbers to a started, queued, or closed amount, depending on the isQueued parameter setting.

Notes 1. This method does not add quantity to a sublot—it assigns serial numbers to existing units. Attempting to add more serial numbers than the quantity in the sublot causes a runtime error. 2. Closed quantity in a sublot is reflected as “queued” in the QueuedQty column of the Sublot table in the InTrack database.

Syntax returnCode = %Sublot_Object.AddSerialNumbers(serialNumber, isQueued); returnCode = %Sublot_Object.AddSerialNumbers(%SerialNumbers, isQueued); where:

Data Type Data Type Parameter (InTouch) (VB) Description

serialNumber Message String Serial number(s) to add; can be a comma- separated string %SerialNumbers Object SerialNumbers Serial number(s) to add isQueued Discrete Boolean Boolean value that serial numbers are added to a sublot quantity that is: –1 = queued 0 = started Activity Objects 6-41

Assemble

The Assemble method consumes material for a serialized sublot. Materials do not have to be manufactured with a bill of material to be consumed. Assemble can consume multiple quantities of materials, but Assemble must be called for each serial number consumed. The consumed sublots may be on a route.

Notes 1. If the consuming sublot is unserialized, use the Consume method. 2. If the material to consume is identified with a ConsumeItems object, materials without a bill of material (no material inputs defined at a route step) can be consumed if the ForceConsumption property is set to “TRUE” (–1) in each ConsumeItem object. 3. If the material to consume is not identified by a ConsumableMaterial(s) object, the consumed sublot’s quantity is automatically reduced by the quantity consumed. If the material is identified, then the UpdateQuantity property of the ConsumeItem class determines if the consumed sublot’s quantity is reduced by the quantity consumed. In this case, the consumed material is identified as a property of the ConsumableMaterial class. 4. If the quantity of a consumable material from an inventory lot is depleted, the lot ID may remain listed in the Inventory Lot Selector, even though the quantity is zero.

Note: Material cannot be consumed for lots on hold. If the operation is a start-and-complete type, then the consuming sublot must be in-process.

To identify the material to consume by sublot and amount, primary or substitute material, or serial number(s), Assemble contains a parameter that can be a ConsumeItem(s), ConsumableMaterial(s), or SerialNumbers object. It also can be a serial number string. Before calling Assemble, create any applicable parameter automation objects. These parameters also control the forced consumption and update quantity flags 6-42 Chapter 6

Syntax returnCode = %Sublot_Object.Assemble(conSerialNumber, %ConsumeItem); returnCode = %Sublot_Object.Assemble(conSerialNumber, %ConsumableMaterial); returnCode = %Sublot_Object.Assemble(conSerialNumber, serialNumber); returnCode = %Sublot_Object.Assemble(conSerialNumber, %SerialNumbers); where:

Data Type Data Type Parameter (InTouch) (VB) Description

conSerialNumber Message String Serial number of a unit in the consuming sublot %ConsumeItem Object Object ConsumeItem(s) object, sublot(s) and amount(s) to consume %ConsumableMaterial Object Object ConsumableMaterial(s) object, sublot(s) of a primary or substitute material to consume serialNumber Message String Item(s) to consume by serial number(s); can be a sequence of serial numbers separated by commas %SerialNumbers Object Object SerialNumbers object, item(s) to consume by serial number(s) Activity Objects 6-43

Close

The Close method moves the specified quantity of a single sublot that has completed a route into inventory. Close is normally used on the last step on the route. Two other methods will close quantity: To specify the machine on which to close a specified quantity of a single sublot with a Sublot object, use the CloseOnMachine method. To close multiple sublots on a specific machine, use the Close method of a Machine object. For more information on the Machine class object, see Chapter 5, “Structural Objects.”

Note: To move a co-product or by-product to inventory, use a Complete method.

Specify the sublot destination through the createLot and toInvLot parameters of the method call to close the sublot to a new lot or an existing lot.

Note: A sublot belonging to a lot on hold cannot be closed.

The Close method contains parameters for primary and secondary quantities (Amount objects). Before calling Close, create an Amount object for each amount quantity and set the properties.

Syntax returnCode = %Sublot_Object.Close(%PrimaryAmt, %SecondaryAmt, disposition, createLot, toInvLot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to close to inventory %SecondaryAmt Object Object Amount object, secondary quantity to close to inventory disposition Message String NameKey of the disposition of the sublot after it has completed the route createLot Discrete Boolean Boolean value specifying to close the sublot quantity to a(n): –1 = new sublot 0 = existing sublot toInvLot Message String SublotKey of the sublot’s inventory destination 6-44 Chapter 6

Example The following script closes a sublot to inventory with the Close method of a Sublot object (%Sublot_Object). This example closes a quantity of 100 units, with no secondary quantity, from Lot_123 to the storeroom. The primary and secondary amount quantities to close are represented by Amount objects, %PrimaryAmt and %SecondaryAmt, respectively.

Note: An Amount object must be created to represent the secondary amount quantity. If there is no secondary quantity, use the CreateObject function to create an Amount object, but do not set the properties, which will default to zero/null.

1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, “InTrack.Sublot”); 2. Set the SublotKey to the sublot to close. %Sublot_Object.SublotKey = “Lot_123@waterroute[1]:step5”; 3. Create an Amount object to represent the primary quantity to close. OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); %PrimaryAmt.Quantity = 100; %PrimaryAmt.Units = “units”; 4. Create an Amount object to represent the secondary quantity to close. OLE_CreateObject(%SecondaryAmt, “InTrack.Amount”); 5. Identify the sublot disposition after it has completed the route. disposition = “Test_OK”; 6. Identify whether to close the sublot to an existing sublot or a new sublot. createLot = 0; 7. Identify the inventory destination of the sublot. toInvLot = “Lot_123@storeroom”; 8. Call the Close method. returnCode = %Sublot_Object.Close(%PrimaryAmt, %SecondaryAmt, disposition, createLot, toInvLot); Activity Objects 6-45

CloseAllQty

The CloseAllQty method closes an entire sublot quantity to inventory. CloseAllQty is typically used on the last step on the route.

Syntax returnCode = %Sublot_Object.CloseAllQty(disposition); where:

Data Type Data Type Parameter (InTouch) (VB) Description

disposition Message String NameKey of the disposition of the sublot after it has completed the route 6-46 Chapter 6

CloseOnMachine

The CloseOnMachine method lets you specify the machine on which to close a specified quantity of a single sublot that has completed a route to inventory. Two other methods will close quantity. To close a specified quantity of a single sublot, use the Close method. To close multiple sublots on a specific machine, use the Close method of a Machine object. For more information on the Machine class object, see Chapter 5, “Structural Objects.”

Note: To move a co-product or by-product to inventory, use a Complete method.

The CloseOnMachine method contains parameters for primary and secondary quantities that are automation objects of the Amount class. Before calling CloseOnMachine, create an Amount object for each amount quantity and set the properties.

Syntax returnCode = %Sublot_Object.CloseOnMachine(%PrimaryAmt, %SecondaryAmt, disposition, createLot, toInvLot, machine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to close to inventory %SecondaryAmt Object Object Amount object, secondary quantity to close to inventory disposition Message String NameKey of the disposition of the sublot after it has completed the route createLot Discrete Boolean Boolean value to close the sublot quantity to: –1 = new sublot 0 = existing sublot toInvLot Message String SublotKey of the inventory destination of the sublot machine Message String NameKey of the machine on which to close the lot Activity Objects 6-47

Comment

The Comment method adds a general comment to a sublot. Comments are stored in the LotBaseLog and are referenced by the CommentLog table. The comment file records the operator ID, the time stamp the comments were entered, and the lot ID. This Comment method differs from the Comment property in the Database class. In the Database class, the Comment property is associated with a specific method. In the Sublot class, the Comment method is associated only with a specific sublot.

Syntax returnCode = %Sublot_Object.Comment(comment); where:

Data Type Data Type Parameter (InTouch) (VB) Description

comment Message String Comment to add to the sublot 6-48 Chapter 6

Complete

If modeled operation does not allow flow lots (no overlap), the entire quantity of the parent Lot must be completed at one time. This applies to any modeled disposition code including scrap and material outputs. Operations that allow flow lots can have partial quantities completed. For material output, the quantity allowed is based on the ratio and tolerances defined in ModelMaker. Two other methods will complete a quantity: To specify the machine on which to complete a specified quantity of a single sublot with a Sublot object, use the CompleteOnMachine method. To complete multiple sublots on a specific machine, use the Complete method of the Machine class.

Note: Calling the Complete method changes a sublot’s status to “queued” at the next route step. However, if an operation is defined as “Complete Only,” the status of the sublot is always queued.

The Complete method can be used to: Complete a partial quantity or the entire sublot quantity at the current operation and queue it for the next operation. Disposition a sublot to rework or reject operations. Scrap sublot quantities. Complete coproducts or by-products (output) to inventory or another route. Complete an entire or partial sublot to inventory at another route.

Note: Complete methods are not used when closing an entire sublot to inventory. Use the Close method to complete an entire sublot to inventory. Use the Complete method for other dispositions (completing a partial sublot, closing a sublot to another route).

The Complete method contains parameters for primary and secondary quantities that contain an Amount object. Before calling Complete, create an Amount object for each quantity and set the properties. Activity Objects 6-49

Syntax returnCode = %Sublot_Object.Complete(%PrimaryAmt, %SecondaryAmt, disposition, forceCompletion, createdLot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to complete %SecondaryAmt Object Object Amount object, secondary quantity to complete disposition Message String NameKey of the disposition of the sublot after it has completed a route step forceCompletion Discrete Boolean Boolean value to stop tracking the remaining quantity at the operation (only applies when a partial quantity is completed): –1 = force completion, stop tracking quantity 0= do not force completion Note: This action forces the sublot quantity to zero, then deletes the sublot createdLot Message String Lot ID of material output (for example, coproducts or by-products) Note: If you do not supply a value, the system returns a system-generated lot ID

Sublot quantities are completed at the current operation and directed according to the assigned disposition code. Multiple disposition codes can be used for multiple quantities having different dispositions, depending how the route was defined. In addition to assigning a name to a disposition code (for example, “OK”), you can assign a type to a disposition code. InTrack includes four disposition codes types: GOOD, REJECT, REWORK, SCRAP. The disposition code type does not affect the manufacturing model constructed in ModelMaker; disposition code types are provided for reporting purposes only. Complete closes sublot quantities to inventory (using the same lot ID) if a disposition code other than the default disposition code is assigned to the last step on a route.

Note: To close a sublot to inventory with a new inventory lot ID when the default disposition code is assigned to the last step on the route, use a Close method.

The complete method completes sublots if the operation is defined as an overlapped operation (allowing flow lots). Complete moves coproducts and by-products to another route or to inventory. Coproducts and by- products completed off the route can be assigned to a specified lot ID, or they can retain the lot ID of the parent lot and be assigned a unique sequential numeric extension (for example, ParentLotID_01 and ParentLotID_02). If the specified sublot already exists, the primary quantity to complete is added to the existing sublot quantity. 6-50 Chapter 6

The forceCompletion parameter applies only for partial quantities completed at an operation. When the forceCompletion parameter is set to –1, the quantity remaining at the operation is not tracked further. No disposition code is assigned to this quantity and no record is made of where the quantity went; the quantity “disappears” from the system. A forced complete is useful in operations where only a partial quantity actually made it through an operation (for example, as a lot, coproduct, by-product, or scrapped material) while the remaining quantity was lost or consumed in the operation.

CompleteOnMachine

The CompleteOnMachine method lets you specify the machine on which to complete the specified quantity of a single sublot at the current operation and disposition quantities according to the assigned disposition code. Two other methods will complete quantity: To complete a specified quantity of a single sublot, use the Complete method. To complete multiple sublots on a specific machine, use the Complete method of the Machine class.

Note: Complete methods are not used when closing an entire sublot to inventory. Use the Close method to complete an entire sublot to inventory. Use the Complete method for other dispositions (completing a partial sublot, closing a sublot to another route).

The CompleteOnMachine method contains parameters for primary and secondary quantities that are Amount objects. Before calling CompleteOnMachine, create an Amount object for each quantity and set the properties. CompleteOnMachine moves a coproduct or by-product to another route or to inventory. A coproduct and by-product completed off the route can be assigned to a specified lot ID, or can retain the lot ID of the parent lot and be assigned a unique sequential numeric extension (for example, ParentLotID_01 and ParentLotID_02). Activity Objects 6-51

Syntax returnCode = %Sublot_Object.CompleteOnMachine(%PrimaryAmt, %SecondaryAmt, disposition, forceCompletion, machine, createdLot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to complete %SecondaryAmt Object Object Amount object, secondary quantity to complete disposition Message String NameKey of the disposition of the sublot after it has completed a route step forceCompletion Discrete Boolean Boolean value to stop tracking the remaining quantity at the operation (only applies when a partial quantity is completed): –1 = force completion, stop tracking quantity 0 = do not force completion Note: This action forces the sublot quantity to zero, then deletes the sublot machine Message String NameKey of the machine on which to complete the sublot createdLot Message String Lot ID of material output (for example, coproduct or by-product) Note: If you do not supply a value for this parameter, the system returns a system-generated lot ID 6-52 Chapter 6

Consume

The Consume method applies for an unserialized sublot. Materials do not have to be manufactured with a bill of material to be consumed. Multiple quantities of inventory materials can be consumed with this method. The consumed sublots can be on a route.

Notes 1. If the consuming sublot is serialized, use the Assemble method. 2. If the material to consume is identified with a ConsumeItems object, materials without a bill of material (with no material inputs defined at a route step) can be consumed if the ForceConsumption property is set to “TRUE” (–1) in each ConsumeItem object. 3. If the material to consume is not identified by a ConsumableMaterial(s) object, the consumed sublot’s quantity is automatically reduced by the quantity consumed. If the material is identified, the UpdateQuantity property of the ConsumeItem class determines if the consumed sublot’s quantity is reduced by the quantity consumed. In this case, the consumed material is identified as a property of the ConsumableMaterial class 4. If the quantity of a consumable material from an inventory lot is depleted, the lot ID may remain listed in the Inventory Lot Selector, even though the quantity is zero.

The following condition must exist to consume material: The consuming lot must not be on hold The consuming sublot must be in-process if the operation is a start-and-complete type. To identify the material to consume by sublot and amount, primary or substitute material, or serial number(s), as well as to control the forced consumption and update quantity flags, Consume contains a parameter that can be a ConsumeItem(s), ConsumableMaterial(s), or SerialNumbers object. It also can be a serial number string. Before calling Consume, create any applicable automation objects.

Syntax returnCode = %Sublot_Object.Consume(%ConsumeItem); returnCode = %Sublot_Object.Consume(%ConsumableMaterial); returnCode = %Sublot_Object.Consume(serialNumber); returnCode = %Sublot_Object.Consume(%SerialNumbers); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%ConsumeItem Object Object ConsumeItem object, sublot(s) and amount(s) to consume %ConsumableMaterial Object Object ConsumableMaterial(s) object, sublot(s) of a primary or substitute material to consume serialNumber Message String Item(s) to consume by serial number(s); can be a sequence of serial numbers separated by commas %SerialNumbers Object Object SerialNumbers object, item(s) to consume by serial number(s) Activity Objects 6-53

ConsumeQty

The ConsumeQty method consumes a specified amount of a sublot for a particular material.

Note: The ConsumeQty method does not consider serial numbers or secondary quantities and does not allow forced consumption.

Syntax returnCode = %Sublot_Object.ConsumeQty(sublot, consumeQty); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot to consume consumeQty Real Double Primary quantity to consume

ConsumeStdQty

The ConsumeStdQty method consumes a standard quantity of a material, as defined in ModelMaker. Specify the material to consume through the sublot parameter.

Note: The ConsumeStdQty method does not consider serial numbers or secondary quantities and does not allow forced consumption.

Syntax returnCode = %Sublot_Object.ConsumeStdQty(sublot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot to consume 6-54 Chapter 6

Create

The Create method creates a lot and its initial sublot. The Create method of the Lot class also creates a lot and its initial sublot.

Note: The Create method creates the lot and initial sublot activity objects.

Use the Lot Create method to perform lot level activities on the lot and initial sublot. Use the Sublot Create method to perform sublot level activities on the lot and initial sublot activity objects. For example, if you need to create a lot and sublot and assign a customer specification, the Lot Create method would be the most direct approach, because the SetCustomerSpecification method belongs to the Lot class. After you have created a Lot object and activitiy object, use the SetCustomerSpecification method for the Lot. The methods available for the Lot and Sublot class determine whether it is more practical to use the Lot Create or the Sublot Create method. The Lot methods perform activities at the lot level, and the Sublot method performs activities at the sublot level. However, you can use both methods to perform activities. For example, if you need to perform sublot-level transactions, create a Sublot object and perform the transactions. To assign a customer specification at a later time (lot level), create the Lot object and call its SetCustomerSpecification method. Create contains parameters for primary and secondary quantities (Amount objects). Create also contains a parameter for the due date (DateTime object). Before calling Create, create an Amount object for each quantity and a DateTime object for the due date, and set the properties.

Note: The Sublot key property must be set before calling the Create method. Activity Objects 6-55

Syntax returnCode = %Sublot_Object.Create(material, %PrimaryAmt, %SecondaryAmt, priority, custSpec, vendorID, vendorLotID, %DueDate); where:

Data Type Data Type Parameter (InTouch) (VB) Description material Message String VersionKey of the material (for example, bottles[1]); use NONE if the material is not versioned (for example: "bottles[NONE]") %PrimaryAmt Object Object Amount object, primary quantity to create %SecondaryAmt Object Object Amount object, secondary quantity to create priority Integer Short Priority level custSpec Message String VersionKey of the customer specification containing special customer requirements for the target product vendorID Message String Name of the company providing the inventory material vendorLotID Message String Vendor company’s lot identifier for the inventory material %DueDate Object Object DateTime object, date and time the lot is expected to complete the route 6-56 Chapter 6

Disassemble

The Disassemble method tracks the removal of previously consumed (assembled) material from a sublot. Either or both the consumed material or machine that consumes the material can be serialized. The component being disassembled can be moved to inventory or to another operation on any route (it does not have to be returned to the lot from where it came). A component to be scrapped must be moved to an operation that has the necessary scrap disposition codes defined. The material being disassembled must be defined as an input material to the product at a given operation. That is, the material must be consumed before it can be disassembled. The consumption and disassembly do not need to occur at the same route step. The consumption also may have occurred at one or more previous route steps. The Unassemble method should be used to disassemble material that was not defined as a material input or one for which the quantity of the consumed sublot was not updated.

Syntax returnCode = %Sublot_Object.Disassemble(consumerSerialNumber, destinationSublot, disassembledMaterial, %PrimaryAmt, %SecondaryAmt, createSublot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

consumerSerialNumber Message String Serial number of unit for which the original consumption was performed (can be NONE) destinationSublot Message String SublotKey for the disassembled component disassembledMaterial Message String VersionKey of the name and version of material to disassemble %PrimaryAmt Object Object Amount object, primary amount of the disassembled component %SecondaryAmt Object Object Amount object, secondary amount of the disassembled component createSublot Discrete Boolean Boolean value to create the destination sublot where: –1 = create 0 = do not create Activity Objects 6-57

Example This example assumes that serialized unit “123” of “Lot1” has previously consumed a quantity of two serialized units of material “material[1]” from “Lot2” (serial numbers “1” and “2”) and 8 serialized units of the same material from “Lot3” (serial numbers “3”, “4”, “5”, “6”, “7”, “8”, “9” and “10”) at two different route steps and that we want to disassemble 5 of these serialized units (serial numbers “1”, “2”, “8”, “9”, and “10”) at yet another route step and put them into “Lot4” on “route[1]” at step “1” and location “ABC” which does not have an existing sublot with this key: 1. Create an Amount objcet to represent the primary quantity to disassemble. OLE_CreateObject(%PrimaryAmt, "InTrack.Amount"); %PrimaryAmt.Quantity = 5; %PrimaryAmt.Units = "units"; 2. Create a SerialNumbers object to represent the serial numbers associated with the primary quantity to disassemble. OLE_CreateObject(%SerialNumbers, "InTrack.SerialNumbers"); returnCode = %SerialNumbers.Add("1,2,8,9,10"); returnCode = %PrimaryAmt.Serialize(%SerialNumbers); 3. Create an Amount object to represent the secondary quantity to disassemble. OLE_CreateObject(%SecondaryAmt, "InTrack.Amount"); %SecondaryAmt.Quantity = 0; %SecondaryAmt.Units = ""; 4. Perform the disassembly (Sublot_Object has a LotID = "Lot1"). returnCode = %Sublot_Object.Disassemble("123", "Lot4@route[1]:1@ABC", "material[1]", %PrimaryAmt, %SecondaryAmt, 1); 6-58 Chapter 6

GetAllConsumeItems

The GetAllConsumeItems method retrieves a list of valid sublots for the specified consumable material. The sublots cannot be expired and must exist in the location specified by the model. The GetAllConsumeItems method populates a ConsumeItems object with a list of ConsumeItem objects. One ConsumeItem object is generated for each sublot eligible for consumption and includes a SublotKey, primary and secondary quantity information, and the ForceComplete flag set to FALSE.

Note: To apply restrictions on the sublot(s) eligible for consumption in the ConsumeItem object generated, use the GetConsumeItems method.

Use the populated ConsumeItems object with the Assemble method or Consume method of a Sublot object. Before calling GetAllConsumeItems, create a ConsumeItems object.

Syntax returnCode = %Sublot_Object.GetAllConsumeItems(material, %ConsumeItems); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey of the material (for example, bottles[2]); use NONE if not versioned %ConsumeItems Object Object ConsumeItems object populated with ConsumeItem objects Activity Objects 6-59

GetCompletionDate

The GetCompletionDate method calculates a sublot’s completion date based on the sublot’s start date, current position on the route, the remaining operation cycle times, and the calendar. The sublot is assumed to follow the main exit for all remaining route steps.

Syntax returnCode = %Sublot_Object.GetCompletionDate(%StartDate, %CompletionDate);

where:

Data Type Data Type Parameter (InTouch) (VB) Description

%StartDate Object Object DateTime object, sublot start date %CompletionDate Object Object DateTime object, estimated completion date

GetConsumableMaterials

The GetConsumableMaterials method populates a ConsumableMaterials collection with ConsumableMaterial objects. One ConsumableMaterial object is generated for each primary material eligible for consumption. The list of materials is based on the materials modeled at the sublot’s route and step. Use the populated ConsumableMaterials object to call GetConsumeItems. Before calling GetConsumableMaterials, create a ConsumableMaterials object.

Syntax returnCode = %Sublot_Object.GetConsumableMaterials(%ConsumableMaterials); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%ConsumableMaterials Object Object ConsumableMaterials collection populated with ConsumableMaterial objects 6-60 Chapter 6

GetConsumeItems

The GetConsumeItems method retrieves a list of valid sublots for the specified consumable material. The sublots cannot be expired and must exist in the location specified by the model. The GetConsumeItems method populates a ConsumeItems collection with ConsumeItem objects. One ConsumeItem object is generated for each sublot eligible for consumption and includes a SublotKey, primary and secondary quantity information, and the ForceComplete flag set to FALSE. GetConsumeItems lets you restrict sublots eligible for consumption with an SQL predicate. Use the populated ConsumeItems object with the Assemble method or Consume method of a Sublot object. Before calling GetConsumeItems, create a ConsumeItems object.

Syntax returnCode = %Sublot_Object.GetConsumeItems(material, %ConsumeItems, predicate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey of the material (for example, bottles[2]); use NONE if not versioned %ConsumeItems Object Object ConsumeItems collection populated with ConsumeItem object predicate Message String SQL predicate used for filtering (for example, a WHERE clause) Activity Objects 6-61

GetConsumeQty

The GetConsumeQty method returns the standard amount to be consumed and the amount previously consumed for a material.

Syntax returnCode = %Sublot_Object.GetConsumeQty(material, quantity, lowerQty, standardQty, upperQty); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey identifying the material (for example, bottles[2]); use NONE if the material is not versioned quantity Real Double Returned value of the amount of material previously consumed. lowerQty Real Double Returned value of the lowest acceptable quantity of material to consume for the sublot standardQty Real Double Returned value of the target quantity of material to consume for the sublot upperQty Real Double Returned value of the highest acceptable quantity of material to consume for the sublot 6-62 Chapter 6

GetOperationInfo

The GetOperationInfo method returns operation information for a specified sublot. The value of the SublotKey property must be set before calling this method.

Syntax returnCode = %Sublot_Object.GetOperationInfo(operation, overlapped, completeOnly, %CycleTime, %MaxQueueTime, stdYield, level); where:

Data Type Data Type Parameter (InTouch) (VB) Description

operation Message String Returned VersionKey for the operation associated with sublot at the route step overlapped Discrete Boolean Returned Boolean value indicating if operation: –1 = lets lot material move to the next step before the lot has been completed 0 = requires the entire lot quantity to be completed before moving to the next step completeOnly Discrete Boolean Returned Boolean value that lot tracking includes: –1 = complete transactions only 0 = both start and complete transactions %CycleTime Object Object Returned TimeInterval object, cycle time for operation %MaxQueueTime Object Object Returned TimeInterval object, maximum time a lot can be queued at operation stdYield Real Double Returned percentage of GOOD material produced by operation level Integer Long Returned value that identifies override level of the operation 0 = default 1 = product 2 = customer specification

Example The following script creates a sublot object, sets the sublot key, and gets the operation information to be performed for the sublot. 1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, "InTrack.Sublot"); 2. Set the SublotKey. %Sublot_Object.SublotKey = "Lot001@Route[versionA]:1"; 3. Call the GetOperationInfo method. returnCode = %Sublot_Object.GetOperationInfo(operation, overlapped, completeOnly, %CycleTime, %MaxQueueTime, stdYield, level); Activity Objects 6-63

GetOutputQty

The GetOutputQty method returns the standard amount to be ouptput.

Syntax returnCode = %Sublot_Object.GetOutputQty(material, quantity, lowerQty, standardQty, upperQty); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey identifying the material (for example, bottles[2]); use NONE if the material is not versioned quantity Real Double Returned value of the amount of material to be output. lowerQty Real Double Returned value of the lowest acceptable quantity of material to be output standardQty Real Double Returned value of the target quantity of material to be output upperQty Real Double Returned value of the highest acceptable quantity of material to be output 6-64 Chapter 6

GetSubstituteConsumeItems

The GetSubstituteConsumeItems method retrieves a list of valid sublots for the specified substitute material. The sublots cannot be expired and must exist in the location specified by the model. The GetSubstituteConsumeItems method populates a ConsumeItems collection with ConsumeItem objects. One ConsumeItem object is generated for each sublot eligible for consumption and includes a SublotKey, primary and secondary quantity information, and the ForceComplete flag set to FALSE. GetSubstituteConsumeItems lets you restrict sublots eligible for consumption with an SQL predicate. Use the populated ConsumeItems object with the Assemble method or Consume method of a Sublot object. Before calling GetSubstituteConsumeItems, create a ConsumeItems object.

Syntax returnCode = %Sublot_Object.GetSubstituteConsumeItems(material, %ConsumeItems, predicate, substitute); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey of the material (for example, bottles[2]); use NONE if not versioned %ConsumeItems Object Object ConsumeItems collection populated with ConsumeItem object predicate Message String SQL predicate used for filtering (for example, a WHERE clause) substitute Message String VersionKey of the substitute material.

GetSubstituteMaterials

The GetSubstituteMaterials method populates a ConsumableMaterials collection with ConsumableMaterial objects. One ConsumableMaterial object is generated for each substitute material eligible for consumption. Use the populated ConsumableMaterials object to call GetSubstituteConsumeItems. Before calling GetSubstituteMaterials, create a ConsumableMaterials object.

Syntax returnCode = %Sublot_Object.GetSubstituteMaterials(material, %ConsumableMaterials); where:

Data Type Data Type Parameter (InTouch) (VB) Description

Material Message String VersionKey of the material for which to substitute; use NONE if the material is not versioned Activity Objects 6-65

%ConsumableMaterials Object Object ConsumableMaterials collection populated with ConsumableMaterial objects 6-66 Chapter 6

GetUDAType

The GetUDAType method returns the data type of a specified UDA. The numeric value for each UDA data type is: 1 ITR_UDA_ANALOG_TYPE 7 ITR_UDA_DATE_TIME_TYPE 2 ITR_UDA_ALPHANUMERIC_TYPE 8 ITR_UDA_TIME_TYPE 3 ITR_UDA_BOOLEAN_TYPE 9 ITR_UDA_TIME_INTERVAL_TYPE 4 ITR_UDA_DATE_TYPE 12 ITR_UDA_DOUBLE_REAL_TYPE 5 ITR_UDA_INTEGER_TYPE

Syntax returnCode = %Sublot_Object.GetUDAType(itemName, udaType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

itemName Message String UDA name udaType Integer Long Returned value identifying the UDA data type: 1 = Real 2 = String 3 = Boolean 4 = Date 5 = Integer 7 = DateTime 8 = Time 9 = TimeInterval 12 = Double Activity Objects 6-67

GetUDAValue

The GetUDAValue method returns the value of a specified UDA.

Syntax returnedUDAValue = %Sublot_Object.GetUDAValue(udaName, returnCode); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ReturnedUDAValue var VARIANT Returned UDA Value udaName Message String UDA name returnCode Integer Long Returned value of the method return code

Note: returnedUDAValue must be defined as one of the following data types: Integer, Real, Message (String), Object Date, Object DateTime, Object Time, Object TimeInterval. 6-68 Chapter 6

InProcessMove

The InProcessMove method moves material for a WIP sublot in process (started). If the sublot status is not “InProcess_Started” use the standard Move method. If moving a WIP sublot, material can be moved to: A specified step on the same route or a different route Another location on the same route or a different route A specific step and location on the same route or a different route

Note: A sublot belonging to a lot on hold cannot be moved.

The InProcessMove method contains parameters for primary and secondary quantities (Amount objects). Before calling InProcessMove, create an Amount object for each quantity and set the properties.

Syntax returnCode = %Sublot_Object.InProcessMove(%PrimaryAmt, %SecondaryAmt, newRoute, newRouteStep, newLocation, disposition, forceMove, newMachine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to move %SecondaryAmt Object Object Amount object, secondary quantity to move newRoute Message String VersionKey of the route to which to move the sublot quantity newRouteStep Message String NameKey of the route step to which to move the sublot quantity newLocation Message String NameKey of the sublot destination location disposition Message String NameKey of the disposition of the sublot after it has completed a route step forceMove Discrete Boolean Boolean value indicating that the move is: –1 = forced 0 = not forced newMachine Message String NameKey of the sublot destination machine Activity Objects 6-69

Load

The Load method populates the read-only properties of a Sublot object. The read-only properties are filled with data from the SublotKey and the database. The SublotKey must be set before calling Load. After you have called Load, view the properties with script.

Syntax returnCode = %Sublot_Object.Load();

Example — Populating a Sublot Object Using Load This example sets the SublotKey of a Sublot object to the sublot for which to load property information. Script demonstrating how to view a loaded property also is shown. 1. Set the SublotKey to the sublot to load. %Sublot_Object.SublotKey = “Lot_123@waterroute[1]:step1”; 2. Call the Load method. returnCode = %Sublot_Object.Load(); 3. View a property. returnedOperationName = %Sublot_Object.Operation;

Note: returnedOperationName must be defined as a Message (VersionKey) data type.

LoadFromSerialNumber

The LoadFromSerialNumber method populates the read-only properties of a Sublot object using a specified serial number. The read-only properties are populated with data from the database. The SublotKey does not have to be set before calling LoadFromSerialNumber. After you have called LoadFromSerialNumber, view the properties with script.

Syntax returnCode = %Sublot_Object.LoadFromSerialNumber(SerialNumber); where:

Data Type Data Type Parameter (InTouch) (VB) Description

SerialNumber Object Object Serial number object

6-70 Chapter 6

Merge

The Merge method combines two existing sublots into a single (target) sublot. The target lot is the sublot identified by the SublotKey property of the object.

Note: Only sublots with the same hold status, quarantine status, customer specification and material can be merged.

The Merge method contains parameters for primary and secondary quantities (Amount objects). Before calling Merge, create Amount objects for each quantity and set the properties.

Syntax returnCode = %Sublot_Object.Merge(%PrimaryAmt, %SecondaryAmt, anotherLotID); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to merge %SecondaryAmt Object Object Amount object, secondary quantity to merge anotherLotID Message String SublotKey of the source sublot name Activity Objects 6-71

Example The following script merges two sublots with the Merge method of a Sublot object (%Sublot_Object). This example merges 50 units of Lot_124 into Lot_123. The primary and secondary amount quantities to merge are represented by Amount objects, %PrimaryAmt and %SecondaryAmt.

Note: An Amount object must be created to represent the secondary amount quantity. If there is no secondary quantity, use the CreateObject function to create an Amount object, but do not set the properties, which will default to zero/null.

1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, “InTrack.Sublot”); 2. Set the SublotKey to the sublot to merge. %Sublot_Object.SublotKey = “Lot_123@waterroute[1]:step1”; 3. Create an Amount object to represent the primary quantity to merge. OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); %PrimaryAmt.Quantity = 50; %PrimaryAmt.Units = “units”; 4. Create an Amount object to represent the secondary quantity to merge. OLE_CreateObject(%SecondaryAmt, “InTrack.Amount”); 5. Identify the name of the target sublot to which to merge. anotherLotID = “Lot_124@waterroute[1]:step1”; 6. Call the Merge method. returnCode = %Sublot_Object.Merge(%PrimaryAmt, %SecondaryAmt, anotherLotID); 6-72 Chapter 6

Move

The Move method moves material to another step or location (or both), depending on whether a WIP sublot, inventory sublot, or bulk inventory is being moved. If moving a WIP sublot, material can be moved to: A specified step on the same route or a different route Another location on the same route or a different route A specific step and location on the same route or a different route To perform a WIP move, a sublot must be queued at an operation. If moving an inventory sublot or bulk inventory, material can be moved to another route or location.

Note: A sublot belonging to a lot on hold cannot be moved.

The Move method contains parameters for primary and secondary quantities (Amount objects). Before calling Move, create an Amount object for each quantity and set the properties.

Note: If the sublot status is “InProcess,” you must use the InProcessMove method.

Syntax returnCode = %Sublot_Object.Move(%PrimaryAmt, %SecondaryAmt, newRoute, newRouteStep, newLocation, disposition); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to move %SecondaryAmt Object Object Amount object, secondary quantity to move newRoute Message String VersionKey of the route to which to move the sublot quantity newRouteStep Message String NameKey of the route step to which to move the sublot quantity newLocation Message String NameKey of the sublot destination location disposition Message String NameKey of the disposition of the sublot after it has completed a route step Activity Objects 6-73

Example — Moving a Sublot The following script moves a sublot from one route, route step, and location to another route, route step, and location with the Move method of a Sublot object (%Sublot_Object). This example moves a partial quantity (sublot) of 200 from step 1 on waterroute [1] of Lot_123 to step 2 on waterroute[2] of Lot_123 (located on production floor 2) when the disposition code is Rework. The primary and secondary amount quantities to move are represented by Amount objects, %PrimaryAmt and %SecondaryAmt, respectively.

Note: An Amount object must be created to represent the secondary amount quantity. If there is no secondary quantity, use the CreateObject function to create an Amount object, but do not set the properties, which will default to zero/null.

1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, “InTrack.Sublot”); 2. Set the SublotKey to the sublot to move. SublotObject.SublotKey = “Lot_123@waterroute[1]:step1”; 3. Create an Amount object to represent the primary quantity to move. OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); %PrimaryAmt.Quantity = 200; %PrimaryAmt.Units = “units”; 4. Create an Amount object to represent the secondary quantity to move. OLE_CreateObject(%SecondaryAmt, “InTrack.Amount”); 5. Identify the route to which to move the sublot. newRoute = “waterroute[2]”; 6. Identify the route step to which to move the sublot. newRouteStep = “2”; 7. Identify the location to which to move the sublot. newLocation = “production_floor_2”; 8. Identify the disposition of the sublot after it has completed a route step. disposition = “Rework”; 9. Call the Move method. returnCode = %Sublot_Object.Move(%PrimaryAmt, %SecondaryAmt, newRoute, newRouteStep, newLocation, disposition); 6-74 Chapter 6

Receive

The Receive method receives inventory to an existing sublot. (For new sublots, use the Create method.) The Receive method contains parameters for primary and secondary quantities (Amount objects). Before calling Receive, create an Amount object for each quantity and set the properties.

Syntax returnCode = %Sublot_Object.Receive(%PrimaryAmt, %SecondaryAmt, vendorID, vendorLotID); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to receive into inventory %SecondaryAmt Object Object Amount object, secondary quantity to receive into inventory vendorID Message String Name of the company providing the inventory material vendorLotID Message String Vendor company’s lot identifier for the inventory material Activity Objects 6-75

Example — Receiving Bulk Inventory The following script is used in conjunction with an InTrack Bulk Inventory Selector to receive bulk inventory using the Receive method of the Sublot class (%Sublot_Object). This example receives 95,450 “arbit” units of the selected inventory lot.

Note: The vendorID and vendorLotID are always defined as Message tags. For practical purposes, integer type tags could readily replace the values used show in the example.

The Selector name is inserted in place of the “SelectorNameHere” placeholder as follows:

OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); OLE_CreateObject(%SecondaryAmt, “InTrack.Amount”); OLE_CreateObject(%Sublot_Object, “InTrack.Sublot”); OLE_CreateObject(%Selector, “InTrack.Selector”);

%Selector.AttachTo(“SelectorNameHere”); IF %Selector.Selection <> “” THEN %Sublot_Object.SublotKey = %Selector.Selection;

%PrimaryAmt.Quantity = 95450; %PrimaryAmt.Units = “arbit”;

%SecondaryAmt.Quantity = 1; %SecondaryAmt.Units = “arbit”; vendorID = “VendorID”; vendorLotID = “VendorLotID”; returnCode = %Sublot_Object.Receive(%PrimaryAmt, %SecondaryAmt, vendorID, vendorLotID);

ENDIF;

Note: The SublotKey property of a Sublot class object for Bulk Inventory is a Message type property which takes on the form as:

“MaterialName[MaterialVersion]@Location”

The SublotKey property of a Sublot class object for Lot Inventory is also a Message String type but takes on the simple form (where the “@Location” part is optional):

“LotID@Location” 6-76 Chapter 6

Example — Receiving into existing Inventory The following script is used to receive inventory into an existing lot using the Receive method of the Sublot class (%Sublot_Object). This example receives 95,450 “arbit” units into the existing inventory lot "Lot_123" in location "Receiving".

Note: The vendorID and vendorLotID are always defined as Message tags. For practical purposes, integer type tags could readily replace the values used in the example.

OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); OLE_CreateObject(%SecondaryAmt, “InTrack.Amount”); OLE_CreateObject(%Sublot_Object, “InTrack.Sublot”); %Sublot_Object.SublotKey = "Lot_123@Receiving";

%PrimaryAmt.Quantity = 95450; %PrimaryAmt.Units = “arbit”;

%SecondaryAmt.Quantity = 1; %SecondaryAmt.Units = “arbit”;

vendorID = “VendorID”; vendorLotID = “VendorLotID”;

returnCode = %Sublot_Object.Receive(%PrimaryAmt, %SecondaryAmt, vendorID, vendorLotID); Activity Objects 6-77

RemoveSerialNumbers

The RemoveSerialNumbers method removes serial numbers from a Sublot object. The RemoveSerialNumbers method can remove serial numbers from a started, queued, or closed amount, depending on the isQueued parameter.

Notes 1. This method does not remove quantity from a sublot—it removes serial numbers from existing units. 2. Closed quantity in a sublot is reflected as “queued” in the QueuedQty column of the Sublot table in InTrack the database.

Syntax returnCode = %Sublot_Object.RemoveSerialNumbers(serialNumber, isQueued); returnCode = %Sublot_Object.RemoveSerialNumbers(%SerialNumbers, isQueued); where:

Data Type Data Type Parameter (InTouch) (VB) Description

serialNumber Message String Serial number(s) to remove; can be a sequence of serial numbers separated by commas %SerialNumbers Object Object SerialNumbers object, serial number(s) to remove isQueued Discrete Boolean Boolean value indicating that the serial numbers are being removed from sublot quantity that is: –1 = queued 0 = started 6-78 Chapter 6

Scrap

This method handles scrap with or without sublot quantities at a machine. The sublot quantity to the scrap transaction is determined by route name and version, route step name, location name and optional machine name. The decrease in primary quantity (if specified) resulting from the scrap transaction applies to either the queued or in-process quantity as determined by the operation type. The InTrack completion capabilities (scrap) are preserved in sublot.Complete and sublot.CompleteOnMachine methods. The sublot.Scrap transaction is similar to the complete and complete-on-machine transactions, but records the scrap event on any route and route step (at route and step). The sublot.Scrap method requires the scrap disposition code to be associated with the at route step. The scrap transaction also allows you to decrement the lot’s primary quantity. If the decrement quantity argument is TRUE, then the lot’s primary quantity is decreased by the transaction quantity independently of the specification of the route step where the scrap occurs. The sublot.Scrap transaction does not support forced completion.

Note: Since the force completion flag is a property of the CompleteItem class, the machine.Complete method supports this flag for a scrap completion transaction on a machine, and the sublot.Complete and sublot.CompleteOnMachine methods support forced completion for a scrap disposition code

Since the scrap method is a variation of the existing lot completion transaction, the transaction log for this scrap method uses the existing CompleteLog table. The FromRouteName, FromRouteVersion, FromRouteStepName, FromOperationName and FromOperationVersion columns in the CompleteLog table record the route step to where the scrap is applied (AtRoute and AtRouteStep properties) . The RouteName, RouteVersion, RouteStepName, OperationName and OperationVersion columns in the LotBaseLog table record the route step where the sublot is located when the scrap transaction occurs. The lot.Undo method (when undoing a sublot scrap transaction ) determines if the lot’s primary quantity needs to be incremented. If the completion type is SCRAP_NO_DEC (a value stored in the CompletionType column of the CompleteLog table), then the undo logic will not increment the primary lot quantity. Activity Objects 6-79

Syntax returnCode = %Sublot_Object.Scrap(%PrimaryAmt, %SecondaryAmt, DispositionCode, Machine, AtRoute, AtRouteStep, UpdateQuantity); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary amount to scrap %SecondaryAmt Object Object Amount object, secondary amount to scrap DispositionCode Message String NameKey of disposition code Machine Message String NameKey of the machine with sublot quantity AtRoute Message String VersionKey of the route for recording scrap AtRouteStep Message String NameKey of the route step for recording scrap UpdateQuantity Discrete Boolean Boolean value indicating to decrement the primary quantity of the sublot: –1 = decrement 0 = do not decrement 6-80 Chapter 6

SetKeyItems

The SetKeyItems method updates the SublotKey of a Sublot object.

Syntax returnCode = %Sublot_Object.SetKeyItems(lotID, routeName, routeVersion, routeStepName, locationName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

lotID Message String Lot identifier routeName Message String Route name; for a bulk material, this parameter is defined as NONE routeVersion Message String Route version name; for a bulk material, this parameter is defined as NONE routeStepName Message String Route step name; for a bulk material, this parameter is defined as NONE locationName Message String Sublot location

SetQueuedAmount

The SetQueuedAmount method updates the QueuedAmt property of a Sublot object. The SetQueuedAmount method contains a parameter for the primary quantity (Amount object). Before calling SetQueuedAmount, create an Amount object to represent the quantity and set the properties.

Note: You can serialize a sublot with the SetQueuedAmount method by passing an Amount object containing serial numbers into the queuedAmt parameter of the method call.

Syntax returnCode = %Sublot_Object.SetQueuedAmount(%QueuedAmt); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%QueuedAmt Object Object Amount object, new primary quantity Activity Objects 6-81

SetRouteStep

The SetRouteStep method updates the RouteStep property of a Sublot object.

Syntax returnCode = %Sublot_Object.SetRouteStep(toRouteStep); where:

Data Type Data Type Parameter (InTouch) (VB) Description

toRouteStep Message String NameKey of the route step to which to move the sublot

SetStartedAmount

The SetStartedAmount method updates the StartedAmt property of a Sublot object. The SetStartedAmount method contains a parameter for the primary quantity (Amount object). Before calling SetStartedAmount, create an Amount object to represent the quantity and set the properties.

Note: You can serialize a sublot with the SetStartedAmount method by passing an Amount object containing serial numbers into the %StartedAmt parameter of the method call.

Syntax returnCode = %Sublot_Object.SetStartedAmount(%StartedAmt); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%StartedAmt Object Object Amount object, new primary quantity 6-82 Chapter 6

SetUDA

The SetUDA method updates the value of a specified UDA.

Syntax returnCode = %Sublot_Object.SetUDA(itemName, value); where:

Data Type Data Type Parameter (InTouch) (VB) Description

itemName Message String UDA name value var VARIANT UDA value to change (UDA value must be of one of the following data types: Integer, Real, Message, Object Date, Object DateTime, Object Time, Object TimeInterval)

Ship

The Ship method tracks finished goods inventory being shipped to customers and removes the shipped quantity from the database.

Note: A sublot belonging to a lot on hold or in quarantine cannot be shipped.

The Ship method contains parameters for primary and secondary quantities (Amount objects). Before calling Ship, create an Amount object for each quantity and set the properties.

Syntax returnCode = %Sublot_Object.Ship(%PrimaryAmt, %SecondaryAmt, customerName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to ship %SecondaryAmt Object Object Amount object, secondary quantity to ship customerName Message String Name of the customer receiving the shipment Activity Objects 6-83

Split

The Split method splits a single sublot into a new lot and creates a corresponding sublot that is tracked independently of the original sublot. A sublot must be queued at an operation or closed before it can be split. Split lots inherit the same priority level and due date of the original sublot, but you can specify a new priority level through the priority parameter and a new due date though the %NewDueDate parameter. The Split method contains parameters for primary and secondary quantities (Amount objects). Split also contains a parameter for the new due date (DateTime object). Before calling Split, create and set properties for an Amount object for each quantity and a DateTime object for the new due date.

Syntax returnCode = %Sublot_Object.Split(%PrimaryAmt, %SecondaryAmt, newLotID, priority, %NewDueDate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity of the original sublot to split into a new lot and corresponding sublot %SecondaryAmt Object Object Amount object, secondary quantity of the original sublot to split into a new lot and corresponding sublot newLotID Message String NameKey representing a unique identifier for the new lot and corresponding sublot created as a result of the split priority Integer (short) Priority level of the new lot and corresponding sublot %NewDueDate Object Object DateTime object, date, other than the date of the original sublot, that the new lot and corresponding sublot is expected to complete processing on the route 6-84 Chapter 6

Example — Splitting a Sublot The following script splits a sublot with the split method of a Sublot object (%Sublot_Object). This example splits a quantity of 100 units from step 1 of Lot_123, creating the new lot, Lot_124, which has a priority of 1 and a due date of April 15, 1995 at 11:59:59. The primary and secondary amount quantities to split are represented by Amount objects, %PrimaryAmt and %SecondaryAmt, respectively. The new due date of the new lot is represented by a DateTime object, %NewDueDate. 1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, “InTrack.Sublot”); 2. Set the SublotKey to the sublot to split. %Sublot_Object.SublotKey = “Lot_123@waterroute[1]:step1”; 3. Create an Amount object to represent the primary quantity to split. OLE_CreateObject(%PrimaryAmt, “InTrack.Amount”); %PrimaryAmt.Quantity = 100; %PrimaryAmt.Units = “units”; 4. Create an Amount object to represent the secondary quantity to split. OLE_CreateObject(%SecondaryAmt, “InTrack.Amount”); %SecondaryAmt.Quantity = 1200; %SecondaryAmt.Units = “ounces”; 5. Name the new lot created as a result of the split. newLotID = “Lot_124”; 6. Create a DateTime object to represent the new due date of the new lot. OLE_CreateObject(%NewDueDate, “InTrack.DateTime”); %NewDueDate.Month = 4; %NewDueDate.Day = 15; %NewDueDate.Year = 1996; %NewDueDate.Hour = 11; %NewDueDate.Minute = 59; %NewDueDate.Second = 59; 7. Call the Split method. returnCode = %Sublot_Object.Split(%PrimaryAmt, %SecondaryAmt, newLotID, 1, %NewDueDate); Activity Objects 6-85

Start

The Start method changes the specified quantity of a single sublot from “queued” to “in-process” at an operation. Two other methods will start quantity: To specify the machine on which to start a specified quantity of a single sublot with a Sublot object, use the StartOnMachine. To start multiple sublots on a specific machine, use the Start method of the Machine class.

Note: A sublot belonging to a lot on hold cannot be started. If an operation is defined as “Complete Only”, do not use the Start method. A “Complete Only” operation only tracks sublot quantities when they complete an operation, not when they are in-process. A warning message will display if a Start method is attempted for a “Complete Only” operation.

The Start method contains parameters for primary and secondary quantities (Amount objects). Before calling Start, create an Amount object for each quantity and set the properties.

Syntax returnCode = %Sublot_Object.Start(%PrimaryAmt, %SecondaryAmt, overrideQueueTime); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to change from queued to in-process %SecondaryAmt Object Object Amount object, secondary quantity to change from queued to in-process overrideQueueTime Discrete Boolean Boolean value indicating to ignore the maximum time allowed between operations where: –1 = ignore 0 = do not ignore 6-86 Chapter 6

StartOnMachine

The StartOnMachine method lets you specify the machine on which to change the specified quantity of a single sublot from “queued” to “in-process” at an operation. Two other methods will start quantity: To start a specified quantity of a single sublot, use the Start method. To start multiple sublots on a specific machine, use the Start method of the Machine class. The StartOnMachine method contains parameters for primary and secondary quantities that are automation objects of the Amount class. Before calling StartOnMachine, create an automation object for each amount quantity and set the properties.

Syntax returnCode = %Sublot_Object.StartOnMachine(%PrimaryAmt, %SecondaryAmt, overrideQueueTime, machine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%PrimaryAmt Object Object Amount object, primary quantity to change from queued to in-process %SecondaryAmt Object Object Amount object, secondary quantity to change from queued to in-process overrideQueueTime Discrete Boolean Boolean value indicating to ignore the maximum time allowed between operations where: –1 = ignore 0 = do not ignore machine Message String NameKey of the machine on which to start the sublot Activity Objects 6-87

Unassemble

The Unassemble method tracks the removal of previously consumed (assembled) material from a sublot. Either the consumed material or the unit that does the consumption also can be serialized. The component being disassembled can be moved to inventory or to another operation on any route (it does not have to be returned to the lot from where it came) as a WIP sublot. The previously consumed sublot does not need to exist in the InTrack database). Similarly, the destination sublot for the disassembled material does not have to exist in InTrack. Also, the primary quantity of the destination sublot can be incremented. A scrapped component must be moved to an operation that has the necessary scrap disposition codes defined. The material must be consumed before it can be disassembled. The disassembled material does not need to be defined as an input material to the product at an operation. The consumption and disassembly do not need to occur at the same route step. The consumption may have occurred at one or more previous route steps and at multiple times at any given route step. The Unassemble method is a variation of the Disassemble method, which is used for all modeled material consumption. The DisassembleLog table stores information about the unassemble transaction. This information is used by the lot.Undo method to undo an unassemble transaction.

Syntax returnCode = Sublot_Object.Unassemble(%consumerSerialNumber,%DisassembleItem); where:

Data Type Data Type Parameter (InTouch) (VB) Description

consumerSerialNumber Message String Serial number of unit for which the original consumption was performed (can be NONE) %DisassembleItem Object Object DisassembleItem(s) objects, sublot(s) and amount(s) to disassemble 6-88 Chapter 6

UpdateCompletionDate

The UpdateCompletionDate method recomputes the value of the completion date for the sublot, updates the value in the database, and returns the updated value in the %CompletionDate parameter. Normally, the method is used after a transaction that affects the completion date has been performed. The UpdateCompletionDate method calculates a sublot’s completion date based on the current time, the current position on the route, the remaining operation cycle times, and the calendar. The sublot is assumed to follow the main exit for all remaining route steps. This method uses the current system time as the starting point for the value calculation. If you need to determine the completion date based on the start date of the sublot, use the GetCompletionDate method.

Note: The value of the SublotKey property must be set before calling this method.

Syntax returnCode = %Sublot_Object.UpdateCompletionDate(%CompletionDate); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%CompletionDate Object Object Returned DateTime object indicating the updated expected completion date and time

Example — Updating a Completion Date The following script creates a Sublot object, then uses the UpdateCompletionDate method to update the completion date for the sublot. 1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, "InTrack.Sublot"); 2. Set the SublotKey. %Sublot_Object.SublotKey = "lot123@route[version1]:step1"; 3. Call the UpdateCompletionDate method. returnCode = %Sublot_Object.UpdateCompletionDate(%NewDateTime); Activity Objects 6-89

UpdateConsumptionFlag

The UpdateConsumptionFlag method recomputes the value of the consumption done flag for the sublot, updates the value in the database, and returns the updated value in the consumptionFlag parameter. Normally, the method is used after a transaction that affects the consumption done flag value has been performed.

Note: The value of the SublotKey property must be set before calling this method.

Syntax returnCode = %Sublot_Object.UpdateConsumptionFlag(consumptionFlag); where:

Data Type Data Type Parameter (InTouch) (VB) Description

consumptionFlag Discrete Boolean Returned Boolean value that all material consumption for sublot has been performed at route step: –1 = yes 0 = no

Example — Updating the Consumption Flag The following script creates a Sublot object, then uses the UpdateConsumptionFlag method to update the consumption flag for the sublot in the database. 1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, "InTrack.Sublot"); 2. Set the SublotKey. %Sublot_Object.SublotKey = "lot123@route[version1]:step1"; 3. Call the UpdateConsumptionFlag method. returnCode = %Sublot_Object.UpdateConsumptionFlag(newFlag); 6-90 Chapter 6

UpdateCriticalRatio

The UpdateCriticalRatio method recalculates the value of the critical ratio for the sublot, updates the value in the database, and returns the updated value in the ratio parameter. The critical ratio is calculated as: time until due date Critical ratio = ———————————— processing time remaining A value greater than 1 means there is sufficient time to finish processing the item before the DueDate. Normally, the method is used after a transaction that affects the critical ratio has been performed. This method uses the current system time, then calls the completion date to determine the critical ratio. Only the ratio is written to the database.

Note: The value of the SublotKey property must be set before calling this method.

Syntax returnCode = %Sublot_Object.UpdateCriticalRatio(ratio); where:

Data Type Data Type Parameter (InTouch) (VB) Description

ratio Real Double Returned new critical ratio value for the sublot

Example — Updating a Critical Ratio Value The following script creates a Sublot object and uses the UpdateCriticalRatio method to update the critical ratio value for the sublot. 1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, "InTrack.Sublot"); 2. Set the SublotKey. %Sublot_Object.SublotKey = "lot123@route[version1]:step1"; 3. Call the UpdateCriticalRatio method. returnCode = %Sublot_Object.UpdateCriticalRatio(ratio); Activity Objects 6-91

UpdateDataCollectFlag

The UpdateDataCollectFlag method recomputes the value of the data collection done flag for the sublot, updates the value in the database, and returns the updated value in the collectionDone parameter. Normally, the method is used after a transaction that affects data collection has been performed on the lot.

Note: The value of the SublotKey property must be set before calling this method.

Syntax returnCode = %Sublot_Object.UpdateDataCollectFlag(collectionDone); where:

Data Type Data Type Parameter (InTouch) (VB) Description

collectionDone Discrete Boolean Returned Boolean value that data collection has been done for the sublot: –1 = done 0 = not done

Example — Updating a Data Collection Flag The following script creates a Sublot object, then uses the UpdateDataCollectFlag method to update the data collection done flag for the sublot. 1. Create a Sublot object. OLE_CreateObject(%Sublot_Object, "InTrack.Sublot"); 2. Set the SublotKey. %Sublot_Object.SublotKey = "lot123@route[version1]:step1"; 3. Call the UpdateDataCollectFlag method. returnCode = %Sublot_Object.UpdateDataCollectFlag(flag); 7-1

CHAPTER 7

Dialog Objects

The object classes in the Dialog category create predefined runtime transaction dialog boxes that perform lot and sublot transactions or resource tracking. Dialog objects are used primarily with InTouch.

NOTE: Dialog objects are no longer supported. Existing objects are supplied for backward compatibility only. No further enhancements will be made to these objects.

The fields in each dialog box are preset and reflect the properties of a given object class. The properties are the values needed to perform the transaction and, with the exception of the initial value properties and dialog completion tag, are set through the data-entry fields of the dialog box. Most dialogs have two types of properties: the initial value property, which is mandatory for all object classes that contain it, and the dialog completion tag name property, which is optional. These properties and the common dialog starting method work together as follows: 1. Values are assigned to the initial value properties (Sublot, Machine, RepairID) and the dialog completion tag name. The initial value properties should be set to the default values the user needs to see when the dialog box is displayed in runtime. A SublotKey (named Sublot) is required for dialogs that act on sublots. A Machine Name or Repair ID is required for all dialogs that perform resource tracking. The dialog completion tag should be set to the name of a tag to which any important dialog completion script has been attached as a condition script. 2. After the properties have been set in the script, call the Launch method of the dialog. This method causes the dialog object’s properties to be copied onto a queue. The Launch method always returns immediately. If there is no dialog shown to the runtime user when the Launch method is invoked, the requested dialog is displayed immediately in the runtime application. If a dialog is presently displayed in runtime, the newly launched dialog is displayed after the user completes the transaction in the currently displayed dialog. The Launch method of each dialog returns a Boolean (discrete) value indicating whether the dialog was displayed or queued. If it is displayed immediately, the returned value = 0. If it is queued, the returned value = -1. When the user selects a command button that causes the dialog box to close, the discrete tag indicated by the DoneFlagName property will be set to the value –1.

NOTE: Dialog objects cannot be used on sublots that contain serial numbers. 7-2 Chapter 7

Example This example creates a dialog with a Dialog.Start object (%Dialog_Start_Object) that starts a WIP lot. This dialog starts sublot “Lot_123 at step 1 on water route 1”. The created dialog contains data entry fields so the user can specify the primary amount to start, the secondary amount to start, and whether to ignore the queue time.

Note: DoneFlag and boolTag must be defined as Discrete data types.

1. Create a Dialog.Start object. OLE_CreateObject(%Dialog_Start_Object, “InTrack.Dialog.Start”); 2. Set the Sublot property to the sublot to start. %Dialog_Start_Object.Sublot = “Lot_123@waterroute[1]:step1”; 3. Set the DoneFlagName property (dialog completion tag). %Dialog_Start_Object.DoneFlagName = "DoneFlag"; 4. Call the Launch method. boolTag = %Dialog_Start_Object.Launch(); Dialog Objects 7-3

Contents Dialog.Adjust Object Class, 4 Dialog.Close Object Class, 5 Dialog.CloseRepair Object Class, 6 Dialog.Collect Object Class, 7 Dialog.Comment Object Class, 8 Dialog.Complete Object Class, 9 Dialog.CompleteTask Object Class, 10 Dialog.Connect Object Class, 11 Dialog.Consume Object Class, 12 Dialog.Create Object Class, 13 Dialog.Delete Object Class, 14 Dialog.Detail Object Class, 15 Dialog.Disconnect Object Class, 16 Dialog.Filter Object Class, 17 Dialog.Instruct Object Class, 19 Dialog.LogIn Object Class, 20 Dialog.LogOut Object Class, 21 Dialog.MachineStatus Object Class, 22 Dialog.Merge Object Class, 23 Dialog.Move Object Class, 24 Dialog.OpenRepair Object Class, 25 Dialog.Purge Object Class, 26 Dialog.Receive Object Class, 27 Dialog.Ship Object Class, 28 Dialog.Split Object Class, 29 Dialog.Start Object Class, 30 Dialog.StartTask Object Class, 31 Dialog.Status Object Class, 32 Dialog.Undo Object Class, 33 Dialog.UpdateRepair Object Class, 34

7-4 Chapter 7

Dialog.Adjust Object Class

A Dialog.Adjust object displays an Adjust dialog box, in which a user can make corrections and adjustments to attributes of a specified sublot of a WIP lot, inventory lot, or bulk material.

Properties

The following table describes the properties of a Dialog.Adjust object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot to adjust DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Adjust object.

Launch

The Launch method queues the command to display an Adjust dialog box with the defined properties.

Syntax boolTag = %Dialog_Adjust_Object.Launch(); Dialog Objects 7-5

Dialog.Close Object Class

A Dialog.Close object displays the Close WIP dialog box, in which a user can move quantities that have completed the route into inventory. The Close WIP dialog box normally is used at the last step on a route.

Note: To move a coproduct or by-product to inventory, use a Dialog.Complete object.

Properties

The following table describes the properties of a Dialog.Close object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot to close DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Close object.

Launch

The Launch method queues the command to display the Close WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Close_Object.Launch(); 7-6 Chapter 7

Dialog.CloseRepair Object Class

A Dialog.CloseRepair object displays the Close Repair dialog box, in which a user can close a repair order for a specified machine.

Note: Use a Dialog.OpenRepair object to open a machine repair and a Dialog.CloseRepair object to close a machine repair. Between these two automation objects, as machine repairs are started and stopped (but not completed), use a Dialog.UpdateRepair object.

Properties The following table describes the properties of a Dialog.CloseRepair object.

Property Data Type Access Description

Machine Message r/w NameKey of the machine on which to close a repair RepairID Message r/w (optional) Repair transaction to close StopMachine Discrete r/w Boolean value that machine is after repair is closed: –1 = not usable (default) 0 = usable Comment Message r/w (optional) Comments DoneFlagName Message r/w Name of the DoneFlag tag

Method This section describes the method for a Dialog.CloseRepair object.

Launch

The Launch method queues the command to display the Close Repair dialog box with the defined properties.

Syntax boolTag = %Dialog_CloseRepair_Object.Launch(); Dialog Objects 7-7

Dialog.Collect Object Class

A Dialog.Collect object displays the DataSet for WIP dialog box, in which a user can collect engineering data along a route. Engineering data provides in-process quality checks for tracking, analysis, and reporting. Information collected during runtime is entered in data collection sets (or data set templates) that were defined in ModelMaker. Data collection sets can be defined to request single and multiple data samples. They can be defined as a required procedure in an operation.

Properties

The following table describes the properties of a Dialog.Collect object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot for which to collect data DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Collect object.

Launch

The Launch method queues the command to display the DataSet for WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Collect_Object.Launch(); 7-8 Chapter 7

Dialog.Comment Object Class

A Dialog.Comment object displays a Comment dialog box, in which a user can log a comment for a specified sublot of a WIP lot, inventory lot, or bulk inventory. The comments are stored in the LotBaseLog table, and are referenced through the CommentLog table. The comment file records the ID of the logged-on user, the time stamp the comments are entered, and the lot ID.

Properties

The following table describes the properties of a Dialog.Comment object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot for which to log a comment DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Comment object.

Launch

The Launch method queues the command to display a Comment dialog box with the defined properties.

Syntax boolTag = %Dialog_Comment_Object.Launch(); Dialog Objects 7-9

Dialog.Complete Object Class

A Dialog.Complete object displays the Complete WIP dialog box, in which a user can complete a sublot at the current operation and disposition quantities according to the assigned disposition code.

Note: A Dialog.Complete object can be used only with disposition options other than closing the entire sublot to inventory (for example, closing a sublot to inventory or closing a sublot to another route). If closing the entire sublot to inventory is the only option, use a Dialog.Close object.

Properties

The following table describes the properties of a Dialog.Complete object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot to complete DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Complete object.

Launch

The Launch method queues the command to display the Complete WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Complete_Object.Launch(); 7-10 Chapter 7

Dialog.CompleteTask Object Class

A Dialog.CompleteTask object displays the Complete Task dialog box in which a user can complete a machine task, starting the clock for the next maintenance cycle. A task can be periodic (after 20 starts, recalibrate the machine) or nonperiodic (recalibrate the machine at any one time).

Properties

The following table describes the properties of a Dialog.CompleteTask object.

Property Data Type Access Description

Machine Message r/w NameKey of the machine for which to complete a task Task Message r/w (optional) Initial task to perform; if a task is not specified, unstarted tasks for the specified machine are performed in alphabetical order Note: Tasks not defined for the machine or already started cannot be used StopMachine Discrete r/w Boolean value that the machine is usable after the task is completed: –1 = not usable 0 = usable Comment Message r/w (optional) Comments DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.CompleteTask object.

Launch

The Launch method queues the command to display the Complete Task dialog box with the defined properties.

Syntax boolTag = %Dialog_CompleteTask_Object.Launch(); Dialog Objects 7-11

Dialog.Connect Object Class

A Dialog.Connect object displays the InTrack Logon dialog box, in which a user can connect to the configured InTrack database and log on to the runtime application.

Note: A Dialog.Connect object automatically logs on the user specified in the User data-entry field of the InTrack Logon dialog box.

Properties

The following table describes the properties of a Dialog.Connect object.

Property Data Type Access Description

DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Connect object.

Launch

The Launch method queues the command to display the InTrack Logon dialog box with the defined properties.

Syntax boolTag = %Dialog_Connect_Object.Launch();

7-12 Chapter 7

Dialog.Consume Object Class

A Dialog.Consume object displays the Consume Materials for WIP dialog box, in which a user can specify the materials and quantities to consume at an operation. Material can be consumed only for a target material that is manufactured with a bill of material. The following conditions must exist to consume material: The operation must have input material assigned to the route step. The material must already be received into inventory. The consuming sublot must be in-process is the operation is start-and-complete. The consuming lot must not be on hold.

Notes: The inventory quantity is automatically reduced by the quantity consumed. If the quantity of a consumable material from an inventory lot is depleted, however, the lot ID may remain listed in the Inventory Lot Selector, even though the quantity is zero. The Consume dialog object cannot be used for lots started on a machine.

Properties

The following table describes the properties of a Dialog.Consume object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot for which to consume material DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Consume object.

Launch

The Launch method queues the command to display the Consume Materials for WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Consume_Object.Launch(); Dialog Objects 7-13

Dialog.Create Object Class

A Dialog.Create object displays the Create WIP dialog box, in which a user can create a new WIP lot (and sublot) and queue it to begin processing at a selected step of a manufacturing route.

Properties

The following table describes the properties of a Dialog.Create object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the lot (and sublot) to create DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Create object.

Launch

The Launch method queues the command to display the Create WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Create_Object.Launch(); 7-14 Chapter 7

Dialog.Delete Object Class

A Dialog.Delete object lets the user delete a lot that has a primary quantity of zero from the database.

Properties

The following table describes the properties of a Dialog.Delete object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot to delete DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Delete object.

Launch

The Launch method queues the command to delete a specified lot from the database.

Syntax boolTag = %Dialog_Delete_Object.Launch(); Dialog Objects 7-15

Dialog.Detail Object Class

A Dialog.Detail object displays the Details for WIP dialog box, in which a user can view the following information about a selected sublot of a WIP lot: General information about the WIP lot (for example, status, due date) Quantity information Details about a sublot’s current operation

Properties

The following table describes the properties of a Dialog.Detail object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot for which to display details DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Detail object.

Launch

The Launch method queues the command to display the Details for WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Detail_Object.Launch(); 7-16 Chapter 7

Dialog.Disconnect Object Class

A Dialog.Disconnect object disconnects the logged-on user from an InTrack database.

Property

The following table describes the property of a Dialog.Disconnect object.

Property Data Type Access Description

DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Disconnect object.

Launch

The Launch method queues the command to disconnect from the InTrack database.

Syntax boolTag = %Dialog_Disconnect_Object.Launch(); Dialog Objects 7-17

Dialog.Filter Object Class

A Dialog.Filter object displays a Configuration dialog box, in which a user can use parameters to specify the group of sublots to display in the corresponding selector.

Properties

The following table describes the properties of a Dialog.Filter object.

Property Data Type Access Description

Type Integer (long) r/w Code that indicates the selector type: 0 = WIP lot 1 = inventory lot 2 = bulk inventory 3 = machine DoneFlagName Message r/w Name of the DoneFlag tag

Methods

This section describes the methods for a Dialog.Filter object.

Launch

The Launch method queues the command to display a Configuration dialog box with the defined properties.

Note: Before calling this method, the SetSelector method must be called to specify the name of the selector for which to launch the Configuration dialog box.

Syntax boolTag = %Dialog_Filter_Object.Launch();

SetSelector

The SetSelector method specifies the selector to configure. This method must be called before calling the Launch method.

Note: The selector name specified must be legal. A legal selector is one that exists when the method is called, and is of the same type as the configuration dialog. (This is the name of the actual selector window, not the name of a Selector object.) If the selector is not legal, an error will be returned, and the Launch method will fail when called. 7-18 Chapter 7

Syntax returnCode = %Dialog_Filter_Object.SetSelector(selName); where:

Parameter Data Type Description

selName Message Name of the user interface selector window, as specified in the setup of the selector

Example The following script creates a configuration dialog for a WIP selector. 1. Create a Dialog.Filter object. OLE_CreateObject(%ItDlg, "InTrack.Dialog.Filter"); 2. Set the Type property of the object to indicate a WIP selector. %ItDlg.Type = 0; 3. Specify the name of the WIP selector to configure. returnCode = %ItDlg.SetSelector("A WIP Selector"); 4. Launch the Configuration dialog box. returnCode = %ItDlg.Launch(); Dialog Objects 7-19

Dialog.Instruct Object Class

A Dialog.Instruct object displays the Work Instruction for Lot dialog box, in which a user can view work instructions that were assigned to an operation in ModelMaker. The work instructions can contain text, graphics, CAD drawings, spreadsheets, etc.

Note: Use the created Work Instruction for Lot dialog box to view work instructions obtained with a WorkInstructions object. For internal work instructions, it is recommended that, as part of the application system test, you verify that the information is displayed in viewable form in the dialog box.

Properties

The following table describes the properties of a Dialog.Instruct object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot for which to display work instructions FileName Message r/w Name of the file containing work instructions; if the FileName property is not set, the file corresponding to the Sublot property is displayed; if the FileName property is set, the selected file is displayed, regardless of the Sublot property setting DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Instruct object.

Launch

The Launch method queues the command to display the Work Instruction for Lot dialog box with the defined properties.

Syntax boolTag = %Dialog_Instruct_Object.Launch(); 7-20 Chapter 7

Dialog.LogIn Object Class

A Dialog.LogIn object displays the InTrack Logon dialog box, in which a user can log on to the runtime application. If a user is logged on at the time the new user logs on, the previous user is automatically logged off.

Properties

The following table describes the properties of a Dialog.LogIn object.

Property Data Type Access Description

DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.LogIn object.

Launch

The Launch method queues the command to display the InTrack Logon dialog box with the defined properties.

Syntax boolTag = %Dialog_LogIn_Object.Launch(); Dialog Objects 7-21

Dialog.LogOut Object Class

A Dialog.LogOut object logs the logged-on user off the runtime application. The database connection is maintained when a user logs off so that multiple users can log on and off an InTrack runtime application in succession without disconnecting and terminating the database connection.

Property

The following table describes the property of a Dialog.LogOut object.

Property Data Type Access Description

DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.LogOut object.

Launch

The Launch method queues the command to log the logged-on user off the runtime application.

Syntax boolTag = %Dialog_LogOut_Object.Launch(); 7-22 Chapter 7

Dialog.MachineStatus Object Class

A Dialog.MachineStatus object displays the Machine Status dialog box in which a user can permit or prevent machine starts on a specified machine at runtime.

Properties

The following table describes the properties of a Dialog.MachineStatus object.

Property Data Type Access Description

Machine Message r/w NameKey of the machine for which to change status StopMachine Discrete r/w Boolean value that the machine is: –1 = not usable 0 = usable Comment Message r/w (optional) Comments DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.MachineStatus object.

Launch

The Launch method queues the command to display the Machine Status dialog box with the defined properties.

Syntax boolTag = %Dialog_MachineStatus_Object.Launch(); Dialog Objects 7-23

Dialog.Merge Object Class

A Dialog.Merge object displays the Merge Into WIP dialog box, in which a runtime user can combine sublots with a target sublot. The Merge Into WIP dialog box displays a list of eligible sublots and the runtime user selects one sublot to merge at a time, repeating the process as many times as necessary.

Note: Only sublots with the same status, queued at the same operation and producing the same product can be merged.

Properties

The following table describes the properties of a Dialog.Merge object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the target sublot DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Merge object.

Launch

The Launch method queues the command to display the Merge Into WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Merge_Object.Launch(); 7-24 Chapter 7

Dialog.Move Object Class

A Dialog.Move object displays a Move dialog box, in which a user can move material to another step or location (or both), depending on the value of the Type property. If moving a WIP sublot, material can be moved to: A specific step on the same route or a different route Another location on the same route or a different route A specific step and location on the same route or a different route To perform a WIP move, a sublot must be queued at an operation. If moving an inventory sublot or bulk inventory, material can be moved to another location.

Properties

The following table describes the properties of a Dialog.Move object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot to move Type Integer r/w Value indicating which type of Move dialog box to launch where: 0 = WIP 1 = Inventory Lot 2 = Bulk Inventory Note: Any value other than 0, 1, or 2 defaults to 0. DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Move object.

Launch

The Launch method queues the command to display the Move WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Move_Object.Launch(); Dialog Objects 7-25

Dialog.OpenRepair Object Class

A Dialog.OpenRepair object displays the Open Repair dialog box in which the user can open a repair order for a specified machine.

Notes 1. Use a Dialog.OpenRepair object to open a machine repair and a Dialog.CloseRepair object to close a machine repair. Between these two automation objects, as machine repairs are started and stopped (but not completed), use a Dialog.UpdateRepair object.

2. Only one repair can be opened for a machine at any one time.

Properties

The following table describes the properties of a Dialog.OpenRepair object.

Property Data Type Access Description

Machine Message r/w NameKey of the machine for which to open a repair Symptom Message r/w Machine symptom that initiated the repair StopMachine Discrete r/w Boolean value that machine is usable during the repair: –1 = not usable (default) 0 = usable Comment Message r/w (optional) Comments DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.OpenRepair object.

Launch

The Launch method queues the command to display the Open Repair dialog box with the defined properties.

Syntax boolTag = %Dialog_OpenRepair_Object.Launch(); 7-26 Chapter 7

Dialog.Purge Object Class

A Dialog.Purge object displays the Database Purge dialog box, in which a user can delete all lots (and their corresponding sublots) from the database that have a quantity of zero and have been inactive for a specified length of time.

Property

The following table describes the property of a Dialog.Purge object.

Property Data Type Access Description

DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Purge object.

Launch

The Launch method queues the command to display the Database Purge dialog box with the defined properties.

Syntax boolTag = %Dialog_Purge_Object.Launch(); Dialog Objects 7-27

Dialog.Receive Object Class

A Dialog.Receive object displays a Receive dialog box, in which a user can receive inventory. Consumable materials must first be received as inventory before they can be consumed at an operation.

Note: If you use a Dialog.Receive object to receive inventory and set the SublotKey to an existing sublot, the existing sublot is incremented by the amount specified in the method call. A new sublot is not created.

Properties

The following table describes the properties of a Dialog.Receive object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot material to receive Type Integer r/w Value indicating which type of Receive dialog box to launch where: 1 = Inventory Lot 2 = Bulk Inventory Note: Any value other than 1 or 2 defaults to 1. DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Receive object.

Launch

The Launch method queues the command to display a Receive dialog box with the defined properties.

Syntax boolTag = %Dialog_Receive_Object.Launch(); 7-28 Chapter 7

Dialog.Ship Object Class

A Dialog.Ship object displays a Ship dialog box, in which a user can track finished goods inventory being shipped to customers and remove the shipped quantity from the database.

Note: A sublot belonging to a lot on hold or in quarantine cannot be shipped.

Properties

The following table describes the properties of a Dialog.Ship object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot material to ship Type Integer r/w Value indicating which type of Ship dialog box to launch where: 1 = Inventory Lot 2 = Bulk Inventory Note: Any value other than 1 or 2 defaults to 1. DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Ship object.

Launch

The Launch method queues the command to display the Ship Inventory Lot dialog box with the defined properties.

Syntax boolTag = %Dialog_Ship_Object.Launch(); Dialog Objects 7-29

Dialog.Split Object Class

A Dialog.Split object displays a Split dialog box, in which a user can split a single sublot into a new sublot and a corresponding lot, tracked independently of the original sublot. The sublot quantity must be greater than one (1), and the sublot be queued (not in-process) at an operation or closed before it can be split. A new name must be assigned to the new lot. Split lots inherit the same priority level and due date of the original sublot, although the priority level and due date can be changed through the Split dialog box data-entry fields.

Properties

The following table describes the properties of a Dialog.Split object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot material to split DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Split object.

Launch

The Launch method queues the command to display a Split dialog box with the defined properties.

Syntax boolTag = %Dialog_Split_Object.Launch(); 7-30 Chapter 7

Dialog.Start Object Class

A Dialog.Start object displays the Start WIP dialog box, in which a user can change the primary quantity and secondary quantity of a selected sublot from “queued” to “in process” at an operation.

Note: A sublot belonging to a lot on hold cannot be started. If an operation is defined as “Complete Only”, do not use a Dialog.Start object. A “Complete Only” operation only tracks sublot quantities when they complete an operation, not when they are in-process. A warning message will display a Dialog.Start object is attempted for a “Complete Only” operation.

Properties

The following table describes the properties of a Dialog.Start object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot material to start DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Start object.

Launch

The Launch method queues the command to display the Start WIP dialog box with the defined properties.

Syntax boolTag = %Dialog_Start_Object.Launch(); Dialog Objects 7-31

Dialog.StartTask Object Class

A Dialog.StartTask object displays the Start Task dialog box in which a user can start a maintenance task on a specified machine. A task can be periodic (for example, after 20 starts, recalibrate the machine) or nonperiodic (for example, recalibrate the machine at any one time).

Properties

The following table describes the properties of a Dialog.StartTask object.

Property Data Type Access Description

Machine Message r/w NameKey of the machine for which to start a task Task Message r/w (optional) Initial task to perform; if a task is not specified, unstarted tasks are performed in alphabetical order StopMachine Discrete r/w Boolean value that machine is usable during the task: –1 = usable 0 = not usable Comment Message r/w (optional) Comments DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.StartTask object.

Launch

The Launch method queues the command to display the Start Task dialog box with the defined properties.

Syntax boolTag = %Dialog_StartTask_Object.Launch(); 7-32 Chapter 7

Dialog.Status Object Class

A Dialog.Status object displays a Status dialog box, in which a user can place or release a sublot on hold or in quarantine. When a sublot is placed on hold or in quarantine, the parent lot and all related sublots also are placed on hold or in quarantine. A sublot on hold cannot be processed on a route. A sublot in quarantine cannot be processed or shipped.

Properties

The following table describes the properties of a Dialog.Status object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot for which to change status DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Status object.

Launch

The Launch method queues the command to display a Status dialog box with the defined properties.

Syntax boolTag = %Dialog_Status_Object.Launch(); Dialog Objects 7-33

Dialog.Undo Object Class

A Dialog.Undo object displays an Undo dialog box, in which a user can return a selected sublot to the status it had prior to the most recent transaction. Several consecutive transactions can be undone by repeatedly performing an Undo transaction.

Notes 1. If a sublot is split, and subsequent transactions performed on the split sublot, you cannot restore the status of the sublot to the status it had before the split unless you undo the transactions for both the original and split off sublots. 2. To undo a Consume transaction, select the sublot that did the consumption, not the sublot from which material was consumed. 3. To undo a Merge transaction, select the sublot that was merged to, not the sublot that was merged from.

Properties

The following table describes the properties of a Dialog.Undo object.

Property Data Type Access Description

Sublot Message r/w SublotKey of the sublot for which to undo a transaction DoneFlagName Message r/w Name of the DoneFlag tag

Method

This section describes the method for a Dialog.Undo object.

Launch

The Launch method queues the command to display an Undo dialog box with the defined properties.

Syntax boolTag = %Dialog_Undo_Object.Launch(); 7-34 Chapter 7

Dialog.UpdateRepair Object Class

A Dialog.UpdateRepair object displays the Update Repair dialog box in which a user can update the repair records of a specified machine.

Note: Use a Dialog.OpenRepair object to open a machine repair and a Dialog.CloseRepair object to close a machine repair. Between these two objects, as machine repairs are started and stopped (but not completed), use a Dialog.UpdateRepair object.

Properties

The following table describes the properties of a Dialog.UpdateRepair object.

Property Data Type Access Description

Machine Message r/w NameKey of the machine on which to update a repair RepairID Message r/w (optional) Repair transaction to update Symptom Message r/w Machine symptom that initiated the repair Reason Message r/w Failure reason RepairTechnician Message r/w (optional) Repair technician assigned to repair the machine StopMachine Discrete r/w Boolean value that machine is usable after the update: –1 = not usable 0 = usable Note: The default is the current state of the machine. Comment Message r/w (optional) Comments DoneFlagName Message r/w Name of the DoneFlag tag Dialog Objects 7-35

Method

This section describes the method for a Dialog.UpdateRepair object.

Launch

The Launch method queues the command to display the Update Repair dialog box with the defined properties.

Syntax boolTag = %Dialog_UpdateRepair_Object.Launch();

8-1

CHAPTER 8

Query Objects

Queries return information from the InTrack database. Use queries to locate parameter in a method call, the value of an object attribute, and other information you need to verify. The object classes in the Query category are developed to search the database and provide information on other object classes. The object classes of the Query category are created with properties to hold the information gathered from the database. When you first create a Query object, the properties are set to default values. The properties vary from class to class depending on the type of information gathered. For example, the QueryCloseLot object has LotID and Location properties. A QueryAllDSTemplate object has DSTemplate and DataTableName properties.

Important Note: SQL keywords are assumed. Keywords such as WHERE, HAVING, ORDERBY and other predicate keywords must be included in query statements.

Query parameters identify the search criteria. If a parameter does not apply (for example, Customer Specification) use the word “NONE”. When you call a Query method, InTrack searches the database and creates a list of all objects within the defined criteria. All Query objects contain a RowCount property that provides the total number of objects returned that match the search criteria. Query objects include a Query method to set search conditions and query the database. After calling the Query method, call the SetRow method to select a specific item from the returned list. An index number (and an attribute name in some cases) allows you to select a specific row from the list of objects returned. Calling the SetRow method sets the properties of the Query class with information pertaining to the selected object. InTrack provides specific Query classes and a generic Query class, QuerySQL. Relationships among database tables are predefined for specific Query classes to enable InTrack to locate information about objects quickly. For example, calling a Query method of a QueryMaterialInput object will search for material input information in all applicable database tables, including the RouteStep table, StructureStep table, and StepInput table. If a specific query is not available, the generic QuerySQL class can be used to retrieve row and column information directly from one or more database tables. 8-2 Chapter 8

Example — Syntax for Query Objects To view information returned in the properties of a Query object , use the following syntax: returnedValueTag = %Automation_Object.Property; where: returnedValueTag = Returned value; property value %Automation_Object = Automation object containing the property to retrieve Property = Property to retrieve for the specific Query class The following script retrieves the Count property of %Query_Operation_Object: countValueTag = %Query_Operation_Object.RowCount;

Example — Using a Query to Retrieve Information on an Operation The following script uses a QueryOperation object to retrieve information about the operation associated with a specific step on a route. This example creates a QueryOperation object (named %OpQuery_Object) and identifies the information to retrieve with the Query method parameters (in this case, the operation at step 3 on the route named waterroute[1] with no target material override or customer specification override). Script also is provided showing how to call a Query method, determine the value of the RowCount property, and use the SetRow method to return the appropriate record (which will fill the property values of the QueryOperation object). 1. Create a Query object for Operation. OLE_CreateObject(%OpQuery_Object, “InTrack.Query.Operation”); 2. Call the Query method to perform query — the number of matches is returned in RowCount. returnCode = %OpQuery_Object.Query(“waterroute[1]”, “3”, “NONE”, “NONE”); 3. Retrieve the number of matches. count = %OpQuery_Object.RowCount; 4. Call the SetRow method to identify the record for which to return data. returnCode = %OpQuery_Object.SetRow(1); 5. View returned information about the operation in %OpQuery_Object properties. rowCountTag = %OpQuery_Object.RowCount operationTag = %OpQuery_Object.Operation overlappedTag = %OpQuery_Object.Overlapped completeOnlyTag = %OpQuery_Object.CompleteOnly cycleTimeTag = %OpQuery_Object.CycleTime queueTimeTag = %OpQuery_Object.QueueTime standardYieldTag = %OpQuery_Object.StandardYield levelTag = %OpQuery_Object.Level Query Objects 8-3

The table on the following pages describes each object class of the Query category and the use of a object class.

Query object class Use to obtain information about QueryAllDisposition Disposition codes QueryAllDSTemplate Data set templates QueryAllLocation Locations QueryAllMachine Machines QueryAllOperation Operations QueryAllRoute Routes QueryAllSetpointTemplates Setpoint templates QueryCloseLot Closed lots QueryConsumeLot Sublots eligible for consumption for a target material (product) QueryDataSetItem Data items in a data set template QueryDataSetSample Samples in a data set template QueryDataSetTimeStamp Collection time stamps for a data sample QueryDisposition Disposition codes for a target material (product) on a route QueryExpiredMachineTask Machines with overdue maintenance tasks QueryInWarningMachineTask Machines with maintenance tasks in the in-warning state QueryLotDataSet Data set templates for a sublot at a step on a route QueryLotDataSetSample Samples for a data set template associated with a sublot QueryLotDataSetTimeStamp Collection time stamps for a data sample associated with a sublot QueryLotLocation Locations and lot IDs for a target material (product) QueryLotMachine Machines available to process a sublot QueryLotMachineQty Machines processing a sublot and the in-process quantity QueryLotPurgeItem Lots that meet purge time criteria QueryLotSerialNumber Serialized units of a sublot QueryLotUndo Undo transactions for a lot QueryLotWorkInstructions Work instructions for a sublot at a route step QueryMachineLot Sublots available for processing on a machine QueryMachinesAtOperation Machines at an operation 8-4 Chapter 8

Query object class Use to obtain information about QueryMachineDataSet Dataset templates for a machine QueryMachineDataSetSample Dataset samples for a machine QueryMachineDataSetTimeStamp Time stamps of dataset samples QueryMachineTask Machine tasks for a machine type QueryMaterial Materials by material type QueryMaterialInput Input materials for a target material (product) at a step on a route QueryMaterialOutput Output materials for a target material (product) at a step on a route QueryMaterialRoute Routes on which a target material (product) can be manufactured QueryMaterialSpec Customer specifications for a target material (product) QueryMergeLot Sublots eligible to merge QueryOperation Operations at step on a route QueryQualifiedUser Qualified users of a machine at an operation QueryRouteMaterial Target materials (products) for a route QueryRouteStep Route steps in a route QueryRuntimeConfig Runtime configuration QuerySQL Records in a database table QueryStepSetpoint Setpoints in a route step QuerySubstituteMaterialInput Substitute input materials for a target material (product) at a step on a route QueryTypedMachines Machines associated with a machine type QueryUDA_Name Names of UDAs

Query Objects 8-5

Contents QueryAllDisposition Object Class, 7 QueryAllDSTemplate Object Class, 9 QueryAllLocation Object Class, 11 QueryAllMachine Object Class, 13 QueryAllOperation Object Class, 15 QueryAllRoute Object Class, 17 QueryAllSetpointTemplate Object Class, 19 QueryCloseLot Object Class, 21 QueryConsumeLot Object Class, 23 QueryDataSetItem Object Class, 25 QueryDataSetSample Object Class, 27 QueryDataSetTimeStamp Object Class, 29 QueryDisposition Object Class, 31 QueryExpiredMachineTask Object Class, 33 QueryInWarningMachineTask Object Class, 35 QueryLotDataSet Object Class, 37 QueryLotDataSetSample Object Class, 39 QueryLotDataSetTimeStamp Object Class, 41 QueryLotLocation Object Class, 43 QueryLotMachine Object Class, 45 QueryLotMachineQty Object Class, 47 QueryLotPurgeItem Object Class, 49 QueryLotSerialNumber Object Class, 52 QueryLotUndo Object Class, 54 QueryLotWorkInstructions Object Class, 56 QueryMachineDataSet Object Class, 58 QueryMachineDataSetSample Object Class, 60 QueryMachineDataSetTimeStamp Object Class, 62 QueryMachineLot Object Class, 64 QueryMachinesAtOperation Object Class, 66 QueryMachineTask Object Class, 68 QueryMaterial Object Class, 70 QueryMaterialInput Object Class, 72 QueryMaterialOutput Object Class, 74 QueryMaterialRoute Object Class, 76 QueryMaterialSpec Object Class, 78 QueryMergeLot Object Class, 80 QueryOperation Object Class, 82 8-6 Chapter 8

QueryQualifiedUser Object Class, 84 QueryRouteMaterial Object Class, 86 QueryRouteStep Object Class, 88 QueryRuntimeConfig Object Class, 90 QuerySQL Object Class, 92 QueryStepSetpoint Object Class, 99 QuerySubstituteMaterialInput Object Class, 101 QueryTypedMachines Object Class, 103 QueryUDA_Name Object Class, 105

Query Objects 8-7

QueryAllDisposition Object Class

A QueryAllDisposition object retrieves information about disposition code objects from the database. The Query method returns a count of the number of disposition code objects in the database. Each call of the SetRow method returns information about a specific disposition code object.

Identification

Object Name: InQueryAllDisposition Interface Name: IInQueryAllDisposition InTouch Object Name: %QueryAllDisposition

Properties

The following table describes the properties of a QueryAllDisposition object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of disposition code objects found DispositionCode Message String r NameKey for a returned disposition code DispositionType Message String r Disposition code condition type: GOOD REJECT REWORK SCRAP

Methods

This section describes the methods for a QueryAllDisposition object.

Query

The Query method sets the RowCount property to the number of disposition code objects found in the database.

Syntax returnCode = %Query_AllDisposition_Object.Query(); 8-8 Chapter 8

SetRow

The SetRow method sets the properties of the QueryAllDisposition object with information for the disposition code specified by index in the method call.

Syntax returnCode = %Query_AllDisposition_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the disposition code information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-9

QueryAllDSTemplate Object Class

A QueryAllDSTemplate object retrieves information about data set template objects from the database. The Query method returns a count of the number of data set template objects in the database. Each call of the SetRow method returns information about a specific data set template object.

Identification

Object Name: InQueryAllDSTemplate Interface Name: IInQueryAllDSTemplate InTouch Object Name: %QueryAllDSTemplate

Properties

The following table describes the properties of a QueryAllDSTemplate object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of data set template objects found DSTemplate Message String r VersionKey of the specified data set template DataTableName Message String r Name of the runtime data table where information for this template is stored

Methods

This section describes the methods for a QueryAllDSTemplate object.

Query

The Query method sets the RowCount property to the number of data set template objects found in the database.

Syntax returnCode = %Query_AllDSTemplate_Object.Query(); 8-10 Chapter 8

SetRow

The SetRow method sets the properties of the QueryAllDSTemplate object with information for the data set template specified by index in the method call.

Syntax returnCode = %Query_AllDSTemplate_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the data set template information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-11

QueryAllLocation Object Class

A QueryAllLocation object retrieves information about location objects from the database. The Query method returns a count of the number of location objects in the database. Each call of the SetRow method returns the name of a specific location object.

Identification

Object Name: InQueryAllLocation Interface Name: IInQueryAllLocation InTouch Object Name: %QueryAllLocation

Properties

The following table describes the properties of a QueryAllLocation object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of location objects found Location Message String r NameKey of the specified location

Methods

This section describes the methods for a QueryAllLocation object.

Query

The Query method sets the RowCount property to the number of location objects found in the database.

Syntax returnCode = %Query_AllLocation_Object.Query(); 8-12 Chapter 8

SetRow

The SetRow method sets the Location property with the name of the database object specified by index in the method call.

Syntax returnCode = %Query_AllLocation_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the location to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-13

QueryAllMachine Object Class

A QueryAllMachine object retrieves information about machine objects from the database. The Query method returns a count of the number of machine objects in the database. Each call of the SetRow method returns the name of a specific machine object.

Identification

Object Name: InQueryAllMachine Interface Name: IInQueryAllMachine InTouch Object Name: %QueryAllMachine

Properties

The following table describes the properties of a QueryAllMachine object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of machine objects found Machine Message String r NameKey of the specified machine

Methods

This section describes the methods for a QueryAllMachine object.

Query

The Query method sets the RowCount property to the number of machine objects found in the database.

Syntax returnCode = %Query_AllMachine_Object.Query(); 8-14 Chapter 8

SetRow

The SetRow method sets the Machine property with the name of the machine object specified by index in the method call.

Syntax returnCode = %Query_AllMachine_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the machine to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-15

QueryAllOperation Object Class

A QueryAllOperation object retrieves information about operation objects from the database. The Query method returns a count of the number of operation objects in the database. Each call of the SetRow method returns the name of a specific operation object.

Identification

Object Name: InQueryAllOperation Interface Name: IInQueryAllOperation InTouch Object Name: %QueryAllOperation

Properties

The following table describes the properties of a QueryAllOperation object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of operation objects found Operation Message String r VersionKey of the specified operation

Methods

This section describes the methods for a QueryAllOperation object.

Query

The Query method sets the RowCount property to the number of operation objects found in the database.

Syntax returnCode = %Query_AllOperation_Object.Query(); 8-16 Chapter 8

SetRow

The SetRow method sets the Operation property of the QueryAllOperation object with the name of the operation object specified by index in the method call.

Syntax returnCode = %Query_AllOperation_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the operation to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-17

QueryAllRoute Object Class

A QueryAllRoute object retrieves information about route objects from the database. The Query method returns a count of the number of route objects in the database. Each call of the SetRow method returns the name and version of a specific route object.

Identification

Object Name: InQueryAllRoute Interface Name: IInQueryAllRoute InTouch Object Name: %QueryAllRoute

Properties

The following table describes the properties of a QueryAllRoute object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of route objects found Route Message String r VersionKey of the specified route

Methods

This section describes the methods for a QueryAllRoute object.

Query

The Query method sets the RowCount property to the number of route objects found in the database.

Syntax returnCode = %Query_AllRoute_Object.Query(); 8-18 Chapter 8

SetRow

The SetRow method sets the Route property of the QueryAllRoute object with the name and version of the route object specified by index in the method call.

Syntax returnCode = %Query_AllRoute_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the route to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-19

QueryAllSetpointTemplate Object Class

A QueryAllSetpointTemplate object retrieves information about setpoint template objects from the database. The Query method returns a count of the number of setpoint template objects in the database. Each call of the SetRow method returns information about a specific setpoint template object.

Identification

Object Name: InQueryAllSetpointTemplate Interface Name: IInQueryAllSetpointTemplate InTouch Object Name: %QueryAllSetpointTemplate

Properties

The following table describes the properties of a QueryAllSetpointTemplate object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of setpoint template objects found TemplateKey Message String r VersionKey of the specified setpoint template

Methods

This section describes the methods for a QueryAllSetpointTemplate object.

Query

The Query method sets the RowCount property to the number of setpoint template objects found in the database.

Syntax returnCode = %Query_AllSetpointTemplate_Object.Query(); 8-20 Chapter 8

SetRow

The SetRow method sets the properties of the QueryAllSetpointTemplate object with information for the setpoint template specified by index in the method call.

Syntax returnCode = %Query_AllSetpointTemplate_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the setpoint template information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-21

QueryCloseLot Object Class

A QueryCloseLot object retrieves information about the locations to which sublots of a target material (product) are closed. The Query method returns a count of the number of closed sublots for the target material. Each call of the SetRow method returns location information for a specific sublot.

Identification

Object Name: InQueryCloseLot Interface Name: IInQueryCloseLot InTouch Object Name: %QueryCloseLot

Properties

The following table describes the properties of a QueryCloseLot object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of closed sublots found for the target material LotID Message String r Identifier of the parent lot containing the closed sublot of the specified material Location Message String r Name of the location to which this sublot was closed 8-22 Chapter 8

Methods

This section describes the methods for a QueryCloseLot object.

Query

The Query method sets the RowCount property to the number of closed sublots found for the specified target material.

Syntax returnCode = %Query_CloseLot_Object.Query(material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey of the target material for which to retrieve closed sublots

SetRow

The SetRow method sets the properties of the QueryCloseLot object with information for the material specified by index in the method call.

Syntax returnCode = %Query_CloseLot_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the material information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-23

QueryConsumeLot Object Class

A QueryConsumeLot object retrieves lot information about primary materials eligible for consumption by a sublot. You also can retrieve information about substitute material(s) defined for the primary material in ModelMaker. The Query method returns a count of the number of consumable lots for the specified material. Each call of the SetRow method returns information about a specific lot. This query is similar to the Sublot.GetConsumeItems and Sublot.GetSubstituteConsumeItems methods.

Identification

Object Name: InQueryConsumeLot Interface Name: IInQueryConsumeLot InTouch Object Name: %QueryConsumeLot

Properties

The following table describes the properties of a QueryConsumeLot object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of consumable lots for the material Sublot Message String r SublotKey of a sublot of the specified consumable material PrimaryQty Real Double r Quantity of this consumable material sublot available for consumption State Integer Short r Serial tracking state of this consumable material sublot where: 0 = Unserialized 1 = Partial 2 = Serialized 8-24 Chapter 8

Methods

This section describes the methods for a QueryConsumeLot object.

Query

The Query method returns a count of the number of consumable lots for the specified material. Use the predicate parameter to further restrict the search criteria and the substitute parameter to return substitute materials that were defined for the material specified in the material parameter.

Syntax returnCode = %Query_ConsumeLot_Object.Query(sublot, material, predicate, substitute); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot for which to retrieve a consumable material material Message String VersionKey of a primary consumable material predicate Message String SQL predicate that serves as the basis for filtering (for example, a WHERE clause) substitute Message String VersionKey of a defined substitute material for the primary consumable material

SetRow

The SetRow method sets the properties of the QueryConsumeLot object with information for the consumable material specified by index in the method call.

Syntax returnCode = %Query_ConsumeLot_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the sublot information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-25

QueryDataSetItem Object Class

A QueryDataSetItem object retrieves information about data items for a data set template. The Query method returns a count of the number of data items found for the data set template. Each call of the SetRow method returns information about a specific data item.

Note: The data item name returned in the Name property when the SetRow method is called can be used in the GetItemType, GetItemValue, and SetItem methods of a DataSetSample object.

Identification

Object Name: InQueryDataSetItem Interface Name: IInQueryDataSetItem InTouch Object Name: %QueryDataSetItem

Properties

The following table describes the properties of a QueryDataSetItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of data items found for the data set template Name Message String r Name of the specified data item Type Message String r Data type of this data item Index Integer Long r Sequential position of this data item in the data set template Description Message String r Description of this data item Label Message String r Label of this data item UnitOfMeasure Message String r Unit of measure of this data item Note: This property is superseded by the Label property. ReqFlag Discrete Boolean r Boolean flag that data collection is: –1 = required 0 = not required CheckLimits Discrete Boolean r Boolean flag to: –1 = perform limit checking 0 = not perform limit checking Format Message String r Comma-separated string of selections 8-26 Chapter 8

Methods

This section describes the methods for a QueryDataSetItem object.

Query

The Query method sets the RowCount property to the number of data items found for the specified data set template object.

Syntax returnCode = %Query_DataSetItem_Object.Query(dataSet); where:

Data Type Data Type Parameter (InTouch) (VB) Description

dataSet Message String VersionKey of the data set template for which to retrieve data items

SetRow

The SetRow method sets the properties of the QueryDataSetItem object with information for the data item specified by index in the method call.

Syntax returnCode = %Query_DataSetItem_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the data item information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-27

QueryDataSetSample Object Class

A QueryDataSetSample object retrieves information for the data samples of a data set template. The Query method returns a count of the number of collection instances for the data sample. Each call of the SetRow method returns information about a specific data sample.

Note: The sample name returned in the Sample property when the SetRow method is called can be used to set the SampleName property of a DataSetSample object.

Identification

Object Name: InQueryDataSetSample Interface Name: IInQueryDataSetSample InTouch Object Name: %QueryDataSetSample

Properties

The following table describes the properties of a QueryDataSetSample object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of data sample collection instances found for the data set template Sample Message String r Name of the specified data sample Index Integer Long r Sequential position of this data sample in the data set template 8-28 Chapter 8

Methods

This section describes the methods for a QueryDataSetSample object.

Query

The Query method sets the RowCount property to the number of data sample collection instances found for the specified data set template.

Syntax returnCode = %Query_DataSetSample_Object.Query(dataSet); where:

Data Type Data Type Parameter (InTouch) (VB) Description

dataSet Message String VersionKey of the data set template for which to retrieve data samples

SetRow

The SetRow method sets the properties of the QueryDataSetSample object with information for the data set sample specified by index in the method call.

Syntax returnCode = %Query_DataSetSample_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the data sample information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-29

QueryDataSetTimeStamp Object Class

A QueryDataSetTimeStamp object retrieves data collection time stamp information for a collected data sample of a data set template. The Query method returns a count of the number of time stamps found for the data sample. Each call of the SetRow method returns a specific time stamp.

Note: The DateTime object returned in the TimeStamp property when the SetRow method is called can be used to represent the collect time parameter in the LoadSample and SupersedeSample methods of a DataSetSample object.

Identification

Object Name: InQueryDataSetTimeStamp Interface Name: IInQueryDataSetTimeStamp InTouch Object Name: %QueryDataSetTimeStamp

Properties

The following table describes the properties of a QueryDataSetTimeStamp object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of time stamps found for the collected data sample TimeStamp Object Object r DateTime object, name of the specified time stamp 8-30 Chapter 8

Methods

This section describes the methods for a QueryDataSetTimeStamp object.

Query

The Query method sets the RowCount property to the number of time stamp instances found for the specified data set template and data sample.

Syntax returnCode = %Query_DataSetTimeStamp_Object.Query(dataSet, sampleName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

dataSet Message String VersionKey of the data set template for which to retrieve data sample time stamp information sampleName Message String NameKey of the name of a data sample associated with the data set template

SetRow

The SetRow method sets the TimeStamp property of the QueryDataSetTimeStamp object with time stamp specified by index in the method call.

Syntax returnCode = %Query_DataSetTimeStamp_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the time stamp to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-31

QueryDisposition Object Class

A QueryDisposition object retrieves information about disposition codes at a step on a route for a target material (product). The Query method returns a count of the number of disposition codes found for the route step. Each call of the SetRow method returns information about a specific disposition code.

Identification

Object Name: InQueryDisposition Interface Name: IInQueryDisposition InTouch Object Name: %QueryDisposition

Properties

The following table describes the properties of a QueryDisposition object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of disposition codes found for the target material at the route step DispositionCode Message String r VersionKey of the specified disposition code object DestRouteStep Message String r NameKey of the destination route step for this disposition code Type Integer Short r Code indicating the destination type for this disposition code where: 1 = to step 2 = to route 3 = to inventory 4 = to scrap 5 = to close IsMainPath Integer Short r Boolean value that the destination route step for this disposition code is: 0 = not on the main path –1 = on the main path 8-32 Chapter 8

Methods

This section describes the methods for a QueryDisposition object.

Query

The Query method sets the RowCount property to the number of disposition codes found for the specified route, route step, and target material (product).

Syntax returnCode = %Query_Disposition_Object.Query(route, routeStep, material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

route Message String VersionKey of the route for which to retrieve disposition codes routeStep Message String NameKey of a route step associated with the route material Message String VersionKey of a target material associated with the route

SetRow

The SetRow method sets the properties of the QueryDisposition object with information for the disposition code specified by index in the method call.

Syntax returnCode = %Query_Disposition_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the disposition code information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-33

QueryExpiredMachineTask Object Class

A QueryExpiredMachineTask object retrieves information about maintenance tasks that are overdue for a machine. The Query method returns a count of the number of overdue tasks found for the machine. Each call of the SetRow method returns the name of a specific machine task.

Identification

Object Name: InQueryExpiredMachineTask Interface Name: IInQueryExpiredMachineTask InTouch Object Name: %QueryExpiredMachineTask

Properties

The following table describes the properties of a QueryExpiredMachineTask object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of overdue maintenance tasks found for the machine MachineTask Message String r NameKey of the specified machine task

Methods

This section describes the methods for a QueryExpiredMachineTask object.

Query

The Query method sets the RowCount property to the number of overdue tasks found for the specified machine.

Syntax returnCode = %Query_ExpiredMachineTask_Object.Query(machine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

machine Message String NameKey of the machine for which to retrieve overdue maintenance tasks 8-34 Chapter 8

SetRow

The SetRow method sets the MachineTask property of the QueryExpiredMachineTask object with the name of the overdue machine task specified by index in the method call.

Syntax returnCode = %Query_ExpiredMachineTask_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the machine task to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-35

QueryInWarningMachineTask Object Class

A QueryInWarningMachineTask object retrieves information about maintenance tasks at the in- warning state for a machine. The Query method returns a count of the number of in-warning tasks found for the machine. Each call of the SetRow method returns the name of a specific machine task.

Identification

Object Name: InQueryInWarningMachineTask Interface Name: IInQueryInWarningMachineTask InTouch Object Name: %QueryInWarningMachineTask

Properties

The following table describes the properties of a QueryInWarningMachineTask object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of in-warning machine tasks found for the machine MachineTask Message String r NameKey of the specified in-warning machine task

Methods

This section describes the methods for a QueryInWarningMachineTask object.

Query

The Query method sets the RowCount property to the number of tasks found in the in-warning state for the specified machine.

Syntax returnCode = %Query_InWarningMachineTask_Object.Query(machine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

machine Message String NameKey of the machine for which to retrieve in-warning maintenance tasks 8-36 Chapter 8

SetRow

The SetRow method sets the MachineTask property of the QueryInWarningMachineTask object with the name of the machine task specified by index in the method call.

Syntax returnCode = %Query_InWarningMachineTask_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the machine task to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-37

QueryLotDataSet Object Class

A QueryLotDataSet object retrieves information about data set templates associated with a sublot. The Query method returns a count of the number of data set templates found for the sublot. Each call of the SetRow method returns information about a specific data set template.

Note: When using methods of a DataSetSample object associated with a sublot, the data set name returned in the DataSet property when the SetRow method is called can be used in the dataSetTemplate parameter of the InitializeSample method.

Identification

Object Name: InQueryLotDataSet Interface Name: IInQueryLotDataSet InTouch Object Name: %QueryLotDataSet

Properties

The following table describes the properties of a QueryLotDataSet object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of data set templates found for the sublot DataSet Message String r VersionKey of the specified data set template Description Message String r Description of this data set template SampleCount Integer Short r Number of samples in this data set template Level Integer Short r Override level for the operation where: 0 = default 1 = target-material level override 2 = customer-spec level override 8-38 Chapter 8

Methods

This section describes the methods for a QueryLotDataSet object.

Query

The Query method sets the RowCount property to the number of data set templates found for the specified sublot.

Syntax returnCode = %Query_LotDataSet_Object.Query(sublot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot for which to retrieve data set templates

SetRow

The SetRow method sets the properties of the QueryLotDataSet object with information for the data set template specified by index in the method call.

Syntax returnCode = %Query_LotDataSet_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the data set template information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-39

QueryLotDataSetSample Object Class

A QueryLotDataSetSample object returns a list of sample names that have been collected for a specified sublot. The Query method returns a count of the number of samples. Each call of the SetRow method returns information about a specific data sample.

Note: When you use methods associated with a sublot, the sample name returned in the Sample property from the SetRow method can be used to set the SampleName property of a DataSetSample object.

Identification

Object Name: InLotDataSetSample Interface Name: IInLotDataSetSample InTouch Object Name: %LotDataSetSample

Properties

The following table describes the properties of a QueryLotDataSetSample object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of data sample collection instances found for the data set template and sublot Sample Message String r Name of the specified data sample 8-40 Chapter 8

Methods

This section describes the methods for a QueryLotDataSetSample object.

Query

The Query method sets the RowCount property to the number of data sample collection instances found for the specified data set template and sublot.

Syntax returnCode = %Query_LotDataSetSample_Object.Query(sublot, dataSet); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot for which to retrieve a data sample dataSet Message String VersionKey of a data set template associated with the sublot

SetRow

The SetRow method sets the Sample property of the QueryLotDataSetSample object with the data sample value specified by index in the method call.

Syntax returnCode = %Query_LotDataSetSample_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long Numerical position of the data sample to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-41

QueryLotDataSetTimeStamp Object Class

A QueryLotDataSetTimeStamp object retrieves data collection time stamp information for a collected data sample of a data set template associated with a sublot. The Query method returns a count of the number of time stamps found for the data sample. Each call of the SetRow method returns a specific time stamp.

Note: The DateTime object returned in the TimeStamp property when the SetRow method is called can represent the collect time parameter in the LoadLotSample and SupersedeLotSample methods of a DataSetSample object.

Identification

Object Name: InQueryLotDataSetTimeStamp Interface Name: IInQueryLotDataSetTimeStamp InTouch Object Name: %QueryLotDataSetTimeStamp

Properties

The following table describes the properties of a QueryLotDataSetTimeStamp object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of time stamp instances found for the sublot, data set template, and sample TimeStamp Object DateTime r Name of the specified time stamp 8-42 Chapter 8

Methods

This section describes the methods for a QueryLotDataSetTimeStamp object.

Query

The Query method sets the RowCount property to the number of data sample time stamps found for the specified sublot, data set template, and data sample.

Syntax returnCode = %Query_LotDataSetTimeStamp_Object.Query(sublot, dataSet, sampleName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot for which to retrieve data sample time stamps dataSet Message String VersionKey of a data set template associated with the sublot and sample name sampleName Message String NameKey of a data sample associated with the sublot and data set template

SetRow

The SetRow method sets the TimeStamp property of the QueryLotDataSetTimeStamp object with the time stamp specified by index in the method call.

Syntax returnCode = %Query_LotDataSetTimeStamp_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long Numerical position of the time stamp to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-43

QueryLotLocation Object Class

A QueryLotLocation object retrieves information about the locations for a material. You can retrieve a list of locations and LotIDs where the material exists, or a list of locations where the material does not exist. The Query method returns a count of the number of locations for the material. Each call of the SetRow method returns information about a specific location.

Identification

Object Name: InQueryLotLocation Interface Name: IInQueryLotLocation InTouch Object Name: %QueryLotLocation

Properties

The following table describes the properties of a QueryLotLocation object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of locations found that meet the search criteria LotID Message String r NameKey of the lot containing the specified material Location Message String r NameKey of the location where this material exists 8-44 Chapter 8

Methods

This section describes the methods for a QueryLotLocation object.

Query

The Query method sets the RowCount property to the number of locations found for the specified material. Use the exists parameter to retrieve locations where the material exists or where the material does not exist.

Syntax returnCode = %Query_LotLocation_Object.Query(material, exists); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey of the target material for which to retrieve location information exists Discrete Boolean Boolean value that the locations are where: –1 = material exists 0 = material does not exist

SetRow

The SetRow method sets the properties of the QueryLotLocation object with information for the location specified by index in the method call.

Syntax returnCode = %Query_LotLocation_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the lot information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-45

QueryLotMachine Object Class

A QueryLotMachine object retrieves information about the machines available to process a specified sublot. The Query method returns a count of the number of available machines. Each call of the SetRow method returns information about a specific machine.

Identification

Object Name: InQueryLotMachine Interface Name: IInQueryLotMachine InTouch Object Name: %QueryLotMachine

Properties

The following table describes the properties of a QueryLotMachine object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of machines available to process the sublot Machine Message String r NameKey of the specified machine Description Message String r Description of this machine Capacity Real Double r Capacity of this machine CapacityUOM Message String r Capacity unit of measure ContactInfo Message String r Vendor contact person Location Message String r NameKey of the location of this machine MachineType Message String r NameKey of the machine type of this machine Level Integer Short r Override level for sublot operation: 0 = default 1 = target material-level override 2 = customer specification-level override 8-46 Chapter 8

Methods

This section describes the methods for a QueryLotMachine object.

Query

The Query method sets the RowCount property to the number of machines available to process the specified sublot.

Syntax returnCode = %Query_LotMachine_Object.Query(sublot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot for which to retrieve machine information

SetRow

The SetRow method sets the properties of the QueryLotMachine object with information for the machine specified by the index parameter in the method call.

Syntax returnCode = %Query_LotMachine_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the machine information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-47

QueryLotMachineQty Object Class

A QueryLotMachineQty object retrieves information about the machines processing a sublot. The Query method returns a count of the number of machines processing the sublot. Each call of the SetRow method returns information about a specific machine.

Identification

Object Name: InQueryLotMachineQty Interface Name: IInQueryLotMachineQty InTouch Object Name: %QueryLotMachineQty

Properties

The following table describes the properties of a QueryLotMachineQty object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of machines processing the sublot Machine Message String r NameKey of the specified machine PrimaryQty Real Double r Quantity in process on this machine 8-48 Chapter 8

Methods

This section describes the methods for a QueryLotMachineQty object.

Query

The Query method sets the RowCount property to the number of machines processing the specified sublot.

Syntax returnCode = %Query_LotMachineQty_Object.Query(sublot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot for which to retrieve machine information

SetRow

The SetRow method sets the properties of the QueryLotMachineQty object with information for the machine specified by the index parameter in the method call.

Syntax returnCode = %Query_LotMachineQty_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the machine information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-49

QueryLotPurgeItem Object Class

A QueryLotPurgeItem object retrieves information about lots eligible to purge. Two separate query methods are associated with this object class: Query and UserQuery. The Query method returns a count of the number of lots eligible to purge, based on a lot quantity of zero and a specified cutoff date and time. Lots are eligible to purge if they meet the following criteria: Primary quantity = 0 Secondary quantity = 0 No transactions performed on lot after the cutoff date and time The cutoff date and time are determined by subtracting the number of days, hours, and seconds specified in the Query method's %TimeInterval parameter from the current date and time. Before calling Query, create a TimeInterval object and set the properties. The UserQuery method returns a count of the number of lots eligible to purge, based on the user- defined search criteria. Each call of the SetRow method returns the identifier of a specific lot.

Identification

Object Name: InQueryLotPurgeItem Interface Name: IInQueryLotPurgeItem InTouch Object Name: %QueryLotPurgeItem

Properties

The following table describes the properties of a QueryLotPurgeItem object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of lots that meet the quantity and cutoff date and time criteria LotID Message String r NameKey of the specified lot eligible to purge 8-50 Chapter 8

Methods

This section describes the methods for a QueryLotPurgeItem object.

Query

The Query method sets the RowCount property to the number of lots that meet the quantity and cutoff date and time criteria.

Syntax returnCode = %Query_LotPurgeItem_Object.Query(%TimeInterval); where:

Data Type Data Type Parameter (InTouch) (VB) Description

%TimeInterval Object Object TimeInterval object of the cut-off date, defined as the number of days, hours, minutes, and seconds backward from the current date and time

SetRow

The SetRow method sets the LotID property of the QueryLotPurgeItem object to the lot identifier of the lot eligible to purge as specified by index in the method call.

Syntax returnCode = %Query_LotPurgeItem_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long Numerical position of the lot identifier to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-51

UserQuery

The UserQuery method sets the RowCount property to the number of lots that meet the user- defined search criteria. The search text specified in the searchText parameter is appended to the following partial SQL statement:

SELECT DISTINCT Lot.LotID FROM Lot therefore, the search text can be any SQL text that results in a valid SELECT statement.

Syntax returnCode = %Query_LotPurgeItem_Object.UserQuery(searchText); where:

Data Type Data Type Parameter (InTouch) (VB) Description

searchText Message String SQL search text

Example The following script retrieves information about all lots eligible for purging, based on the user- defined search criteria where the value of uda1 is greater than 10. This example creates a QueryLotPurgeItem object and identifies the information to retrieve with the UserQuery method parameters (in this case, “WHERE uda1 > 10”). Script also calls a UserQuery method, determines the value of the RowCount property, and uses the SetRow method to return the appropriate record (which sets the LotID property value of the QueryLotPurgeItem object). 1. Create a QueryLotPurgeItem object. OLE_CreateObject(%Query_LotPurgeItem_Object, "InTrack.QueryLotPurgeItem"); 2. Call the UserQuery method to perform query—number of matches is returned in RowCount. returnCode = %Query_LotPurgeItem_Object.UserQuery("WHERE uda1 > 10"); 3. Retrieve the number of matches. Count = %Query_LotPurgeItem_Object.RowCount; 4. Call SetRow method to identify record for which to retrieve data, in this case the first one. returnCode = %Query_LotPurgeItem_Object.SetRow(1); 5. View returned lot ID in %Query_LotPurgeItem_Object LotID property. lotID = %Query_LotPurgeItem_Object.LotID 8-52 Chapter 8

QueryLotSerialNumber Object Class

A QueryLotSerialNumber object retrieves information about the serialized units of a sublot. The Query method returns a count of the number of serialized units found for the sublot. Each call of the SetRow method returns information about a specific serialized unit.

Identification

Object Name: InQueryLotSerialNumber Interface Name: IInQueryLotSerialNumber InTouch Object Name: %QueryLotSerialNumber

Properties

The following table describes the properties of a QueryLotSerialNumber object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of serialized units found for the sublot SerialNumber Message String r Serial number for the specified serialized unit Machine Message String r NameKey of the machine processing this serialized unit WorkState Integer Short r Identifies that this serialized unit is: 0 = Queued 1 = In_process Query Objects 8-53

Methods

This section describes the methods for a QueryLotSerialNumber object.

Query

The Query method sets the RowCount property to the number of serialized units found for the specified sublot.

Syntax returnCode = %Query_LotSerialNumber_Object.Query(sublot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot for which to retrieve serialized unit information

SetRow

The SetRow method sets the properties of the QueryLotSerialNumber object with information for the serialized unit specified by index in the method call.

Syntax returnCode = %Query_LotSerialNumber_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the serialized unit information to retrieve (1 ≤ index ≤ RowCount) 8-54 Chapter 8

QueryLotUndo Object Class

A QueryLotUndo object retrieves information about the Undo transactions for a lot. The Query method returns a count of the number of transactions found for the lot. Each call of the SetRow method returns information about a specific transaction. The TransactionID property for the first row of the LotUndo query can be passed to the Lot.Undo method.

Identification

Object Name: InQueryLotUndo Interface Name: IInQueryLotUndo InTouch Object Name: %QueryLotUndo

Properties

The following table describes the properties of a QueryLotUndo object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of transactions found for the lot TransactionName Message String r Name of the specified transaction TransactionID Message String r Unique transaction identifier for this transaction TimeLogged Object Object r DateTime object, date and time this transaction occurred Query Objects 8-55

Methods

This section describes the methods for a QueryLotUndo object.

Query

The Query method sets the RowCount property to the number of transactions found for the lot.

Syntax returnCode = %Query_LotUndo_Object.Query(lotID); where:

Data Type Data Type Parameter (InTouch) (VB) Description

lotID Message String LotKey of the lot for which to retrieve transaction information

SetRow

The SetRow method sets the properties of the QueryLotUndo object with information for the Undo transaction specified by index in the method call.

Syntax returnCode = %Query_LotUndo_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the transaction information to retrieve (1 ≤ index ≤ RowCount) 8-56 Chapter 8

QueryLotWorkInstructions Object Class

A QueryLotWorkInstructions object retrieves information about work instructions objects for a sublot. The Query method returns a count of the number of work instructions objects found for the sublot. Each call of the SetRow method returns information about a specific work instructions object.

Identification

Object Name: InQueryLotWorkInstructions Interface Name: IInQueryLotWorkInstructions InTouch Object Name: %QueryLotWorkInstructions

Properties

The following table describes the properties of a QueryLotWorkInstructions object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of work instructions objects found for the sublot WorkInstructions Message String r VersionKey of the specified work instructions object IsInternal Discrete Boolean r Boolean value indicating whether this work instructions object is: –1 = internal 0 = external DaysToNotify Object TimeInterval r Number of days to display a change notice for this work instructions object to a runtime user Level Integer Short r Override level for this operation where: 0 = default 1 = target-material level override 2 = customer-spec level override TimeLastChanged Object Object r DateTime object, time stamp for the most recent change to this work instructions object Query Objects 8-57

Methods

This section describes the methods for a QueryLotWorkInstructions object.

Query

The Query method sets the RowCount property to the number of work instructions objects found for the specified sublot.

Syntax returnCode = %Query_LotWorkInstructions_Object.Query(sublot); where:

Data Type Data Type Parameter (InTouch) (VB) Description

sublot Message String SublotKey of the sublot for which to retrieve work instructions

SetRow

The SetRow method sets the properties of the QueryLotWorkInstructions object with information for the work instructions object specified by index in the method call.

Syntax returnCode = %Query_LotWorkInstructions_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the work instruction information to retrieve (1 ≤ index ≤ RowCount) 8-58 Chapter 8

QueryMachineDataSet Object Class

A QueryMachineDataSet object retrieves information about data set templates associated with a machine. The Query method returns a count of the number of data set templates found for the machine. Each call of the SetRow method returns information about a specific data set template.

Note: When using methods of a DataSetSample object associated with a machine, the data set name returned when the SetRow method is called can be used in the dataSetTemplate parameter of the InitializeSample method.

Identification

Object Name: InQueryMachineDataSet Interface Name: IInQueryMachineDataSet InTouch Object Name: %QueryMachineDataSet

Properties

The following table describes the properties of a QueryMachineDataSet object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of data set templates found for the machine DataSet Message String r VersionKey of the specified data set template Description Message String r Description of this data set template SampleCount Integer Short r Number of samples in this data set template Query Objects 8-59

Methods

This section describes the methods for a QueryMachineDataSet object.

Query

The Query method sets the RowCount property to the number of data set templates found for the specified machine.

Syntax returnCode = %Query_MachineDataSet_Object.Query(machine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

machine Message String NameKey of the machine for which to retrieve data set templates

SetRow

The SetRow method sets the properties of the QueryMachineDataSet object with information for the data set template specified by index in the method call.

Syntax returnCode = %Query_MachineDataSet_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the data set template information to retrieve (1 ≤ index ≤ RowCount) 8-60 Chapter 8

QueryMachineDataSetSample Object Class

A QueryMachineDataSetSample object retrieves information for the data samples of a data set template associated with a machine. The Query method returns a count of the number of collection instances for the data sample. Each call of the SetRow method returns information about a specific data sample.

Note: When using methods associated with a machine, the sample name returned when the SetRow method is called can be used to set the SampleName property of a DataSetSample object.

Identification

Object Name: InQueryMachineDataSetSample Interface Name: IInQueryMachineDataSetSample InTouch Object Name: %QueryMachineDataSetSample

Properties

The following table describes the properties of a QueryMachineDataSetSample object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of data sample collection instances found for the data set template and machine Sample Message String r Name of the specified data sample Query Objects 8-61

Methods

This section describes the methods for a QueryMachineDataSetSample object.

Query

The Query method sets the RowCount property to the number of data sample collection instances found for the specified data set template and machine.

Syntax returnCode = %Query_MachineDataSetSample_Object.Query(machine, dataSet); where:

Data Type Data Type Parameter (InTouch) (VB) Description

machine Message String NameKey of the machine for which to retrieve a data sample dataSet Message String VersionKey of a data set template associated with the machine

SetRow

The SetRow method sets the Sample property of the QueryMachineDataSetSample object with the data sample value specified by index in the method call.

Syntax returnCode = %Query_MachineDataSetSample_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long Numerical position of the data sample to retrieve (1 ≤ index ≤ RowCount) 8-62 Chapter 8

QueryMachineDataSetTimeStamp Object Class

A QueryMachineDataSetTimeStamp object retrieves data collection time stamp information for a collected data sample of a data set template associated with a machine. The Query method returns a count of the number of time stamps found for the data sample. Each call of the SetRow method returns a specific time stamp.

Note: The DateTime object returned when the SetRow method is called can be used to represent the collect time parameter in the LoadMachineSample and SupersedeMachineSample methods of a DataSetSample object.

Identification

Object Name: InQueryMachineDataSetTimeStamp Interface Name: IInQueryMachineDataSetTimeStamp InTouch Object Name: %QueryMachineDataSetTimeStamp

Properties

The following table describes the properties of a QueryMachineDataSetTimeStamp object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of time stamp instances found for the machine, data set template, and sample TimeStamp Object Object r DateTime object, time stamp of the collected data sample Query Objects 8-63

Methods

This section describes the methods for a QueryMachineDataSetTimeStamp object.

Query

The Query method sets the RowCount property to the number of data sample time stamps found for the specified machine, data set template, and data sample.

Syntax returnCode = %Query_MachineDataSetTimeStamp_Object.Query(machine, dataSet, sampleName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

machine Message String NameKey of the machine for which to retrieve data sample time stamps dataSet Message String VersionKey of a data set template associated with the machine and sample name sampleName Message String NameKey of a data sample associated with the machine and data set template

SetRow

The SetRow method sets the TimeStamp property of the QueryMachineDataSetTimeStamp object with the time stamp specified by index in the method call.

Syntax returnCode = %Query_MachineDataSetTimeStamp_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long Numerical position of the time stamp to retrieve (1 ≤ index ≤ RowCount) 8-64 Chapter 8

QueryMachineLot Object Class A QueryMachineLot object retrieves information about the sublots available for processing on a specified machine. The Query method returns a count of the number of sublots. Each call of the SetRow method returns the key of a specific sublot.

Identification

Object Name: InQueryMachineLot Interface Name: IInQueryMachineLot InTouch Object Name: %QueryMachineLot

Properties

The following table describes the properties of a QueryMachineLot object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of sublots available for processing on the machine Sublot Message String r SublotKey of a specific sublot Query Objects 8-65

Methods

This section describes the methods for a QueryMachineLot object.

Query

The Query method sets the RowCount property to the number of sublots that are available to be processed on the specified machine.

Syntax returnCode = %Query_MachineLot_Object.Query(machine); where:

Data Type Data Type Parameter (InTouch) (VB) Description

machine Message String NameKey of the machine for which to retrieve sublot information

SetRow

The SetRow method sets the Sublot property of the QueryMachineLot object with the name of the sublot specified by index in the method call.

Syntax returnCode = %Query_MachineLot_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the sublot to retrieve (1 ≤ index ≤ RowCount) 8-66 Chapter 8

QueryMachinesAtOperation Object Class

A QueryMachinesAtOperation object retrieves information about machines assigned to an operation. The Query method returns a count of the number of machines assigned to an operation. Each call of the SetRow method returns the name of a specific machine.

Identification

Object Name: InQueryMachinesAtOperation Interface Name: IInQueryMachinesAtOperation InTouch Object Name: %QueryMachinesAtOperation

Properties

The following table describes the properties of a QueryMachinesAtOperation object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of machines assigned to the operation Machine Message String r NameKey of the specified machine Query Objects 8-67

Methods

This section describes the methods for a QueryMachinesAtOperation object.

Query

The Query method sets the RowCount property to the number of machines assigned to the operation.

Syntax returnCode = %Query_MachinesAtOperation_Object.Query(operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

operation Message String VersionKey of the operation for which to retrieve machine information

SetRow

The SetRow method sets the Machine property of the QueryMachinesAtOperation object with the name of the machine specified by index in the method call.

Syntax returnCode = %Query_MachinesAtOperation_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the machine to retrieve (1 ≤ index ≤ RowCount) 8-68 Chapter 8

QueryMachineTask Object Class

A QueryMachineTask object retrieves information about machine tasks for a machine type. The Query method returns a count of the number of machine tasks found for the machine type. Each call of the SetRow method returns the name of a specific machine task.

Note: The machine task name returned when the SetRow method is called can be used as a parameter in the StartTask and CompleteTask methods of a Machine object.

Identification

Object Name: InQueryMachineTask Interface Name: IInQueryMachineTask InTouch Object Name: %QueryMachineTask

Properties

The following table describes the properties of a QueryMachineTask object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of machine tasks for the machine type MachineTask Message String r NameKey of the specified machine task Query Objects 8-69

Methods

This section describes the methods for a QueryMachineTask object.

Query

The Query method sets the RowCount property to the number of machine tasks found for the specified machine type.

Syntax returnCode = %Query_MachineTask_Object.Query(machineType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

machineType Message String NameKey of the machine type for which to retrieve machine tasks

SetRow

The SetRow method sets the MachineTask property of the QueryMachineTask object with the name of the machine task specified by index in the method call.

Syntax returnCode = %Query_MachineTask_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the machine task to retrieve (1 ≤ index ≤ RowCount) 8-70 Chapter 8

QueryMaterial Object Class

A QueryMaterial object retrieves information about materials of a specified type, either lot controlled or bulk. The Query method returns a count of the number of material objects found that meet the search criteria. Each call of the SetRow method returns information about a specific material.

Identification

Object Name: InQueryMaterial Interface Name: IInQueryMaterial InTouch Object Name: %QueryMaterial

Properties

The following table describes the properties of a QueryMaterial object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of material objects found for the material type Material Message String r VersionKey of the specified material object Description Message String r Description of this material Type Message String r Control type for this material: LOT or BULK

Query Objects 8-71

Methods

This section describes the methods for a QueryMaterial object.

Query

The Query method sets the RowCount property to the number of material objects found for the specified material type.

Syntax returnCode = %Query_Material_Object.Query(type); where:

Data Type Data Type Parameter (InTouch) (VB) Description

type Integer (short) Code indicating the type of material to retrieve: 1 = lot controlled 2 = bulk 3 = both

SetRow

The SetRow method sets the properties of the QueryMaterial object with information for the material specified by index in the method call.

Syntax returnCode = %Query_Material_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long Numerical position of the material information to retrieve (1 ≤ index ≤ RowCount) 8-72 Chapter 8

QueryMaterialInput Object Class

A QueryMaterialInput object retrieves information about input material for a target material (product) at a step on a route. An input material is any material that is consumed during the manufacturing process. The Query method returns a count of the number of input materials found for the target material at the route step. Each call of the SetRow method returns information about a specific input material. The QueryMaterialInput object is similar to the Sublot.GetConsumableMaterials method.

Identification

Object Name: InQueryMaterialInput Interface Name: IInQueryMaterialInput InTouch Object Name: %QueryMaterialInput

Properties

The following table describes the properties of a QueryMaterialInput object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of input materials found for the target material at the route step Material Message String r VersionKey of the specified input material object Location Message String r NameKey of the location of this input material Quantity Real Double r Default quantity to consume for this input material UnitOfMeasure Message String r Default quantity unit of measure for this input material ScaledQty Discrete Boolean r Boolean value to scale the consumed quantity: –1 = scale 0 = do not scale Query Objects 8-73

Methods

This section describes the methods for a QueryMaterialInput object.

Query

The Query method sets the RowCount property to the number of input materials found for the specified target material (product), route step, and route.

Syntax returnCode = %Query_MaterialInput_Object.Query(route, routeStep, material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

route Message String VersionKey of the route for which to retrieve input material information routeStep Message String NameKey of a route step associated with the route material Message String VersionKey of a target material associated with the route

SetRow

The SetRow method sets the properties of the QueryMaterialInput object with information for the input material specified by index in the method call.

Syntax returnCode = %Query_MaterialInput_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the input material information to retrieve (1 ≤ index ≤ RowCount) 8-74 Chapter 8

QueryMaterialOutput Object Class

A QueryMaterialOutput object retrieves information about output material for a target material (product) at a step on a route. An output material is any coproduct or by-product material produced in the manufacturing process. The Query method returns a count of the number of output materials found for the target material at the step on the route. Each call of the SetRow method returns information about a specific output material.

Identification

Object Name: InQueryMaterialOutput Interface Name: IinQueryMaterialOutput InTouch Object Name: %QueryMaterialOutput

Properties

The following table describes the properties of a QueryMaterialOutput object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of output materials found for the target material at the route step Route Message String r VersionKey of route for output material RouteStep Message String r NameKey of route step for output material Location Message String r NameKey of location of output material DispositionCode Message String r NameKey of disposition code for which to take output material off the route Material Message String r VersionKey of specified output material Quantity Real Double r Default quantity for output material UnitOfMeasure Message String r Default unit of measure for output material DecQty Discrete Boolean r Boolean value to decrement the lot quantity by the quantity of output material taken off the route: –1 = decrement 0 = do not decrement ScaledQty Discrete Boolean r Boolean value to scale consumed quantity: –1 = scale 0 = do not scale Query Objects 8-75

Methods

This section describes the methods for a QueryMaterialOutput object.

Query

The Query method sets the RowCount property to the number of output material objects found for the specified route, route step, and target material (product).

Syntax returnCode = %Query_MaterialOutput_Object.Query(route, routeStep, material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

route Message String VersionKey of the route for which to retrieve output material routeStep Message String NameKey of a route step associated with the route material Message String VersionKey of a target material associated with the route

SetRow

The SetRow method sets the properties of the QueryMaterialOutput object with information for the output material specified by index in the method call.

Syntax returnCode = %Query_MaterialOutput_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the output material information to retrieve (1 ≤ index ≤ RowCount) 8-76 Chapter 8

QueryMaterialRoute Object Class

A QueryMaterialRoute object retrieves route information for a target material (product). The Query method returns a count of the number of routes that can manufacture the target material. Each call of the SetRow method returns the name and version of a specific route.

Identification

Object Name: InQueryMaterialRoute Interface Name: IInQueryMaterialRoute InTouch Object Name: %QueryMaterialRoute

Properties

The following table describes the properties of a QueryMaterialRoute object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of routes on which the target material can be manufactured Route Message String r VersionKey of the specified route Query Objects 8-77

Methods

This section describes the methods for a QueryMaterialRoute object.

Query

The Query method sets the RowCount property to the number of routes on which the specified target material (product) can be manufactured.

Syntax returnCode = %Query_MaterialRoute_Object.Query(material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey of the target material for which to retrieve route information

SetRow

The SetRow method sets the Route property of the QueryMaterialRoute object with the name and version of the route specified by index in the method call.

Syntax returnCode = %Query_MaterialRoute_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the route to retrieve (1 ≤ index ≤ RowCount) 8-78 Chapter 8

QueryMaterialSpec Object Class

A QueryMaterialSpec object retrieves information about customer specifications for a target material (product). The Query method returns a count of the number of customer specifications found for the target material. Each call of the SetRow method returns information about a specific customer specification.

Identification

Object Name: InQueryMaterialSpec Interface Name: IInQueryMaterialSpec InTouch Object Name: %QueryMaterialSpec

Properties

The following table describes the properties of a QueryMaterialSpec object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of customer specifications found for the target material CustomerSpecification Message String r VersionKey of the specified customer specification Description Message String r Description of this customer specification Query Objects 8-79

Methods

This section describes the methods for a QueryMaterialSpec object.

Query

The Query method sets the RowCount property to the number of customer specifications for the specified target material.

Syntax returnCode = %Query_MaterialSpec_Object.Query(material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

material Message String VersionKey of the target material for which to retrieve customer specification information

SetRow

The SetRow method sets the properties of the QueryMaterialSpec object with information for the customer specification specified by index in the method call.

Syntax returnCode = %Query_MaterialSpec_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the customer specification information to retrieve (1 ≤ index ≤ RowCount) 8-80 Chapter 8

QueryMergeLot Object Class

A QueryMergeLot object retrieves information about sublots eligible to merge with a lot. The Query method returns a count of the number of sublots that can be merged with the lot. Each call of the SetRow method returns information about a specific lot.

Identification

Object Name: InQueryMergeLot Interface Name: IInQueryMergeLot InTouch Object Name: %QueryMergeLot

Properties

The following table describes the properties of a QueryMergeLot object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of sublots that can be merged with the lot Sublot Message String r SublotKey of the specified sublot PrimaryQty Real Double r Primary quantity of this sublot Query Objects 8-81

Methods

This section describes the methods for a QueryMergeLot object.

Query

The Query method sets the RowCount property to the number of sublots found that are eligible to merge with the specified lot.

Syntax returnCode = %Query_MergeLot_Object.Query(lotID); where:

Data Type Data Type Parameter (InTouch) (VB) Description

lotID Message String LotKey of the lot for which to retrieve sublots eligible to merge

SetRow

The SetRow method sets the properties of the QueryMergeLot object with information for the sublot specified by index in the method call.

Syntax returnCode = %Query_MergeLot_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the sublot information to retrieve (1 ≤ index ≤ RowCount) 8-82 Chapter 8

QueryOperation Object Class

A QueryOperation object retrieves information about an operation at a step on a route. The Query method returns a count of the number of instances of the operation found at the route step. In addition to the standard attribute values, there can be overrides for an optional target material (product), or for an optional customer specification, or both. Each call of the SetRow method returns information about a specific instance of operation attributes. The QueryOperation object is similar to the Sublot.GetOperationInfo method.

Identification

Object Name: InQueryOperation Interface Name: IInQueryOperation InTouch Object Name: %QueryOperation

Properties

The following table describes the properties of a QueryOperation object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of instances of the operation at the route step and optionally, for the target material or customer specification Operation Message String r VersionKey of the specified operation object Overlapped Discrete Boolean r Boolean value indicating if entire sublot quantity must be completed before moving material to next route stop: –1 = do not require completion 0 = require completion CompleteOnly Discrete Boolean r Boolean value for WIP lot tracking: –1 = complete transactions only 0 = start and complete transactions CycleTime Object Object r TimeInterval, operation cycle time QueueTime Object Object r TimeInterval, maximum time a sublot can be queued at this operation StandardYield Real Double r Percentage of target material of type GOOD produced by this operation Level Integer Short r Override level for this operation: 0 = default 1 = target material-level override 2 = customer spec-level override Query Objects 8-83

Methods

This section describes the methods for a QueryOperation object.

Query

The Query method sets the RowCount property to the number of instances found for the operation for the specified route, route step, target material (product), and customer specification.

Syntax returnCode = %Query_Operation_Object.Query(route, routeStep, material, customerSpec); where:

Data Type Data Type Parameter (InTouch) (VB) Description

route Message String VersionKey of the route for which to retrieve operation objects routeStep Message String NameKey of a route step associated with the route material Message String VersionKey of a target material override for the operation customerSpec Message String VersionKey of a customer specification override for the operation

SetRow

The SetRow method sets the properties of the QueryOperation object with information for the operation specified by index in the method call.

Syntax returnCode = %Query_Operation_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the operation information to retrieve (1 ≤ index ≤ RowCount) 8-84 Chapter 8

QueryQualifiedUser Object Class

A QueryQualifiedUser object retrieves user certification information associated with an operation. The Query method returns a count of the number of users currently certified for the operation. Each call of the SetRow method returns the name of a qualified user.

Identification

Object Name: InQueryQualifiedUser Interface Name: IInQueryQualifiedUser InTouch Object Name: %QueryQualifiedUser

Properties

The following table describes the properties of a QueryQualifiedUser object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of users currently certified for the operation User Message String r NameKey of the specified user Query Objects 8-85

Methods

This section describes the methods for a QueryQualifiedUser object.

Query

The Query method sets the RowCount property to the number of currently certified users for the specified operation.

Syntax returnCode = %Query_QualifiedUser_Object.Query(operation); where:

Data Type Data Type Parameter (InTouch) (VB) Description

operation Message String VersionKey of the operation for which to retrieve user certification information

SetRow

The SetRow method sets the User property of the QueryQualifiedUser object with the name of the certified user specified by index in the method call.

Syntax returnCode = %Query_QualifiedUser_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the user to retrieve (1 ≤ index ≤ RowCount) 8-86 Chapter 8

QueryRouteMaterial Object Class

A QueryRouteMaterial object retrieves material information for a route. The Query method returns a count of the number of target materials (products) associated with the route. Each call of the SetRow method returns the name and version of a specific material.

Note: If you do not change the route name (including the version) from the NONE default value, the returned count reflects the target materials associated with all routes in the database.

Identification

Object Name: InQueryRouteMaterial Interface Name: IInQueryRouteMaterial InTouch Object Name: %QueryRouteMaterial

Properties

The following table describes the properties of a QueryRouteMaterial object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of target materials associated with the route Material Message String r VersionKey of the specified target material Query Objects 8-87

Methods

This section describes the methods for a QueryRouteMaterial object.

Query

The Query method sets the RowCount property to the number of target materials (products) associated with the specified route.

Syntax returnCode = %Query_RouteMaterial_Object.Query(route); where:

Data Type Data Type Parameter (InTouch) (VB) Description

route Message String VersionKey of the route for which to retrieve target materials

SetRow

The SetRow method sets the Material property of the QueryRouteMaterial object with the name and version of the material specified by index in the method call.

Syntax returnCode = %Query_RouteMaterial_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the material to retrieve (1 ≤ index ≤ RowCount) 8-88 Chapter 8

QueryRouteStep Object Class

A QueryRouteStep object retrieves route step information for a route. You can specify whether all the route steps are retrieved, or only those on the main path of the route. The Query method returns a count of the route steps that meet the search criteria. Each call of the SetRow method returns the name of a specific route step.

Identification

Object Name: InQueryRouteStep Interface Name: IInQueryRouteStep InTouch Object Name: %QueryRouteStep

Properties

The following table describes the properties of a QueryRouteStep object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of steps in the route that meet the search criteria RouteStep Message String r NameKey of a specified route step Query Objects 8-89

Methods

This section describes the methods for a QueryRouteStep object.

Query

The Query method sets the RowCount property to the number of route steps for the specified route. Use the mainPathOnly parameter to retrieve all the route steps or only those on the main path of the route.

Syntax returnCode = %Query_RouteStep_Object.Query(route, mainPathOnly); where:

Data Type Data Type Parameter (InTouch) (VB) Description

route Message String VersionKey of the route for which to retrieve route steps mainPathOnly Integer Short Code that indicates to retrieve: 0 = all steps in the route –1 = only steps on the main path

SetRow

The SetRow method sets the RouteStep property of the QueryRouteStep object with the name of the route step specified by index in the method call.

Syntax returnCode = %Query_RouteStep_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the route step to retrieve (1 ≤ index ≤ RowCount) 8-90 Chapter 8

QueryRuntimeConfig Object Class

A QueryRuntimeConfig object retrieves runtime configuration information including user variables. The Query method returns a count of the number of runtime configuration items found. Each call of the SetRow method returns the name and string value for a specific runtime configuration item. Use the Database.GetUserVariable method to retrieve the integer and real values for a runtime configuration option.

Identification

Object Name: InQueryRuntimConfig Interface Name: IInQueryRuntimeConfig InTouch Object Name: %QueryRuntimeConfig

Properties

The following table describes the properties of a QueryRuntimeConfig object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of runtime configuration items found Name Message String r Name of the specified runtime configuration item Value Message String r Value of this runtime configuration item

Methods

This section describes the methods for a QueryRuntimeConfig object.

Query

The Query method sets the RowCount property to the number of runtime configuration items found.

Syntax returnCode = %Query_RuntimeConfig_Object.Query(); Query Objects 8-91

SetRow

The SetRow method sets the properties of the QueryRuntimeConfig object with information for the runtime configuration item specified by index in the method call.

Syntax returnCode = %Query_RuntimeConfig_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the runtime configuration item to retrieve (1 ≤ index ≤ RowCount) 8-92 Chapter 8

QuerySQL Object Class

A Query object retrieves row and column information from one or more database tables. You specify the search criteria for QuerySQL with the “from” (table name), “select” (column name), and “where” (predicate) parameters. You can specify as many table names with the “from” parameter and as many column names with the “select” parameter as needed, separating each parameter with a comma. You also can order the information by any column within any specified table using the “where” parameter. Calling the Query method sets the RowCount property to the number of records and the ColumnCount property to number of columns selected for each record. Calling the SetRow method points to a specific record. After identifying the record for which you want information with the SetRow method, the ColumnName method returns the column name containing the value, the ColumnValue method returns the value, the ColumnType method returns the data type of the value, and the ColumnSize method returns the size of the value (in bytes, maximum = 80). The QuerySQL object can query only InTrack tables, including DataSetTemplates and User Defined Tables. Any standard column, user defined attribute, or data item column can be queried. The table names and column names are case-sensitive. Table aliases, aggregate functions, order by clauses, etc., are allowed.

To use a QuerySQL object: 1. Create a QuerySQL object. 2. Call the Query method, specifying the search criteria with the “from” (table name), “select” (column name), and “where” (predicate) parameters. This will set the RowCount and ColumnCount properties. 3. Call the SetRow method to point to a specific record. 4. After identifying the record for which you want information with the SetRow method, call the ColumnName method to return the column name containing the value, the ColumnValue method to return the value, the ColumnType method to return the data type of the value, and the ColumnSize method to return the size of the value. Query Objects 8-93

Example The following script retrieves specified information with a QuerySQL object (named %Query_SQL_Object). This example creates a QuerySQL object and identifies the information to retrieve with the Query method parameters (“LotID”, “QueuedQty” and “Location” information for “ChateauNatural” from the “Lot” and “Sublot” tables). Script also is provided to call a Query method, determine the value of the RowCount property, use the SetRow method to return the appropriate record, and the ColumnValue method to return specific data. 1. Create a QuerySQL object. OLE_CreateObject(%Query_SQL_Object, “InTrack.QuerySQL”); 2. Call the Query method to perform the query. The number of matches is returned in RowCount. returnCode = %Query_SQL_Object.Query(“Lot, Sublot”, “Sublot.LotID, Location, QueuedQty” “where Lot.LotID = Sublot.LotID AND Lot.MaterialName = ‘ChateauNatural’ order by Sublot.LotID”); 3. The following table is generated (although not displayed):

LotID Location QueuedQty Index (column) (column) (column) 1 Lot-123 Production 10 2 Lot-123 Repair 20 3 Lot-123 Shipping 10 4 Lot-124 Production 50 5 Lot-124 Shipping 50 4. Call the SetRow method and identify the row for which you want data. returnCode = %Query_SQL_Object.SetRow(3); 5. The following row is selected (although not displayed):

LotID Location QueuedQty Index (column) (column) (column) 3 Lot-123 Shipping 10 6. Call the ColumnValue method and identify the row for which you want information through the attribute name or index. LotID = %Query_SQL_Object.ColumnValue(LotID); Location = %Query_SQL_Object.ColumnValue(Location) Quantity = %Query_SQL_Object.ColumnValue(QueuedQty) 7. The LotID, Location and Quantity are returned.

Note: Return values must be defined as one of the following data types: Discrete, Integer, Real, Message, Object Date, Object DateTime, Object Time, Object TimeInterval. 8-94 Chapter 8

Identification

Object Name: InQuerySQL Interface Name: IInQuerySQL InTouch Object Name: %QuerySQL

Properties

The following table describes the properties of a QuerySQL object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of rows meeting the search criteria ColumnCount Integer Long r Number of columns meeting the search criteria

Methods

This section describes the methods for a Query object.

ColumnName

The ColumnName method returns the column name specified by index in the method call. ColumnName is called after Query has been used to return a record set.

Syntax columnNameTag = %Query_SQL_Object.ColumnName(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the attribute to retrieve (1 ≤ index ≤ ColumnCount)

Note: columnNameTag must be defined as a Message data type. Query Objects 8-95

ColumnSize

The ColumnSize method returns the size of the attribute specified by index or attributeName in the method call. ColumnSize is called after Query has been used to return a record set.

Syntax columnSizeTag = %Query_SQL_Object.ColumnSize(index); columnSizeTag = %Query_SQL_Object.ColumnSize(attributeName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the attribute to retrieve (1 ≤ index ≤ ColumnCount) attributeName Message String Name of the column for which to retrieve the size

Note: columnSizeTag must be defined as an Integer (short) data type. 8-96 Chapter 8

ColumnType

The ColumnType method returns the data type of the attribute specified by index or attributeName in the method call. ColumnType is called after SetRow has been used to return a record set.

Syntax columnTypeTag = %Query_SQL_Object.ColumnType(index); columnTypeTag = %Query_SQL_Object.ColumnType(attributeName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the attribute to retrieve (1 ≤ index ≤ ColumnCount) attributeName Message String Name of the column for which to retrieve the data type

Note: Data types that can be returned include: 1 String 3 Integer 4 Real 5 Double 6 Date 7 Time 8 DateTime 9 TimeInterval 10 Discrete/Boolean Query Objects 8-97

ColumnValue

The ColumnValue method returns the column value of the attribute specified by index or attributeName in the method call. ColumnValue is called after SetRow has been used to select a record.

Syntax columnValueTag = %Query_SQL_Object.ColumnValue(index); columnValueTag = %Query_SQL_Object.ColumnValue(attributeName); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the column to retrieve (1 ≤ index ≤ ColumnCount) attributeName Message String Name of the column for which to retrieve the value

Note: columnValueTag must be defined as one of the following data types: Discrete, Integer, Real, Message, Object Date, Object DateTime, Object Time, Object TimeInterval.

Query

The Query method creates a list of rows and columns that meet the criteria defined through the Query parameters. The Query method also sets the RowCount property to the number of rows meeting the search criteria and the ColumnCount property to the number of columns meeting the search criteria.

Note: The information can be ordered by any column within any specified table through the where parameter of the method call. 8-98 Chapter 8

Syntax returnCode = %Query_SQL_Object.Query(from, select, where); where:

Data Type Data Type Parameter (InTouch) (VB) Description

from Message String Name of the table from which to obtain information; can be multiple table names separated by commas – OR – Integer Short Constant of the object ID for the object type select Message String Name of the column from which to obtain information; can use multiple column names separated by commas where Message String Name of the SQL WHERE predicate that serves as the basis for filtering the list of rows Note: When searching multiple tables, the predicate should contain the join condition(s)

SetRow

The SetRow method points to the record specified by index in the method call. After the record is retrieved, use the appropriate method to obtain ColumnValue, ColumnName, ColumnType, and ColumnSize information.

Syntax returnCode = %Query_SQL_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the record to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-99

QueryStepSetpoint Object Class

A QueryStepSetpoint object retrieves information about setpoints for a target material (product) on a route. The Query method returns a count of the number of setpoints found for the target material at the route step. Each call of the SetRow method returns information about a specific setpoint at that route step.

Identification

Object Name: InQueryStepSetpoint Interface Name: IInQueryStepSetpoint InTouch Object Name: %QueryStepSetpoint

Properties

The following table describes the properties of a QueryStepSetpoint object.

Data Type Data Type Property (InTouch) (VB) Access Description

Data Type Integer Short r Data type of the setpoint 1 Real 2 String 3 Discrete/Boolean 4 Date 5 Integer 6 String Selection 7 DateTime 8 Time 9 TimeInterval 10 Integer with Limits 11 Real with Limits 12 Double 13 Double with Limits RowCount Integer Long r Number of setpoints found for the target material at the route step SetpointName Message String r NameKey of the setpoint TemplateKey Message String r VersionKey of the setpoint’s template Value var VARIANT r Actual value of the setpoint 8-100 Chapter 8

Methods

This section describes the methods for a QueryStepSetpoint object.

Query

The Query method sets the RowCount property to the number of setpoints found for the specified target material, route and step.

Syntax returnCode = %Query_StepSetpoint_Object.Query(route, routeStep, material); where:

Data Type Data Type Parameter (InTouch) (VB) Description

route Message String VersionKey of the route for which to retrieve setpoint information routeStep Message String NameKey of a route step associated with the route material Message String VersionKey of a target material associated with the route

SetRow

The SetRow method sets the properties of the QueryStepSetpoint object with information for the setpoint specified by index in the method call.

Syntax returnCode = %Query_StepSetpoint_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the setpoint information to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-101

QuerySubstituteMaterialInput Object Class

A QuerySubstituteMaterialInput object retrieves information about substitute input materials for a target material (product) at a step on a route. A substitute input material is defined in ModelMaker. The Query method returns a count of the number of substitute input materials for the target material at the route step. Each call of the SetRow method returns information about a specific substitute input material. The Query.SubstituteMaterialInput object is similar to the Sublot.GetSubstituteMaterials method.

Identification

Object Name: InQuerySubstituteMaterialInput Interface Name: IInQuerySubstituteMaterialInput InTouch Object Name: %QuerySubstituteMaterialInput

Properties

The following table describes the properties of a QuerySubstituteMaterialInput object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of substitute input materials found for the target material on a step on the route Material Message String r VersionKey of the specified substitute input material object StandardQty Real Double r Quantity of this substitute material required to replace the input material UnitOfMeasure Message String r Unit of measure for this substitute input material MaxSubRatio Real Double r Maximum substitute ratio for this substitute input material 8-102 Chapter 8

Methods

This section describes the methods for a QuerySubstituteMaterialInput object.

Query

The Query method sets the RowCount property to the number of substitute input materials found for the specified route, route step, and target material (product).

Syntax returnCode = %Query_SubstituteMaterialInput_Object.Query(route, routeStep, material, materialInput); where:

Data Type Data Type Parameter (InTouch) (VB) Description

route Message String VersionKey of the route for which to retrieve a substitute input material routeStep Message String NameKey of a route step associated with the route material Message String VersionKey of a target material associated with the route materialInput Message String VersionKey of an input material for which to retrieve a substitute input material

SetRow

The SetRow method sets the properties of the QuerySubstituteMaterialInput object with information for the substitute input material specified by index in the method call.

Syntax returnCode = %Query_SubstituteMaterialInput_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the substitute input material object to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-103

QueryTypedMachines Object Class

A QueryTypedMachines object retrieves information for machines associated with a machine type. The Query method returns a count of the number of machines. Each call of the SetRow method returns the name of a specific machine.

Identification

Object Name: InQueryTypedMachines Interface Name: IInQueryTypedMachines InTouch Object Name: %QueryTypedMachines

Properties

The following table describes the properties of a QueryTypedMachines object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of machines found for the machine type Machine Message String r NameKey of the specified machine 8-104 Chapter 8

Methods

This section describes the methods for a QueryTypedMachines object.

Query

The Query method sets the RowCount property to the number of machine objects associated with the specified machine type.

Syntax returnCode = %Query_TypedMachines_Object.Query(machineType); where:

Data Type Data Type Parameter (InTouch) (VB) Description

machineType Message String NameKey of the machine type for which to retrieve machine objects

SetRow

The SetRow method sets the Machine property of the QueryTypedMachines object with the name of the machine specified by index in the method call.

Syntax returnCode = %Query_TypedMachines_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the machine to retrieve (1 ≤ index ≤ RowCount) Query Objects 8-105

QueryUDA_Name Object Class

A QueryUDA_Name object retrieves information about user-defined attributes (UDAs) associated with an object type. The Query method returns a count of the number of UDAs found for the object type. Each call of the SetRow method returns information about a specific UDA. The numeric constant corresponding to each UDA data type is as follows:

1 ITR_UDA_ANALOG_TYPE 7 ITR_UDA_DATE_TIME_TYPE 2 ITR_UDA_ALPHANUMERIC_TYPE 8 ITR_UDA_TIME_TYPE 3 ITR_UDA_BOOLEAN_TYPE 9 ITR_UDA_TIME_INTERVAL_TYPE 4 ITR_UDA_DATE_TYPE 12 ITR_UDA_DOUBLE_TYPE 5 ITR_UDA_INTEGER_TYPE

Identification

Object Name: InQueryUDA_Name Interface Name: IInQueryUDA_Name InTouch Object Name: %QueryUDA_Name

Properties

The following table describes the properties of a QueryUDA_Name object.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of UDAs found for the object type ItemName Message String r Name of the specified UDA data item ItemType Integer Short r Data type of this UDA data item: 1 ITR_UDA_ANALOG_TYPE 2 ITR_UDA_ALPHANUMERIC_TYPE 3 ITR_UDA_BOOLEAN_TYPE 4 ITR_UDA_DATE_TYPE 5 ITR_UDA_INTEGER_TYPE 7 ITR_UDA_DATE_TIME_TYPE 8 ITR_UDA_TIME_TYPE 9 ITR_UDA_TIME_INTERVAL_TYPE 12 ITR_UDA_DOUBLE_TYPE Label Message String r Label of this UDA data item 8-106 Chapter 8

Methods

This section describes the methods for a QueryUDA_Name object.

Query

The Query method sets the RowCount property to the number of UDAs found for the specified object type.

Syntax returnCode = %Query_UDA_Name_Object.Query(objectID); where:

Data Type Data Type Parameter (InTouch) (VB) Description

objectID Integer Short Constant of the object ID of object type for which to retrieve UDAs 1 Calendar 2 CustomerSpecifications 3 DatasetTemplate 4 DispositionCode 5 Location 6 Lot 7 Machine 8 MachineStatus 9 MachineType 10 Material 11 Operation 12 Route 13 SecurityGroup 14 Serial Number 15 Sublot 17 Certification 18 WorkInstruction Query Objects 8-107

SetRow

The SetRow method sets the properties of the QueryUDA_Name object with UDA information for the UDA specified by index in the method call.

Syntax returnCode = %Query_UDA_Name_Object.SetRow(index); where:

Data Type Data Type Parameter (InTouch) (VB) Description

index Integer Long List position of the UDA information to retrieve (1 ≤ index ≤ RowCount) 9-1

CHAPTER 9

Import API Objects

Import API object classes enable the creation, modification and deletion of standard ModelMaker objects using Visual Basic or other program languages. Access to all configuration functions via an API will permit automatic population of the configuration database. Route creation should be accessible using ActiveX/COM by providing a dual interface ActiveX server. At least one API object class has been created for each InTrack object, with methods to enable creation, modification and deletion. In addition, collection classes are provided when applicable to enable processing of objects in collections as well as individually.

All InTrack OLE automation class names begin with “In”. The class name and method names are visible in the type library and are accessed by programmer assistance tools such as the Object Browser in Visual Basic. By convention, the string ID to create an InTrack OLE automation object is “InTrack.ClassName,” where the class name is that same as the type library name.

This section describes each general object class and provides property and method information where applicable. 9-2 Chapter 9

Contents InCustomerSpecification Object Class, 4 InDataSetItem Object Class, 7 InDataSetItems Object Class, 12 InDataSetTemplate Object Class, 14 InDataSetTemplates Object Class, 22 InDispositionCode Object Class, 24 InDispositionCodes Object Class, 27 InLocation Object Class, 29 InMachine Object Class, 32 InMachines Object Class, 42 InMachineType Object Class, 44 InMaterial Object Class, 50 InOperation Object Class, 69 InRoute Object Class, 79 InRoutePath Object Class, 89 InRoutePaths Object Class, 90 InRouteStep Object Class, 92 InRouteSteps Object Class, 94 InSetpointItem Object Class, 96 InSetpointItems Object Class, 99 InSetpointTemplate Object Class, 101 InSetpointTemplates Object Class, 107 InStepSetpointItem Object Class, 109 InStepSetpointItems Object Class, 111 InTable Object Class, 114 InTableColumn Object Class, 119 InTableColumns Object Class, 120 InWorkInstructions Object Class, 122 InWorkInstructionsList Object Class, 126

Import API Objects 9-3

Create, Load and Delete Three standard methods are used in most API objects: Create, Load and Delete. The Create method saves a dataset template’s attributes to the database. When an object is created, all attributes are assigned. The first argument is the key for the object. After creation, non-key attributes except are not set in the interest of performance. Calling Create a second time overwrites the existing attributes in the database. The Load method reads a dataset template’s attributes from the database. Before loading a template, the template’s key must be set. This method has not arguments. The Delete method deletes aattributes from the database. Before removing an object, the template’s key must be set. These three standard methods provide all the functions necessary in order to insert, update and delete InTrack objects from the database. The first time Create is called, an initial version of the template is inserted into the database. After Load is called and any edits performed, a second call to Create saves an updated version of the template to the database. Note that it is not necessary to call Delete before calling Create again.

User Defined Attributes In addition to the core methods, three methods are used to manage user-defined attributes (UDAs): The GetUDAValue method is used to read a UDA value from its name, GetUDAType is used to get the data type of a UDA from its name, and SetUDA is used to set a UDA value from its name.

Standard Properties The key string is the default property. Its name is the same as the object class, with the word “Key” appended. It is read/write. All other template properties are read-only. These properties are set by calling the template’s Load method. No other methods affect their value.

Collection Methods A collection object is used to save time when processing a group of data items together merits it. Likewise collection objects may used for data collection, such as DataSetTemplates. For collections (lists) of objects, the following methods are standard: Add, Clear, Count and Remove. The Add method appends a data item to the collection. The Clear method removes all data items from the collection. The Count method returns a count of the number of data items in the list. The Remove method deletes a data item from the collection. The number of items in the collection (count) is the standard property. Wherever a collection object can be passed (as a LPDISPATCH pointer) in an argument list, a single object from that collection also can be passed. Passing a single object does not require creation of a corresponding collection object.

9-4 Chapter 9

InCustomerSpecification Object Class

The InCustomerSpecification object class provides an OLE automation interface to the InTrack customer specification object. The creation string for the InCustomerSpecification object class is InTrack.CustomerSpecification. The customer specification’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method.

Properties The following table describes the properties of an InCustomerSpecification object.

Property Data Type Access Description

SpecificationKey Message or String r/w Version key identifying the InCustomerSpecification object (default property) Description Message or String r Description

Methods This section describes the methods of the InCustomerSpecification class.

Create

The Create method creates an InCustomerSpecification object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InCustomerSpecification.Create(specificationKey, Description);

where:

Parameter Data Type Description

SpecificationKey String Customer specification key Description String Description Import API Objects 9-5

Delete

The Delete method removes an InCustomerSpecification object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %InCustomerSpecification.Delete();

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InCustomerSpecification object class.

Syntax ReturnCode = %InCustomerSpecification.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InCustomerSpecification object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %InCustomerSpecification.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call 9-6 Chapter 9

Load

The Load method populates the read-only properties of the InCustomerSpecification object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InCustomerSpecification.Load();

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InCustomerSpecification object.

Syntax returnCode = %InCustomerSpecification.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type Import API Objects 9-7

InDataSetItem Object Class

The InDataSetItem object class provides an OLE automation interface to the InTrack dataset template data items. The creation string for the InDataSetItem object class is InTrack.DataSetItem. To process InDataSetItem objects as a collection, use the InDataSetItems object class.

Properties The following table describes the properties of an InDataSetItem object.

Property Data Type Access Description

Data Type Integer (short) r/w Data type of this item: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 6 = String selection 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 10 = Long integer with limits 11 = Short real with limits 12 = Double real 13 = Double real with limits Description String r/w Description of data item Label String r/w Label associated with data item Name String r/w Data item name (default property Required Boolean r/w Data item required flag: -1 = yes 0 = no StringSelections String r/w Comma-separated list of allowed selections for the string selection data type StringWidth Long integer r/w Maximum allowed width for the string and string selection data types Value VARIANT r/w Data item value matching the data type 9-8 Chapter 9

Methods This section describes the methods of the InDataSetItem class.

GetHoldFlags

The GetHoldFlags method returns the lot hold flag information for a data item, with type defined as long interger with limits, short real with limits, or double real with limits.

Syntax returnCode = %InDataSetItem.GetHoldFlags(highHighFlag, highFlag, lowFlag, lowLowFlag);

where:

Parameter Data Type Description

HighHighFlag Boolean Returned value indicating to place lot on hold if collected data exceeds high- high limit: -1 = yes 0 = no HighFlag Boolean Returned value indicating to place lot on hold if collected data exceeds high limit: -1 = yes 0 = no LowFlag Boolean Returned value indicating to place lot on hold if collected data exceeds low limit: -1 = yes 0 = no LowLowFlag Boolean Returned value indicating to place lot on hold if collected data exceeds low- low limit: -1 = yes 0 = no Import API Objects 9-9

GetLimitValue

The GetLimitValue method returns the value of a specified limit of a dataset item object. The returned VARIANT limitValue contains the returned data value. This method is used primarily with InTouch.

Syntax LimitValue = %DataSetItem.GetLimitValue(limitId, returnCode);

where:

Parameter Data Type Description

LimitId Integer (short) Identifier for the desired limit and enumerated value: 0 = instrument high (LimitTypes.InstrumentHigh) 1 = high-high (LimitTypes.HighHigh) 2 = high (LimitTypes.High) 3 = low (LimitTypes.Low) 4 = low-low (LimitTypes.LowLow) 5 = instrument low(LimitTypes.InstrumentLow) returnCode Integer (long) Returned status from the method call

GetRanges

The GetRanges method returns the limit values for a data item, with a type defined as long integer with limits, short real with limits, or double real with limits.

Syntax returnCode = %InDataSetItem.GetRanges(instrumentHigh, highHigh, high, low, lowLow, instrumentLow);

where:

Parameter Data Type Description

InstrumentHigh VARIANT Returned instrument-high value HighHigh VARIANT Returned high-high value High VARIANT Returned high value Low VARIANT Returned low value LowLow VARIANT Returned low-low value InstrumentLow VARIANT Returned instrument-low value 9-10 Chapter 9

SetHoldFlags

The SetHoldFlags method sets the lot hold flag information for a data item, with type defined as long interger with limits, short real with limits, or double real with limits.

Syntax returnCode = %InDataSetItem.SetHoldFlags(highHighFlag, highFlag, lowFlag, lowLowFlag);

where:

Parameter Data Type Description

HighHighFlag Boolean Value indicating to place lot on hold if collected data exceeds high-high limit: -1 = yes 0 = no HighFlag Boolean Value indicating to place lot on hold if collected data exceeds high limit: -1 = yes 0 = no LowFlag Boolean Value indicating to place lot on hold if collected data exceeds low limit: -1 = yes 0 = no LowLowFlag Boolean Value indicating to place lot on hold if collected data exceeds low-low limit: -1 = yes 0 = no Import API Objects 9-11

SetRanges

The SetRanges method sets the limit values for a data item, with a type defined as long integer with limits, short real with limits, or double real with limits.

Syntax returnCode = %InDataSetItem.SetRanges(instrumentHigh, highHigh, high, low, lowLow, instrumentLow);

where:

Parameter Data Type Description

InstrumentHigh VARIANT Returned instrument-high value HighHigh VARIANT Returned high-high value High VARIANT Returned high value Low VARIANT Returned low value LowLow VARIANT Returned low-low value InstrumentLow VARIANT Returned instrument-low value 9-12 Chapter 9

InDataSetItems Object Class

The InDataSetItems object class is a collection class. It groups multiple InDataSetItem objects for processing as a group instead of individually.

Properties The following table describes the property of an InDataSetItems object.

Property Data Type Access Description

Count Integer (long) r Number of InDataSetItem objects in the InDataSetItems collection.

Methods This section describes the methods of the InDataSetItems class.

Add

The Add method adds an InDataSetItem object(s) to an InDataSetItems object. The InDataSetItem object is specified through the %InDataSetItem in the method call.

Syntax returnCode = %InDataSetItems.Add(%InDataSetItem);

where:

Parameter Data Type Description

InDataSetItem Object InDataSetItem object(s) to add to the collection.

Clear

The Clear method clears all InDataSetItem objects from an InDataSetItems object.

Syntax returnCode = %InDataSetItems.Clear(); Import API Objects 9-13

Item

The Item method locates an InDataSetItem object within an InDataSetItems object. The InDataSetItem object is specified by index or item name in the method call.

Syntax %InDataSetItem = %InDataSetItems.Item(index); %InDataSetItem = %InDataSetItems.Item(itemName);

where:

Parameter Data Type Description

Index Integer (long) List position of InDataSetItem object to locate (1 ≤ index ≤ Count) ItemName String Name key identifying the InDataSetItem object to locate.

Remove

The Remove method removes an InDataSetItem object from an InDataSetItems object. The InDataSetItem object is specified by index, name, or InDataSetItem object in the method call.

Syntax returnCode = %InDataSetItems.Remove(index); returnCode = %InDataSetItems.Remove(itemName); returnCode = %InDataSetItems.Remove(template);

where:

Parameter Data Type Description

Index Integer (long) List position of InDataSetItem object to remove (1 ≤ index ≤ Count) ItemName String Version key identifying the InDataSetItem object to remove. template Object InDataSetItem object to remove.

9-14 Chapter 9

InDataSetTemplate Object Class

The InDataSetTemplate object class provides an OLE automation interface to the InTrack dataset template object. The creation string for the InDataSetTemplate object class is InTrack.DataSetTemplate. Individual data items within the dataset templates are managed by the InDataSetItem object class and InDataSetItems collection class. The dataset template’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method. To process InDataSetTemplate objects as a collection, use the InDataSetTemplates object class.

Properties The following table describes the properties of an InDataSetTemplate object.

Property Data Type Access Description

DataSetTemplateKey String r/w Version key identifying the InDataSetTemplate object (default property) DataSetItems InDataSetItems r Collection of InDataSetItem objects Description String r Dataset template description ParentDataSetTemplateKey String r Version key identifying the parent dataset template RequiredSampleCount Integer (long) r Number of samples to collect (for variable data collection only) RequiredSampleRatio Single real r Fraction of lot quantity to sample (for variable data collection only) RuntimeDataTable String r Name of table in which to store runtime data SampleNames String r List of sample names (comma- separated) SamplingPlanType Integer (short) r Value that identifies whether sample collection is: 0 = fixed 1 = variable Import API Objects 9-15

Methods This section describes the methods of the InDataSetTemplate class.

AddDataSetItems

The AddDataSetItems method appends new dataset item(s) and saves the modified template to the database. The template key property must be set before calling this method.

Syntax returnCode = %InDataSetTemplate.AddDataSetItems(items);

where:

Parameter Data Type Description

Items InDataSetItem(s) InDataSetItem or InDataSetItems (collection) to append to the dataset template list of data items

AssociateParent

The AssociateParent method attaches this child dataset template to another template and saves the modified template to the database. The template key property must be set before this method can be called.

Syntax returnCode = %InDataSetTemplate.AssociateParent(parentTemplate);

where:

Parameter Data Type Description

parentTemplate InDataSetTemplate or String Dataset template object or version key string identifying the parent template 9-16 Chapter 9

Create

The Create method creates an InDataSetTemplate object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InDataSetTemplate.Create(templateKey, description, tableName, planType, sampleCount, sampleRatio, parentTemplate, samples, items);

where:

Parameter Data Type Description

TemplateKey Message or String Version key string identifying the template Description String Dataset template description TableName String Name of the table in which to store runtime data PlanType Integer (long) Value that identifies whether sample collection is: 0 = fixed 1 = variable SampleCount Integer (short) Number of samples to collect (for variable data collection only) SampleRatio Single real Fraction of lot quantity to sample(for variable data collection only) ParentTemplate InDataSetTemplate or String Dataset template object or version key string identifying the parent template Samples String List of sample name(s), comma- separated Items InDataSetItem(s) A single InDataSetItem or a collection of InDataSetItem objects

Delete

The Delete method removes an InDataSetTemplate object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %InDataSetTemplate.Delete(); Import API Objects 9-17

DeleteDataSetItems

The DeleteDataSetItems method removes the data items and saves the modified dataset template to the InTrack database. The template key property must be set before this method is called.

Syntax returnCode = %InDataSetTemplate.DeleteDataSetItems(items);

where:

Parameter Data Type Description

Items InDataSetItem(s) or String InDataSetItem object(s) to remove from the template list of data items, or a comma-separated list of data item names to remove

DisassociateParent

The DisassociateParent method detaches the child dataset template from another template and saves the modified template to the InTrack database with a new runtime data table name. The template key property must be set before this method can be called.returns.

Syntax returnCode = %InDataSetTemplate.DisassociateParent(tableName);

where:

Parameter Data Type Description

TableName String Name of the new table in which to store runtime data 9-18 Chapter 9

GetItemIntegerRanges

The GetItemIntegerRanges method returns the limit information for a data item, defined as type integer with limits. The returned parameters are based on the DataSetTemplateKey property as well as the item parameter. The DataSetTemplateKey must be set before this method is called. This method is obsolete since property information can be obtained from the InDataSetItem object class.

Syntax ReturnCode = %InDataSetTemplate.GetItemIntegerRanges(item, instrumentHigh, highHigh, high, low, lowLow, instrumentLow, highHighFalg, highFlag, lowFlag, lowLowFlag);

where:

Parameter Data Type Description

Item Integer (long) Position of this data item in the dataset template IntrumentHigh Integer (long) Returned instrument high value HighHigh Integer (long) Returned instrument high-highvalue High Integer (long) Returned high value Low Integer (long) Returned low value LowLow Integer (long) Returned low-low value IntrumentLow Integer (long) Returned instrument low value HighHighFlag Boolean Returned value indicating to place lot on hold if collected data exceeds high- high limit: -1 = yes 0 = no HighFlag Boolean Returned value indicating to place lot on hold if collected data exceeds high limit: -1 = yes 0 = no LowFlag Boolean Returned value indicating to place lot on hold if collected data exceeds low limit: -1 = yes 0 = no LowLowFlag Boolean Returned value indicating to place lot on hold if collected data exceeds low- low limit: -1 = yes 0 = no Import API Objects 9-19

GetItemRealRanges

The GetItemRealRanges method returns the lmit information for a data item, defined as real type with limits. The returned parameters are based on the DataSetTemplateKey property as well as the item parameter. The DataSetTemplateKey must be set before this method is called. This method is obsolete since property information can be obtained from the InDataSetItem object class.

Syntax ReturnCode = %InDataSetTemplate.GetItemRealRanges(item, instrumentHigh, highHigh, high, low, lowLow, instrumentLow, highHighFalg, highFlag, lowFlag, lowLowFlag);

where:

Parameter Data Type Description

Item Integer (long) Position of this data item in the dataset template IntrumentHigh Double real Returned instrument high value HighHigh Double real Returned instrument high-highvalue High Double real Returned high value Low Double real Returned low value LowLow Double real Returned low-low value IntrumentLow Double real Returned instrument low value HighHighFlag Boolean Returned value indicating to place lot on hold if collected data exceeds high- high limit: -1 = yes 0 = no HighFlag Boolean Returned value indicating to place lot on hold if collected data exceeds high limit: -1 = yes 0 = no LowFlag Boolean Returned value indicating to place lot on hold if collected data exceeds low limit: -1 = yes 0 = no LowLowFlag Boolean Returned value indicating to place lot on hold if collected data exceeds low- low limit: -1 = yes 0 = no 9-20 Chapter 9

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the dataset template object.

Syntax ReturnCode = %InDataSetTemplate.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 12 = Double real

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of a dataset template object. The udaValue is a VARIANT data type containing the returned UDA value. This method is provided primarily for InTouch programming.

Syntax ReturnedUDAValue = %InDataSetTemplate.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call Import API Objects 9-21

Load

The Load method populates the read-only properties of the InDataSetTemplate object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InDataSetTemplate.Load();

SetUDA

The SetUDA method updates the value of a specified UDA of an InDataSetTemplate object.

Syntax returnCode = %InDataSetTemplate.SetUDA(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type 9-22 Chapter 9

InDataSetTemplates Object Class

The InDataSetTemplates object class is a collection class. It groups multiple InDataSetTemplate objects for processing as a group instead of individually.

Properties The following table describes the property of an InDataSetTemplates object.

Property Data Type Access Description

Count Integer (long) r Number of InDataSetTemplate objects in the InDataSetTemplates object.

Methods This section describes the methods of the InDataSetTemplates class.

Add

The Add method adds an InDataSetTemplate object(s) to an InDataSetTemplates object. The InDataSetTemplate object is specified through the %InDataSetTemplate in the method call.

Syntax returnCode = %InDataSetTemplates.Add(%InDataSetTemplate);

where:

Parameter Data Type Description

InDataSetTemplate Object InDataSetTemplate object(s) to add.

Clear

The Clear method clears all InDataSetTemplate objects from an InDataSetTemplates object.

Syntax returnCode = %InDataSetTemplates.Clear(); Import API Objects 9-23

Item

The Item method locates an InDataSetTemplate object within an InDataSetTemplates object. The InDataSetTemplate object is specified by index or template key name in the method call.

Syntax %InDataSetTemplate = %InDataSetTemplates.Item(index); %InDataSetTemplate = %InDataSetTemplates.Item(templateKey);

where:

Parameter Data Type Description

Index Integer (long) List position of InDataSetTemplate object to locate (1 ≤ index ≤ Count) TemplateKey String Version key identifying the InDataSetTemplate object to locate.

Remove

The Remove method removes an InDataSetTemplate object from an InDataSetTemplates object. The InDataSetTemplate object is specified by index, key, or InDataSetTemplate object in the method call.

Syntax returnCode = %InDataSetTemplates.Remove(index); returnCode = %InDataSetTemplates.Remove(templateKey); returnCode = %InDataSetTemplates.Remove(template);

where:

Parameter Data Type Description

Index Integer (long) List position of InDataSetTemplate object to remove (1 ≤ index ≤ Count) TemplateKey String Name identifying the InDataSetTemplate object to remove. template Object InDataSetTemplate object to remove.

9-24 Chapter 9

InDispositionCode Object Class

The InDispositionCode object class provides an OLE automation interface to the InTrack disposition code object. The creation string for the InDispositionCode object class is InTrack.DispositionCode. The disposition code’s name key string is the default property. All other properties are read-only. The read-only properties are set by calling the Load method. To process InDispositionCode objects as a collection, use the InDispositionCodes object class.

Properties The following table describes the properties of an InDispositionCode object.

Property Data Type Access Description

DispositionCodeKey Message or String r/w Version key identifying the InDispositionCode object (default property) Description Message or String r Description Type enumeration r Disposition code type enumerated value: 0 = Reject 1 = Rework 2 = Good 3 = Scrap

Methods This section describes the methods of the InDispositionCode class.

Create

The Create method creates an InDispositionCode object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InDispositionCode.Create(DispCodeKey, Description);

where:

Parameter Data Type Description

DispCodeKey String Disposition code key Description String Description Import API Objects 9-25

Delete

The Delete method removes an InDispositionCode object from the InTrack database. The DispCode key property must be set before calling the Delete Method.

Syntax returnCode = %InDispositionCode.Delete();

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InDispositionCode object class.

Syntax ReturnCode = %InDispositionCode.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InDispositionCode object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %InDispositionCode.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call 9-26 Chapter 9

Load

The Load method populates the read-only properties of the InDispositionCode object with values read from the database. The DispCode key property must be set before this method can be called.

Syntax returnCode = %InDispositionCode.Load();

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InDispositionCode object.

Syntax returnCode = %InDispositionCode.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type Import API Objects 9-27

InDispositionCodes Object Class

The InDispositionCodes object class is a collection class. It groups multiple InDispositionCode objects for processing as a group instead of individually.

Properties The following table describes the property of an InDispositionCodes collection.

Property Data Type Access Description

Count Integer (long) r Number of InDispositionCode objects in the InDispositionCodes collection.

Methods This section describes the methods of the InDispositionCodes object class.

Add

The Add method adds an InDispositionCode object(s) to an InDispositionCodes object. The InDispositionCode object is specified through the argument in the method call.

Syntax returnCode = %InDispositionCodes.Add(items);

where:

Parameter Data Type Description

Items Object InDispositionCode(s) object to add to the collection.

Clear

The Clear method clears all InDispositionCode objects from an InDispositionCodes object.

Syntax returnCode = %InDispositionCodes.Clear(); 9-28 Chapter 9

Item

The Item method locates an InDispositionCode object within an InDispositionCodes object. The InDispositionCode object is specified by index or item name in the method call.

Syntax %InDispositionCode = %InDispositionCodes.Item(index); %InDispositionCode = %InDispositionCodes.Item(itemName);

where:

Parameter Data Type Description

Index Integer (long) List position of InDispositionCode object to locate (1 ≤ index ≤ Count) ItemName String Name identifying the InDispositionCode object to locate.

Remove

The Remove method removes an InDispositionCode object from an InDispositionCodes object. The InDispositionCode object is specified by index, item name, or InDispositionCode object in the method call.

Syntax returnCode = %InDispositionCodes.Remove(index); returnCode = %InDispositionCodes.Remove(itemName); returnCode = %InDispositionCodes.Remove(item);

where:

Parameter Data Type Description

Index Integer (long) List position of InDispositionCode object to remove (1 ≤ index ≤ Count) ItemName String Name key identifying the InDispositionCode object to remove. Item Object InDispositionCode object to remove.

Import API Objects 9-29

InLocation Object Class

The InLocation object class (creation string of “InTrack.Location”) provides an OLE automation interface to InTrack location object.

Properties The following table describes the properties of an InLocation object.

Property Data Type Access Description

LocationKey Message or String r/w String identifying the location object (default property) Description String r Location description

Methods This section describes the methods of the InLocation class. The standard methods provide all the functions necesarry to insert, update and delete InTrack objects from the database. The first time Create is called, an initial version of the object is inserted into the database. After Load is called (and edits performed), a second call to Create saves an updated version of the objecct. Note that it is not necessary to call Delete before calling a second Create for the same object.

Create

The Create method creates an InLocation object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InLocation.Create (DispCodeKey, Description);

where:

Parameter Data Type Description

LocationKey String Object key Description String Description

Delete

The Delete method removes an InLocation object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %InLocation.Delete(); 9-30 Chapter 9

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InLocation object class.

Syntax returnCode = %InLocation.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InLocation object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %InLocation.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status of the method call

Load

The Load method populates the properties of the InLocation object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InLocation.Load(); Import API Objects 9-31

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InLocation object.

Syntax returnCode = %InLocation.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type

9-32 Chapter 9

InMachine Object Class

The InMachine object class provides an OLE automation interface to the InTrack machine type object. The creation string for the InMachine object class is InTrack.Machine. The machine’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method. To process InMachine objects as a collection, use the InMachines object class.

Properties The following table describes the properties of an InMachine object.

Property Data Type Access Description

MachineKey Message or String r/w Version key identifying the InMachine object (default property) Capacity Amount object r Machine capacity ContactInfo String r Contact information Location String r Location MachineType String r Machine type Model String r Model number Serial Number String r Serial number Vendor String r Vendor Description String r Description DataSetTemplates Collection r Collection of DataSetTemplate objects Import API Objects 9-33

Methods This section describes the methods of the InMachine class.

AddDataSetTemplates

The AddDataSetTemplates method appends new data set template objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %InMachine.AddDataSetTemplates(DataSetTemplates);

where:

Parameter Data Type Description

DataSetTemplates Object(s) Object(s) to add to the InMachine collection

AssignRepairPerson

The AssignRepairPerson method records the name of the person assigned to fix the machine in the resource tracking logs.

Syntax returnCode = %InMachine.AssignRepairPerson(repairPerson);

where:

Parameter Data Type Description

repairPerson String Name of the repair person

BringOnLine

The BringOnLine method identifies when the machine was brought online in the resource tracking logs.

Syntax returnCode = %InMachine.BringOnLine(); 9-34 Chapter 9

Close

The Close method closes a sublot to inventory.

Syntax returnCode = %InMachine.Close(closeLots);

where:

Parameter Data Type Description

CloseLots Object(s) CloseItem object(s) to close

CloseRepair

The CloseRepair method identifies when repairs to a machine have been finished. Data is stored in the resource tracking logs.

Syntax returnCode = %InMachine.CloseRepair();

Complete

The Complete method closes a sublot to inventory or closes a sublot to another route.

Syntax returnCode = %InMachine.Complete(completeLots);

where:

Parameter Data Type Description

CompleteLots Object(s) CompleteItem object(s) to close

CompleteTask

The CompleteTask method records the time a task has been completed in the resource tracking log.

Syntax returnCode = %InMachine.CompleteTask(taskId, description);

where:

Parameter Data Type Description

TaskId String ID of task to complete Description String Description Import API Objects 9-35

Create

The Create method creates an InMachine object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InMachine.Create(MachineKey, Description, MachineType, Location, Capacity, ContactInfor, Vendor, Model, SerialNumber, DataSetTemplates);

where:

Parameter Data Type Description

MachineKey String Machine key Description String Description MachineType VARIANT Machine type key Location VARIANT String or InLocation object Capacity Object InAmount object ContactInfo String Contact information Vendor String Vendor Model String Model number SerialNumber String Serial number DataSetTemplates VARIANT Data set template key(s) or DataSetTemplate object(s)

Delete

The Delete method removes an InMachine object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %InMachine.Delete(); 9-36 Chapter 9

DeleteAllDataSetTemplates

The DeleteAllDataSetTemplates method removes all InDataSetTemplate objects and saves the empty collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %InMachine.DeleteAllDataSetTemplates();

DeleteDataSetTemplates

The DeleteDataSetTemplates method removes the InDataSetTemplate objects and saves the modified collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %InMachine.DeleteDataSetTemplates(DataSetTemplates);

where:

Parameter Data Type Description

DataSetTemplates Object(s) InDataSetTemplate object(s) to remove from the InMachine collection

GetTaskWorkInstructions

The GetTaskWorkInstructions method returns the work instructions associated with a specific task.

Syntax returnCode = %InMachine.GetTaskWorkInstructions(task, workInstructions);

where:

Parameter Data Type Description

Task String Task name WorkInstructions String Work instructions name Import API Objects 9-37

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InMachine object class.

Syntax ReturnCode = %InMachine.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InMachine object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %InMachine.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call

Load

The Load method populates the read-only properties of the InMachine object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InMachine.Load(); 9-38 Chapter 9

OpenRepair

The OpenRepair method changes a machine’s maintenance status to AWAITING_REPAIR.

Syntax ReturnCode = %InMachine.OpenRepair(repairId, description);

where:

Parameter Data Type Description

RepairId String Repair name Description String Description

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InMachine object.

Syntax returnCode = %InMachine.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type

Start

The Start method starts the single or multiple sublots contained in an automation object of the StartItem(s) object class.

Syntax returnCode = %InMachine.Start(startLots);

where:

Parameter Data Type Description

StartLots Object(s) InStartItem object(s) to start Import API Objects 9-39

StartRepair

The StartRepair method changes a machine’s maintenance status to IN_REPAIR in the resource tracking log.

Syntax returnCode = %InMachine.StartRepair(description);

where:

Parameter Data Type Description

Description String Description

StartTask

The StartTask method records when a task has been started in the resource tracking logs.

Syntax returnCode = %InMachine.StartTask(taskId, Description);

where:

Parameter Data Type Description

TaskId String Task name Description String Task start comment

StopRepair

The StopRepair method identifies when repairs on a machines are stopped.

Syntax returnCode = %InMachine.StopRepair(description);

where:

Parameter Data Type Description

Description String Description

TakeOffline

The TakeOffline method identifies when a machine is not available for processing. This method changes the machine’s status to “OFFLINE.”

Syntax returnCode = %InMachine.TakeOffline(); 9-40 Chapter 9

UpdateDiagnosis

The UpdateDiagnosis method records diagnosis messages or comments in the resource tracking logs.

Syntax returnCode = %InMachine.UpdateDiagnosis(diagnosis);

where:

Parameter Data Type Description

Diagnosis String Diagnosis string

UpdateFailureReason

The UpdateFailureReason method records the appropriate reason for a machine failure in the InTrack resource tracking logs.

Syntax returnCode = %InMachine.UpdateFailureReason(FailureReason);

where:

Parameter Data Type Description

FailureReason String Failure reason

UpdateFailureSymptom

The UpdateFailureSymptom method records the appropriate symptom for a machine failure in the InTrack resource tracking logs.

Syntax returnCode = %InMachine.UpdateFailureSymptom(FailureSymptom);

where:

Parameter Data Type Description

FailureReason String Failure symptom Import API Objects 9-41

UpdateWorkStatus

The UpdateWorkStatus method records update messages or comments in the InTrack resource tracking logs.

Syntax returnCode = %InMachine.UpdateWorkStatus(workStatus);

where:

Parameter Data Type Description

WorkStatus String Work status code 9-42 Chapter 9

InMachines Object Class

The InMachines object class is a collection class. It groups multiple InMachine objects for processing as a group instead of individually.

Properties The following table describes the property of an InMachines object.

Property Data Type Access Description

Count Integer (long) r Number of InMachine objects in the InMachines object.

Methods This section describes the methods of the InMachines class.

Add

The Add method adds an InMachine object(s) to an InMachines object. The InMachine object is specified through the %InMachine in the method call.

Syntax returnCode = %InMachines.Add(%InMachine);

where:

Parameter Data Type Description

InMachine Object InMachine(s) object to add.

Clear

The Clear method clears all InMachine objects from an InMachines object.

Syntax returnCode = %InMachines.Clear(); Import API Objects 9-43

Item

The Item method locates an InMachine object within an InMachines object. The InMachine object is specified by index or key name in the method call.

Syntax %InMachine = %InMachines.Item(index); %InMachine = %InMachines.Item(key);

where:

Parameter Data Type Description

Index Integer (long) List position of InMachine object to locate (1 ≤ index ≤ Count) key String Name identifying the InMachine object to locate.

Remove

The Remove method removes an InMachine object from an InMachines object. The InMachine object is specified by index, key, or InMachine object in the method call.

Syntax returnCode = %InMachines.Remove(index); returnCode = %InMachines.Remove(key); returnCode = %InMachines.Remove(InMachine);

where:

Parameter Data Type Description

Index Integer (long) List position of InMachine object to remove (1 ≤ index ≤ Count) key String Name identifying the InMachine object to remove. InMachine Object InMachine object to remove.

9-44 Chapter 9

InMachineType Object Class

The InMachineType object class provides an OLE automation interface to the InTrack machine type object. The creation string for the InMachineType object class is InTrack.MachineType. The machine type’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method.

Properties The following table describes the properties of an InMachineType object.

Property Data Type Access Description

MachineTypeKey String r/w Version key identifying the InMachineType object (default property) Description String r Description ProcessingType Short r Machine type processing type 0 = Batch –1 = Serial FailureReasons Collection r Collection of failure reason strings FailureSymptoms Collection r Collection of failure symptom strings Tasks Collection r Collection of InMachineTask objects CapacityUOM String r Capacity unit of measure

Methods This section describes the methods of the InMachineType class.

AddFailureReasons

The AddFailureReasons method appends new objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %InMachineType.AddFailureReasons(failureReasons);

where:

Parameter Data Type Description

FailureReasons VARIANT List of failure reasons Import API Objects 9-45

AddFailureSymptoms

The AddFailureSymptoms method appends new objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %InMachineType.AddFailureSymptoms(failureSymptoms);

where:

Parameter Data Type Description

FailureSymptoms VARIANT List of failure symptoms

AddMachineTasks

The AddMachineTasks method appends new objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %InMachineType.AddMachineTasks(MachineTasks);

where:

Parameter Data Type Description

MachineTasks Object(s) InMachineTask or InMachineTasks object 9-46 Chapter 9

Create

The Create method creates an InMachineType object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InMachineType.Create(MachineTypeKey, Description, ProcessingType, CapacityUnits, FailureReasons, FailureSymptoms, MachineTasks);

where:

Parameter Data Type Description

MachineTypeKey String MachineType key Description String Description ProcessingType Short r Machine type processing type 0 = Batch –1 = Serial CapacityUnits String Machine type capacity, unit of measure FailureReasons VARIANT String list or InFailureReasons collection FailureSymptoms VARIANT String list or InFailureSymptoms collection MachineTasks Object(s) InMachineTask or InMachineTasks object collection

Delete

The Delete method removes an InMachineType object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %InMachineType.Delete(); Import API Objects 9-47

DeleteAllFailureReasons

The DeleteAllFailureReasons method removes all InFailureReasons objects and saves the empty collection object to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %InMachineType.DeleteAllFailureReasons();

DeleteAllFailureSymptoms

The DeleteAllFailureSymptoms method removes all InFailureSymptoms objects and saves the empty collection object to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %InMachineType.DeleteAllFailureSymptoms();

DeleteAllMachineTasks

The DeleteAllMachineTasks method removes all InMachineTasks objects and saves the empty collection object to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %InMachineType.DeleteAllMachineTasks();

DeleteFailureReasons

The DeleteFailureReasons method removes the InFailureReasons objects and saves the modified collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %InMachineType.DeleteFailureReasons(FailureReasons);

where:

Parameter Data Type Description

FailureReasons VARIANT String list or InFailureReasons collection 9-48 Chapter 9

DeleteFailureSymptoms

The DeleteFailureSymptoms method removes the InFailureSymptoms objects and saves the modified collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %InMachineType.DeleteFailureSymptoms(FailureSymptoms);

where:

Parameter Data Type Description

FailureSymptoms VARIANT String list or InFailureSymptoms collection

DeleteMachineTasks

The DeleteMachineTasks method removes the InMachineTask or InMachineTasks object(s) and saves the modified collection to the InTrack database. The key property must be set before this method is called.

Syntax returnCode = %InMachineType.DeleteMachineTasks(MachineTasks);

where:

Parameter Data Type Description

MachineTasks Object(s) InMachineTask object or InMachineTasks collection

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InMachineType object class.

Syntax ReturnCode = %InMachineType.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type Import API Objects 9-49

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InMachineType object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %InMachineType.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call

Load

The Load method populates the read-only properties of the InMachineType object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InMachineType.Load();

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InMachineType object.

Syntax returnCode = %InMachineType.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type

9-50 Chapter 9

InMaterial Object Class

The InMaterial object class provides an OLE automation interface to the InTrack material object. The creation string for the InMaterial object class is InTrack.Material. The material’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method.

Properties The following table describes the properties of an InMaterial object.

Property Data Type Access Description

MaterialKey Message or String r/w Version key identifying the InMaterial object (default property) Description String r Description ControlType Short r Material control type ReceiveUOM Message or String r Receive unit of measure IssueUOM Message or String r Issue unit of measure Lifetime InTimeInterval r Material lifetime BOMStandardQty Double r Bill of material quantity BOMStandardUOM String r Bill of material unit of measure BOMInputItems InBOMItems r Bill of material inputs BOMOutputItems InBOMItems r Bill of materials outputs Import API Objects 9-51

Methods This section describes the methods of the InMaterial class.

AddCycleTimeOverride

The AddCycleTimeOverride method adds a cycle time override to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddCycleTimeOverride(custSpec, operation, cycleTime);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name CycleTime InTimeInterval New cycle time

AddDataSetOverride

The AddDataSetOverride adds an override to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddDataSetOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to add to operation 9-52 Chapter 9

AddInputItems

The AddInputItems method adds input items to the bill of material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddInputItems(items, replaceExisting);

where:

Parameter Data Type Description

InputItems InBOMItems BOM input items collection ReplaceExisting Boolean Boolean value indicating whether existing items should be replaced -1 = yes (default) 0 = no

AddMachineOverride

The AddMachineOverride method adds a machine override to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddMachineOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name Object List String Objects to add to operation Import API Objects 9-53

AddOutputItems

The AddOutputItems method adds output items to the bill of material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddOutputItems(items, replaceExisting);

where:

Parameter Data Type Description

OutputItems InBOMItems BOM output items collection ReplaceExisting Boolean Boolean value indicating whether existing items should be replaced -1 = yes (default) 0 = no

AddOverlapOverride

The AddOverlapOverride method adds an overlap override to the material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddOverlapOverride(custSpec, operation, overlapped);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name Overlapped Boolean Boolean value indicating whether overlapping is enabled: -1 = yes (default) 0 = no 9-54 Chapter 9

AddSetpointTemplateOverride

The AddSetpointTemplateOverride method adds a setpoint template override to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddSetpointTemplateOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to add to operation

AddTrackingOverride

The AddTrackingOverride method adds a material tracking overrride to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddTrackingOverride(custSpec, operation, completeOnly, queueTime, userCertification);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name Complete only Boolean Boolean value indicating whether operation is complete-only: -1 = yes (default) 0 = no QueueTime InTimeInterval Operation queue time UserCertification String Required user certification name Import API Objects 9-55

AddWorkInstructionsOverride

The AddWorkInstructionsOverride method adds an override to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddWorkInstructionsOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to add to operation

AddYieldOverride

The AddYieldOverride method adds a yield override to the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AddYieldOverride(custSpec, operation, yield);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name Yield Double Operation yield

AssociateRoute

The AssociateRoute method associates a material with a route. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.AssociateRoute(routeName);

where:

Parameter Data Type Description

RouteName String Route name 9-56 Chapter 9

Create

The Create method creates a material object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InMaterial.Create(description, controlType, receiveUOM, issueUOM, lifeTime, replaceExisting);

where:

Parameter Data Type Description

Description String Material description ControlType Short Material control (lot or batch) ReceiveUOM String Receive unit of measure IssueUOM String Issue unit of measure LifeTime InTimeInterval Material life time ReplaceExisting Boolean Boolean value indicating whether to replace existing material: -1 = yes (default) 0 = no

CreateBOM

The CreateBOM method creates a bill of material object and saves it to the InTrack database. The key property must be set before calling the CreateBOM method.

Syntax returnCode = %InMaterial.CreateBOM(standardQty, standard UOM, inputItems, outputItems);

where:

Parameter Data Type Description

StandardQty Double BOM standard quantity Standard UOM String BOM standard unit of measure InputItems InBOMItems BOM input material collection OutputItems InBOMItems BOM output material collection Import API Objects 9-57

Delete

The Delete method removes an InMaterial object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %InMaterial.Delete();

DeleteBOM

The Delete method removes a bill of materials from the InTrack database. The key property must be set before calling the DeleteBOM Method.

Syntax returnCode = %InMaterial.DeleteBOM();

DeleteCycleTimeOverride

The DeleteCycleTimeOverride method clears the cycle time override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteCycleTimeOverride(custSpec, operation);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name

DeleteDataSetOverride

The DeleteDataSetOverride method clears the override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteDataSetOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to delete from override 9-58 Chapter 9

DelAllDataSetOverride

The DelAllDataSetOverride method removes all dataset template overrides for the specified operation and optional customer specification. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DelAllDataSetOverride(custSpec, operation);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name

DeleteInputItems

The DeleteInputItems method deletes input items from the bill of material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteInputItems(items, substitutesOnly);

where:

Parameter Data Type Description

InputItems InBOMItems Items to remove SubstitutesOnly Boolean Boolean value indicating whether only substitute items should be removed: -1 = yes (default) 0 = no

DeleteAllInputItems

The DeleteAllInputItems method deletes all input items from the bill of material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteAllInputItems(); Import API Objects 9-59

DeleteMachineOverride

The DeleteMachineOverride method clears the machine override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteMachineOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name Object List String Objects to delete from override

DelAllMachineOverride

The DeleteMachineOverride method removes all machine overrides for the specified operation and optional customer specification. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DelAllMachineOverride(custSpec, operation);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name 9-60 Chapter 9

DeleteOutputItems

The DeleteOutputItems method deletes output items from the bill of material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteOutputItems(items);

where:

Parameter Data Type Description

OutputItems InBOMItems items to remove

DeleteAllOutputItems

The DeleteAllOutputItems method removes all output items from the bill of material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteAllOutputItems();

DeleteOverlapOverride

The DeleteOverlapOverride method clears the overlap override from a material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteOverlapOverride(custSpec, operation);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name Import API Objects 9-61

DeleteSetpointTemplateOverride

The DeleteSetpointTemplateOverride method clears the override from the the specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteSetpointTemplateOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to remove from override

DelAllSetpointTemplateOverride

The DelAllSetpointTemplateOverride removes all setpoint template overrides for the specified operation and optional customer specification. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DelAllSetpointTemplateOverride(custSpec, operation);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name 9-62 Chapter 9

DeleteTrackingOverride

The DeleteTrackingOverride method clears the material tracking overrride from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteTrackingOverride(custSpec, operation);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name

DeleteWorkInstructionsOverride

The DeleteWorkInstructionsOverride method clears an override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteWorkInstructionsOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to remove from the override Import API Objects 9-63

DelAllWorkInstructionsOverride

The DelAllWorkInstructionsOverride method resets the properties of an operation back to the original. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DelAllWorkInstructionsOverride(custSpec, operation);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name

DeleteYieldOverride

The DeleteYieldOverride method clears a yield override from a specified material and operation. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.DeleteYieldOverride(custSpec, operation);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InMaterial object class.

Syntax ReturnCode = %InMaterial.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type 9-64 Chapter 9

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InMaterial object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %InMaterial.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call

Load

The Load method populates the read-only properties of the InMaterial object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InMaterial.Load();

RemoveRouteAssociation

The RemoveRouteAssociation method removes the assocation between the material and the route. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.RemoveRouteAssociation(routeName);

where:

Parameter Data Type Description

RouteName String Route name Import API Objects 9-65

SetControlType

The SetControlType method updates the material in the InTrack database with a new control type. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.SetControlType(controlType);

where:

Parameter Data Type Description

ControlType Short Material control type: 1 = Lot 2 = Bulk

SetDescription

The SetDescription method updates the material in the InTrack database with a new description. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.SetDescription(description);

where:

Parameter Data Type Description

Description String Material description

SetLifeTime

The SetLifeTime method updates the material in the InTrack database with a new life time. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.SetLifeTime(lifeTime);

where:

Parameter Data Type Description

Lifetime InTimeInterval Material life time 9-66 Chapter 9

SetQuantity

The SetQuantity method updates the material in the InTrack database with a BOM standard quantity. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.SetQuantity(standardQty, standardUOM);

where:

Parameter Data Type Description

StandardQty Double Quantity StandardUOM String Standard unit of measure

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InMaterial object.

Syntax returnCode = %InMaterial.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type

SetUnitsOfMeasure

The SetUnitsOfMeasure method updates the material in the InTrack database with new units of measure. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.SetUnitsOfMeasure(receiveUOM, issueUOM);

where:

Parameter Data Type Description

ReceiveUOM String Receive units of measure IssueUOM String Issue units of measure Import API Objects 9-67

ToggleDataSetOverride

The ToggleDataSetOverride enables or disables an object that appears on the original operation from a specific operation and material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.ToggleDataSetOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to toggle

ToggleMachineOverride

The ToggleMachineOverride method enables or disables an object that appears on the original operation from a specific operation and material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.ToggleMachineOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name Object List String Objects to toggle 9-68 Chapter 9

ToggleSetpointTemplateOverride

The ToggleSetpointTemplateOverride method enables or disables an object that appears on on the original operation from a specific operation and material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.ToggleSetpointTemplateOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to toggle

ToggleWorkInstructionsOverride

The ToggleWorkInstructionsOverride method enables or disables an object that appears on the original operation from a specific operation and material. The material key property must be set before calling this method.

Syntax returnCode = %InMaterial.ToggleWorkInstructionsOverride(custSpec, operation, objectList);

where:

Parameter Data Type Description

CustSpec String Optional customer specification Operation String Operation name ObjectList String Objects to toggle Import API Objects 9-69

InOperation Object Class

The InOperation object class provides an OLE automation interface to the InTrack operation object. The creation string for the InOperation object class is InTrack.Operation. The machine’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method.

Properties The following table describes the properties of an InOperation object.

Property Data Type Access Description

OperationKey Message or String r/w Version key identifying the InOperation object (default property) Description Message or String r Description Yield Single r Yield (range of 0 to 1) CycleTime InTimeInterval r Cycle time QueueTime InTimeInterval r Maximum queue time CompleteOnly Boolean r Boolean value indicating whether this operation is complete-only -1 = yes (default) 0 = no Overlapped Boolean r Boolean value indicating whether the operation is overlapped (allows flow lots) -1 = yes (default) 0 = no UserCertification Message or String r Require user certification SetpointTemplates InSetpointTemplates r Collection of setpoint templates DataSetTemplates InDataSetTemplates r Collection of data set templates QualifiedMachines InMachines r Collection of qualified machines WorkInstructions InWorkInstructionsList r Collection of work instructions Bitmap file String r Path to bitmap file 9-70 Chapter 9

Methods This section describes the methods of the InOperation class.

AddDataSetTemplates

The AddDataSetTemplates method appends new data set template objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.AddDataSetTemplates(dataSetTemplates);

where:

Parameter Data Type Description

DataSetTeamplates VARIANT Data set templates (comma-separated string) or InDataSetTemplate object or InDataSetTemplates collection

AddQualifiedMachines

The AddQualifiedMachines method appends machine objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.AddQualifiedMachines(qualifiedMachines);

where:

Parameter Data Type Description

QualifiedMachines VARIANT Machines (comma-separated string) or InMachine object or InMachines collection Import API Objects 9-71

AddSetpointTemplates

The AddSetpointTemplates method appends new setpoint template objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.AddSetpointTemplates(setpointTemplates);

where:

Parameter Data Type Description

SetpointTemplates VARIANT Setpoint templates (comma-separated string) or InSetpointTemplate object or InSetpointTemplates collection

AddWorkInstructions

The AddWorkInstructions method appends new work instruction objects and saves the modified collection to the database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.AddWorkInstructions(workInstructions);

where:

Parameter Data Type Description

WorkInstructions VARIANT Work instructions (comma-separated string) or InWorkInstructions object or InWorkInstructionsList collection 9-72 Chapter 9

Create

The Create method creates an InOperation object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InOperation.Create(OperationKey, description, cycleTime, yield, queueTime, completeOnlyFlag, overlapFlag, bitmapFile, userCertification, dataSetList, workInstList, machineList);

where:

Parameter Data Type Description

OperationKey Message or String Operation key Description Message or String Description CycleTime InTimeInterval Cycle time Yield Single Yield (range 0 to 1) QueueTime InTimeInterval Maximum queue time CompleteOnlyFlag Boolean Boolean value indicating whether this operation is complete-only -1 = yes (default) 0 = no OverlapFlag Boolean Boolean value indicating whether this operation is overlapping (allows flow lots) -1 = yes (default) 0 = no BitmapFile Message or String Bitmap file name UserCertification Message or String Required user certification (string or InOperation) DataSetList Object or String Data set templates (comma-separated) or InDataSetTemplate object or InDataSetTemplates collection WorkInstList Object or String Work instructions (comma-separated) or InWorkInstructions object or InWorkInstructionsList collection MachineList Object or String Machine (comma-separated) or InMachine object or InMachines collection Import API Objects 9-73

CreateEx

The CreateEx saves a new or existing operation to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InOperation.CreateEx(OperationKey, description, cycleTime, yield, queueTime, completeOnlyFlag, overlapFlag, bitmapFile, userCertification, dataSetList, workInstList, machineList, setpointTemplateList);

where:

Parameter Data Type Description

OperationKey Message or String Operation key Description Message or String Description CycleTime InTimeInterval Cycle time Yield Single Yield (range 0 to 1) QueueTime InTimeInterval Maximum queue time CompleteOnlyFlag Boolean Boolean value indicating whether this operation is complete-only -1 = yes (default) 0 = no OverlapFlag Boolean Boolean value indicating whether this operation is overlapping (allows flow lots) -1 = yes (default) 0 = no BitmapFile Message or String Bitmap file name UserCertification Message or String Required user certification (string or InOperation) DataSetList VARIANT Data set templates (comma-separated) or InDataSetTemplate object or InDataSetTemplates collection WorkInstList VARIANT Work instructions (comma-separated) or InWorkInstructions object or InWorkInstructionsList collection MachineList VARIANT Machine (comma-separated) or InMachine object or InMachines collection SetpointTemplateList VARIANT Setpoint templates (comma-separated) or InSetpointTemplate object or InSetpointTemplates collection 9-74 Chapter 9

Delete

The Delete method removes an InOperation object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %InOperation.Delete();

DeleteDataSetTemplates

The DeleteDataSetTemplates method removes data set template objects and saves the modified collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.DeleteDataSetTemplates(dataSetTemplates);

where:

Parameter Data Type Description

DataSetTemplates Object or String Data set templates (comma-separated string) or InDataSetTemplate object or InDataSetTemplates collection

DeleteAllDataSetTemplates

The DeleteAllDataSetTemplates method removes all data set template objects and saves the empty collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.DeleteAllDataSetTemplates(); Import API Objects 9-75

DeleteQualifiedMachines

The DeleteQualifiedMachines method removes machine objects and saves the modified collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.DeleteQualifiedMachines(qualifiedMachines);

where:

Parameter Data Type Description

QualifiedMachines Object or String Machines (comma-separated string) or InMachine object or InMachines collection

DeleteAllQualifiedMachines

The DeleteAllQualifiedMachines method removes all machine objects and saves the empty collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.DeleteAllQualifiedMachines();

DeleteSetpointTemplates

The DeleteSetpointTemplates method removes setpoint template objects and saves the modified collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.DeleteSetpointTemplates(setpointTemplates);

where:

Parameter Data Type Description

SetpointTemplates Object or String Setpoint templates (comma-separated string) or InSetpointTemplate object or InSetpointTemplates collection 9-76 Chapter 9

DeleteAllSetpointTemplates

The DeleteAllSetpointTemplates method removes all data set template objects and saves the empty collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.DeleteAllSetpointTemplates();

DeleteWorkInstructions

The DeleteWorkInstructions method removes work instructions objects and saves the modified collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.DeleteWorkInstructions(workInstructions);

where:

Parameter Data Type Description

WorkInstructions Object or String Work instructions (comma-separated string) or InWorkInstructions object or InWorkInstructionsList collection

DeleteAllWorkInstructions

The DeleteAllWorkInstructions method removes all data set template objects and saves the empty collection to the InTrack database. The key property must be set before calling this method.

Syntax returnCode = %InOperation.DeleteAllWorkInstructions(); Import API Objects 9-77

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InOperation object class.

Syntax ReturnCode = %InOperation.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InOperation object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %InOperation.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call

Load

The Load method populates the read-only properties of the InOperation object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InOperation.Load(); 9-78 Chapter 9

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InOperation object.

Syntax returnCode = %InOperation.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type Import API Objects 9-79

InRoute Object Class

The InRoute object class, along with InRoutePath, InRoutePaths, InRouteStep and InRouteSteps classes, provide an OLE automation interface to the InTrack route object. The creation string for the InRoute object class is InTrack.Route. The route’s key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties, except for product material, are read-only. The read-only properties are set by calling the Load method. Since a route can produce many different materials, the product material is a read/write property to enable editing of material inputs, material outputs, or setpoints. Route step and route path classes that do not have a Load method are created and loaded as part of the primary route object. They have read/write properties to enable data collection.

Properties The following table describes the properties of an InRoute object.

Property Data Type Access Description

RouteKey String r/w Route key identifying the route object (default property) Material String r/w Material key identifying a material associated with the route object Description String r Route description DefaultDispositionCode Object r Default disposition code object RouteSteps Object r Collection of route step objects InitialStep String r Name of first step on route 9-80 Chapter 9

Methods This section describes the methods of the InRoute class.

AddInputItems

The AddInputItems method appends new input items and saves the modified collection to the database. The route key and material properties must be set before calling this method.

Syntax returnCode = %InRoute.AddInputItems(inputs, routeStep, replaceExisting);

where:

Parameter Data Type Description

Inputs InStepInputItem(s) Step input item(s) to add or replace RouteStep String Name of the route step to which inputs should be added ReplaceExisting Boolean Boolean value indicating whether existing input items should be replaced -1 = yes (default) 0 = no

AddOutputItems

The AddOutputItems method appends new output items and saves the modified collection to the database. The route key and material properties must be set before calling this method.

Syntax returnCode = %InRoute.AddOutputItems(outputs, routeStep, replaceExisting);

where:

Parameter Data Type Description

Outputs InStepOutputItem(s) Step output item(s) to add or replace RouteStep String Name of the route step to which outputs should be added ReplaceExisting Boolean Boolean value indicating whether existing output items should be replaced -1 = yes (default) 0 = no Import API Objects 9-81

AddRoutePaths

The AddRoutePaths method adds new paths or replaces existing paths between existing route steps and saves the modified route to the databse. The route key property must be set before calling this method. The paths are specified in the Paths property of the InRouteStep object. A new path is created by specifiying a disposition code different from all other paths between the source and and the destination route steps.

Syntax returnCode = %InRoute.AddRoutePaths(fromSteps, replaceExisting);

where:

Parameter Data Type Description

FromSteps InRouteStep(s) Route step(s) containing the path(s) to add or replace ReplaceExisting Boolean Boolean value indicating whether existing paths should be replaced -1 = yes (default) 0 = no

AddRouteSteps

The AddRouteSteps method adds new route steps or replaces existing route steps and saves the modified route to the database. If the route step contains paths, an attempt will be made to add the paths to the route independently of the step. The route key property must be set before calling this method.

Syntax returnCode = %InRoute.AddRouteSteps(steps, replaceExisting);

where:

Parameter Data Type Description

Steps InRouteStep(s) Route step(s) to add or replace ReplaceExisting Boolean Boolean value indicating whether existing steps should be replaced -1 = yes (default) 0 = no 9-82 Chapter 9

AddSetpointItems

The AddSetpointItems method appends new setpoint items and saves the modified collection to the database. The route key and material properties must be set before calling this method.

Syntax returnCode = %InRoute.AddSetpointItems(setpoints, routeStep, replaceExisting);

where:

Parameter Data Type Description

Setpoints InStepSetpointItem(s) Step setpoint item(s) to add or replace RouteStep String Name of the route step to which setpoints should be added ReplaceExisting Boolean Boolean value indicating whether existing setpoint items should be replaced -1 = yes (default) 0 = no

Create

The Create method creates an InRoute object and saves it to the InTrack database. The route key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InRoute.Create(routeKey, description, defaultDispCode, routeSteps, initialRouteStep);

where:

Parameter Data Type Description

RouteKey String Version key identifying the route object Description String Route description DefaultDispCode Object or String Default disposition code object or name of the disposition code RouteSteps Object InRouteSteps object, a collection of route steps in the route InitialRouteStep Object or String Initial route step object or name of initial route step Import API Objects 9-83

Delete

The Delete method removes an InRoute object from the InTrack database. The route key property must be set before calling the Delete Method.

Syntax returnCode = %InRoute.Delete();

DeleteAllInputItems

The DeleteAllInputItems method removes all material inputs for the product and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %InRoute.DeleteAllInputItems(routeStep);

where:

Parameter Data Type Description

RouteStep String Route step with material inputs

DeleteAllOutputItems

The DeleteAllOutputItems method removes all material outputs for the product and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %InRoute.DeleteAllOutputItems(routeStep);

where:

Parameter Data Type Description

RouteStep String Route step with material outputs 9-84 Chapter 9

DeleteAllSetpointItems

The DeleteAllSetpointItems method removes all setpoints for the product and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %InRoute.DeleteAllSetpointItems(routeStep);

where:

Parameter Data Type Description

RouteStep String Route step with setpoints

DeleteInputItems

The DeleteInputItems method removes the specified material inputs and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %InRoute.DeleteInputItems(inputs, routeStep);

where:

Parameter Data Type Description

inputs InStepInputItem(s) Step inputs to delete RouteStep String Name of the route step

DeleteOutputItems

The DeleteOutputItems method removes the specified material outputs and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %InRoute.DeleteOutputItems(outputs, routeStep);

where:

Parameter Data Type Description

outputs InStepOutputItem(s) Step outputs to delete RouteStep String Name of the route step Import API Objects 9-85

DeleteRoutePaths

The DeleteRoutePaths method removes route step paths and saves the modified route to the InTrack database. The paths are specified in the Paths property of the InRouteStep object. The route key property must be set before this method is called.

Syntax returnCode = %InRoute.DeleteRoutePaths(fromSteps);

where:

Parameter Data Type Description

FromSteps InRouteStep(s) Route step(s) containing the path(s) to delete

DeleteRouteSteps

The DeleteRouteSteps method removes route steps and saves the modified route to the InTrack database. The route key property must be set before this method is called.

Syntax returnCode = %InRoute.DeleteRouteSteps(steps);

where:

Parameter Data Type Description

Steps InRouteStep(s) Route steps to delete

DeleteSetpointItems

The DeleteSetpointItems method removes the specified setpoints and saves the modified route to the InTrack database. The route key and material properties must be set before this method is called.

Syntax returnCode = %InRoute.DeleteSetpointItems(setpoints, routeStep);

where:

Parameter Data Type Description

Setpoints InStepSetpointItem(s) Setpoints to delete RouteStep String Name of the route step 9-86 Chapter 9

GetDispMaterialOutput

The GetDispMaterialOutput method returns information about the output material at a route step. The route key and material properties must be set before calling this method.

Syntax ReturnCode = %InRoute.GetDispMaterialOutput(step, disposition, destRoute, destRouteStep, destLocation, outputMaterial, quantity, uon, decQty, scaledQty);

where:

Parameter Data Type Description

Step String Route step name (input parameter) Disposition String Disposition code (input parameter) DestRoute String Destination route version key (output parameter) DestRotueStep String Destination route step (output parameter) DestLocation String Destination location (output parameter) OutputeMaterial String Version key of the output material (output parameter) Quantity Double Quantity (output parameter) Uom String Unit of measure (output parameter) DecQty Boolean Decrement quantity flag (output parameter) ScaledQty Boolean Scale quantity flag (output parameter)

GetInfo

The GetInfo method returns information about the route. The route key and material properties must be set before calling this method.

Syntax ReturnCode = %InRoute.GetInfo(custSpec, initialStep, cycleTime, yield);

where:

Parameter Data Type Description

custSpec String Customer specification (input parameter) InitialStep String Initial route step (output parameter) CycleTime InTimeInterval Cycle time (output parameter) Yield Double Yield (output parameter) Import API Objects 9-87

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InRoute object class.

Syntax ReturnCode = %InRoute.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InRoute object class.

Syntax ReturnedUDAValue = %InRoute.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call

Load

The Load method populates the read-only properties of the InRoute object with values read from the database. The route key property must be set before this method can be called. If the product material key is set, material inputs, outputs and/or setpoints will be loaded.

Syntax returnCode = %InRoute.Load(); 9-88 Chapter 9

SetDefaultDispositionCode

The SetDefaultDispositionCode method updates the default disposition code of an InRoute object and saves the changes to the InTrack database.

Syntax returnCode = %InRoute.SetDefaultDispositionCode(dispCode);

where:

Parameter Data Type Description

dispCode InDispositionCode or string Default disposition code for a route path

SetInitialRouteStep

The SetInitialRouteStep method updates the initial route step of an InRoute object and saves the changes to the InTrack database.

Syntax returnCode = %InRoute.SetInitialRouteStep(routeStep);

where:

Parameter Data Type Description

RouteStep InRouteStep or string First route step on the route

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InRoute object.

Syntax returnCode = %InRoute.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type Import API Objects 9-89

InRoutePath Object Class

The InRoutePath object class (creation string of InTrack.RoutePath) provides an OLE automation object represenation of a path between two steps in the InTrack route object.

Properties The following table describes the properties of an InRoutePath object.

Property Data Type Access Description

DestinationStep InRouteStep r/w Destination route step DispositionCode InDispositionCode r/w Disposition code associated with this route path IsMainPath Boolean r/w Flag indicating if this path is the main exit from the source route step: -1 = is main exit 0 = is not main exit

Methods No methods are associated with the InRoutePath object class. 9-90 Chapter 9

InRoutePaths Object Class

The InRoutePaths object class is a collection class used to group multiple InRoutePath objects for processing together instead of individually.

Properties The following table describes the properties of an InRoutePaths object.

Property Data Type Access Description

Count Integer (long) r Number of InRoutePath objects in the colection

Methods This section describes the methods of the InRoutePaths class.

Add

The Add method adds the InRoutePath object(s) to the InRoutePaths object, as specified by the argument in the method call.

Syntax returnCode = %InRoutePaths.Add(items);

where:

Parameter Data Type Description

items InRoutePath object(s) InRoutePath object(s) to be added to the collection

Clear

The Clear method clears all InRoutePath objects from the InRoutePaths collection.

Syntax returnCode = %InRoutePaths.Clear(); Import API Objects 9-91

Item

The Item method locates the InRoutePath object in an InRoutePaths collection, as specified by the index in the method call.

Syntax %InRoutePath = %InRoutePaths.Item(index);

where:

Parameter Data Type Description

index Integer (long) List position of InRoutePath object to locate (1 ≤ Index ≤ Count)

Remove

The Remove method removes the InRoutePath object from the InRoutePaths collection, as specified by index or InRoutePath object in the method call.

Syntax returnCode = %InRoutePaths.Remove(index); returnCode = %InRoutePaths.Remove(item);

where:

Parameter Data Type Description

index Integer (long) List position of InRoutePath object to locate (1 ≤ Index ≤ Count) item InRoutePath InRoutePath object to remove 9-92 Chapter 9

InRouteStep Object Class

The InRouteStep object class (creation string of “InTrack.RouteStep”) provides an OLE automation representation of a route step in the InTrack route.

Properties The following table describes the properties of an InRouteStep object.

Property Data Type Access Description

Name String r/w Name of this route step (default property) Operation InOperation r Operation associated with this route step Inputs InStepInputItems r Material inputs associated with this route step Outputs InStepOutputItems r Material outputs associated with this route step Setpoints InStepSetpointItems r Setpoints associated with this route step Paths InRoutePaths r Route paths associated with this route step ScrapCodes InDispositionCodes r Scrap disposition codes associated with this route step

Methods There are methods for an InRouteStep object. Although the route step object properties are indicated as read-only, a reference to the corrsponding object can be obtained using dot notation (routeStp.ScrapCodes) and used to access member methods.

Example 1 For example, a scrap code can be added to the step’s collection by executing Visual Basic code similar to the following:

Dim scraps As InDispositionCodes Dim scrap As New InDispositionCode Dim routeStep as New InRouteStep Dim returnCode as Integer

Scrap.DispositionCodeKey = “SCRAPPY” Set scraps = routeStep.ScrapCodes returnCode = %scraps.Add(scrap) Import API Objects 9-93

Example 2 A disposition code can be assigned to a route path from a route step by executing Visual Basic code similar to:

Dim exit As New InDispositionCode Dim routePath As New InRoutePath

Exit.DispositionCodeKey = “GONE” Set routePath.DispositionCode = exit

ReturnCode = %routeStep.Paths.Add(routePath) 9-94 Chapter 9

InRouteSteps Object Class

The InRouteStep object class is a collection class used to group multiple InRouteStep objects for processing together instead of individually.

Properties The following table describes the property of an InRouteSteps object.

Property Data Type Access Description

Count Integer (long) r Number of InRouteStep objects in the colection

Methods This section describes the methods of the InRouteSteps class.

Add

The Add method adds the InRouteStep object(s) to the InRoutePaths collection, as specified by the argument in the method call.

Syntax returnCode = %InRouteSteps.Add(items);

where:

Parameter Data Type Description

items InRouteStep object(s) InRouteStep object(s) to be added to the collection

Clear

The Clear method clears all InRouteStep objects from the InRouteSteps collection.

Syntax returnCode = %InRouteSteps.Clear(); Import API Objects 9-95

Item

The Item method locates the InRouteStep object in an InRouteSteps collection, as specified by the index or item name in the method call.

Syntax %InRouteStep = %InRouteSteps.Item(index); %InRouteStep = %InRouteSteps.Item(itemName);

where:

Parameter Data Type Description

index Integer (long) List position of InRouteStep object to locate (1 ≤ Index ≤ Count) itemName String Name key identifying the InRouteStep object to locate

Remove

The Remove method removes the InRouteStep object from the InRouteSteps collection, as specified by index, item name or InRouteStep object in the method call.

Syntax returnCode = %InRouteSteps.Remove(index); returnCode = %InRouteSteps.Remove(itemName); returnCode = %InRouteSteps.Remove(item);

where:

Parameter Data Type Description

index Integer (long) List position of InRouteStep object to locate (1 ≤ Index ≤ Count) itemName String Name key identifying the InRouteStep object to remove Item InRouteStep InRouteStep object to remove

9-96 Chapter 9

InSetpointItem Object Class

The InSetpointItem object class is used to manage setpoint items within a setpoint template. InSetpointItem objects are identified by a setpoint name unique to a particular setpoint template. To process InSetpointItem objects as a collection, use the InSetpointItems object class.

Properties The following table describes the properties of an InSetpointItem object. Note that depending upon the setpoint’s data type, only one of the four default values will apply, and the limits and string selections may not be applicable.

Property Data Type Access Description

Data Type Integer (short) r/w Data type of this item: 1 = Single real 2 = Message/String 3 = Discrete/Boolean 4 = InDate date 5 = Long integer 6 = String selection 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 10 = Long integer with limits 11 = Short real with limits 12 = Double real 13 = Double real with limits Description Message or String r/w Description of the setpoint item Name Message or String r/w Name key identifying the setpoint item StringWidth Integer (long) r/w Maximum string length StringSelections Message or String r/w Comma-separated string of string selections Value VARIANT r/w Default value of the setpoint Import API Objects 9-97

Methods This section describes the methods of the InSetpointItem class.

GetLimits

The GetLimits method retrieves the upper and lower limits for any setpoint item data types with limits.

Syntax returnCode = %InSetpointItem_Object.GetLimits(high, low);

where:

Parameter Data Type Description

High VARIANT High limit value Low VARIANT Low limit value

GetLimitValue

The GetLimitValue method returns the value of a specified limit of a setpoint item object. The returned VARIANT limitValue contains the returned data value. This method is used primarily with InTouch.

Syntax value = %InSetpointItem_Object.GetLimitValue(limitId, returnCode);

where:

Parameter Data Type Description

Value Real Limit Value ReturnCode Integer (short) Identifier for the desired limit and enumerated value: 2 = high (LimitTypes.High) 3 = low (LimitTypes.Low) returnCode Integer (long) Returned status from the method call 9-98 Chapter 9

SetLimits

The SetLimits method sets the upper and lower limits for any setpoint item data types with limits.

Syntax returnCode = %InSetpointItem_Object.SetLimits(high, low);

where:

Parameter Data Type Description

High VARIANT High limit value Low VARIANT Low limit value Import API Objects 9-99

InSetpointItems Object Class

The InSetpointItems object class is a collection class. It groups multiple InSetpointItem objects for processing as a group instead of individually.

Properties The following table describes the property of an InSetpointItems object.

Property Data Type Access Description

Count Integer (long) r Number of InSetpointItem objects in the InSetpointItems collection.

Methods This section describes the methods of the InSetpointItems class.

Add

The Add method adds an InSetpointItem object(s) to an InSetpointItems collection. The InSetpointItem object is specified through the %InSetpointItem in the method call.

Syntax returnCode = %InSetpointItems_Object.Add(%InSetpointItem);

where:

Parameter Data Type Description

InSetpointItem Object InSetpointItem object(s) to add to the collection.

Clear

The Clear method clears all InSetpointItem objects from an InSetpointItems collection.

Syntax returnCode = %InSetpointItems_Object.Clear(); 9-100 Chapter 9

Item

The Item method locates an InSetpointItem object within an InSetpointItems collection. The InSetpointItem object is specified by index or item name in the method call.

Syntax %InSetpointItem_Object = %InSetpointItems.Item(index); %InSetpointItem_Object = %InSetpointItems.Item(setpointName);

where:

Parameter Data Type Description

Index Integer (long) List position of InSetpointItem object to locate (1 ≤ index ≤ Count) SetpointName Messasge Name key identifying the InSetpointItem object to locate.

Remove

The Remove method removes an InSetpointItem object from an InSetpointItems collection. The InSetpointItem object is specified by index, name, or InSetpointItem object in the method call.

Syntax returnCode = %InSetpointItems.Remove(index); returnCode = %InSetpointItems.Remove(setpointName); returnCode = %InSetpointItems.Remove(%SetpointItem);

where:

Parameter Data Type Description

Index Integer (long) List position of InSetpointItem object to remove (1 ≤ index ≤ Count) SetpointName String Name key identifying the InSetpointItem object to remove. %SetpointItem Object InSetpointItem object to remove.

Import API Objects 9-101

InSetpointTemplate Object Class

The InSetpointTemplate object class provides an OLE automation interface to retrieve information about a setpoint template from the InTrack database. An object of this class also enables you to define new setpoint templates (Create method). Individual items within the setpoint templates are managed by the InSetpointItem object class and InSetpointItems collection class. The setpoint template’s version key string is the default property. By convention, its public name ends with “Key” and it is read/write. All other properties are read-only. The read-only properties are set by calling the Load method. To process InSetpointTemplate objects as a collection, use the InSetpointTemplates object class.

Properties The following table describes the properties of an InSetpointTemplate object.

Property Data Type Access Description

TemplateKey Message r/w Version key identifying the InSetpointTemplate object (default property) Description Message or String r Text describing the setpoint template ParentTemplateKey Message or String r Parent setpoint template version key InSetpointItems Object r InSetpointItems object containing the list of setpoint items 9-102 Chapter 9

Methods This section describes the methods of the InSetpointTemplate class.

AddSetpointItems

The AddSetpointItems method appends new setpoint item(s) and saves the modified template to the database. The template key property must be set before calling this method.

Syntax returnCode = %InSetpointTemplate_Object.AddSetpointItems(%InSetpointItems);

where:

Parameter Data Type Description

InSetpointItems object InSetpointItem or InSetpointItems (collection) to append to the template list of data items

AssociateParent

The AssociateParent method attaches this child setpoint template to another template and saves the modified template to the database. The template key property must be set before this method can be called.

Syntax returnCode = %InSetpointTemplate_Object.AssociateParent(parentTemplate);

where:

Parameter Data Type Description

parentTemplate InSetpointTemplate or String Setpoint template object or version key string identifying the parent template Import API Objects 9-103

Create

The Create method creates an InSetpointTemplate object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InSetpointTemplate_Object.Create(templateKey, description, parentTemplate, InSetpointItems);

where:

Parameter Data Type Description

TemplateKey Message or String Version key string identifying the setpoint template Description Message or String Setpoint template description ParentTemplate InSetpointTemplate or String Setpoint template object or version key string identifying the parent template InSetpointItems Object A single InSetpointItem or a collection of InSetpointItem objects

Delete

The Delete method removes an InSetpointTemplate object from the InTrack database. The key property must be set before calling the Delete method.

Syntax returnCode = %InSetpointTemplate_Object.Delete(); 9-104 Chapter 9

DeleteSetpointItems

The DeleteSetpointItems method removes setpoint items and saves the modified setpoint template to the InTrack database. The template key property must be set before this method is called.

Syntax returnCode = %InSetpointTemplate_Object.DeleteSetpointItems(items);

where:

Parameter Data Type Description

Items InSetpointItem(s) or String InSetpointItem object(s) to remove, or a comma-separated list of item names to remove

DisassociateParent

The DisassociateParent method detaches the child setpoint template from another template and saves the modified template to the InTrack database. The template key property must be set before this method can be called.returns.

Syntax returnCode = %InSetpointTemplate_Object.DisassociateParent();

GetUDA

The GetUDA method returns the value of a specified UDA of a setpoint template object. The udaValue contains returned UDA value.

Syntax ReturnCode = %InSetpointTemplate.GetUDA(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT Returned value of the UDA Import API Objects 9-105

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the setpoint template object.

Syntax ReturnCode = %InSetpointTemplate_Object.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName Message or String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type: 1 = Single real 2 = String 3 = Boolean 4 = InDate date 5 = Long integer 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 12 = Double real

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of a setpoint template object. The udaValue is a VARIANT data type containing the returned UDA value. This method is provided primarily for InTouch programming.

Syntax ReturnedUDAValue = %InSetpointTemplate_Object.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status from the method call 9-106 Chapter 9

Load

The Load method populates the read-only properties of the InSetpointTemplate object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InSetpointTemplate_Object.Load();

SetUDA

The SetUDA method updates the value of a specified UDA of an InSetpointTemplate object.

Syntax returnCode = %InSetpointTemplate_Object.SetUDA(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type Import API Objects 9-107

InSetpointTemplates Object Class

The InSetpointTemplates object class is a collection class. It groups multiple InSetpointTemplate objects for processing as a collection instead of individually.

Properties The following table describes the property of an InSetpointTemplates object.

Property Data Type Access Description

Count Integer (long) r Number of InSetpointTemplate objects in the InSetpointTemplates object.

Methods This section describes the methods of the InSetpointTemplates class.

Add

The Add method adds an InSetpointTemplate object(s) to an InSetpointTemplates object. The InSetpointTemplate object is specified through the %InSetpointTemplate in the method call.

Syntax returnCode = %InSetpointTemplates_Object.Add(%InSetpointTemplate);

where:

Parameter Data Type Description

InSetpointTemplate Object InSetpointTemplate object(s) to add.

Clear

The Clear method clears all InSetpointTemplate objects from an InSetpointTemplates object.

Syntax returnCode = %InSetpointTemplates_Object.Clear(); 9-108 Chapter 9

Item

The Item method locates an InSetpointTemplate object within an InSetpointTemplates object. The InSetpointTemplate object is specified by index or template key name in the method call.

Syntax %InSetpointTemplate = %InSetpointTemplates_Object.Item(index); %InSetpointTemplate = %InSetpointTemplates_Object.Item(templateKey);

where:

Parameter Data Type Description

Index Integer (long) List position of InSetpointTemplate object to locate (1 ≤ index ≤ Count) TemplateKey Message or String Version key identifying the InSetpointTemplate object to locate.

Remove

The Remove method removes an InSetpointTemplate object from an InSetpointTemplates object. The InSetpointTemplate object is specified by index, key, or InSetpointTemplate object in the method call.

Syntax returnCode = %InSetpointTemplates_Object.Remove(index); returnCode = %InSetpointTemplates_Object.Remove(templateKey); returnCode = %InSetpointTemplates_Object.Remove(template);

where:

Parameter Data Type Description

Index Integer (long) List position of InSetpointTemplate object to remove (1 ≤ index ≤ Count) TemplateKey Message or String Name identifying the InSetpointTemplate object to remove. Template Object InSetpointTemplate object to remove.

Import API Objects 9-109

InStepSetpointItem Object Class

The InStepSetpointItem object class is used to represent setpoints for a product material at a route step. These items are added to a route object at a particular route step for a particular product. The user can initialize the InStepSetpointItem object with default values defined in the assoicated InSetpointItem from the InSetpointTemplate. InStepSetpointItem objects are identified by the setpoint template name and version, as well as the setpoint name. To process InStepSetpointItem objects as a collection, use the InStepSetpointItems object class.

Properties The following table describes the properties of an InStepSetpointItem object.

Property Data Type Access Description

SetpointTemplate Message or String r/w Version key identifying the setpoint template SetpointName Message or String r/w Name key identifying the name of the setpoint Data Type Integer (short) r Data type of this item: 1 = Single real 2 = Message/String 3 = Discrete/Boolean 4 = InDate date 5 = Long integer 6 = String selection 7 = InDateTime date and time 8 = InTime time of day 9 = InTimeInterval time interval 10 = Long integer with limits 11 = Short real with limits 12 = Double real 13 = Double real with limits Value VARIANT r/w Actual value of the setpoint 9-110 Chapter 9

Methods This section describes the methods of the InStepSetpointItem class.

InitializeFrom

The InitializeFrom method initializes the InStepSetpointItem object properties from an InSetpointTemplate and InSetpointItem object. This function enables initializing the item with default values specified within the setpoint template. The setpoint template key and setpoint item names must be set before calling this method.

Syntax returnCode = %InStepSetpointItem_Object.InitializeFrom(InSetpointTemplate, InSetpointItem);

where:

Parameter Data Type Description

InSetpointTemplate Object InSetpointTemplate object identifying the setpoint template InSetpointItem Object InSetpointItem object Import API Objects 9-111

InStepSetpointItems Object Class

The InStepSetpointItems object class is a collection class. It groups multiple InStepSetpointItem objects for processing as a collection instead of individually.

Properties The following table describes the property of an InStepSetpointItems object.

Property Data Type Access Description

Count Integer (long) r Number of InStepSetpointItem objects in the InStepSetpointItems collection.

Methods This section describes the methods of the InStepSetpointItems class.

Add

The Add method adds an InStepSetpointItem object(s) to an InStepSetpointItems object. The InStepSetpointItem object is specified through the %InStepSetpointItem in the method call.

Syntax returnCode = %InStepSetpointItems_Object.Add(%InStepSetpointItem);

where:

Parameter Data Type Description

InStepSetpointItem Object InStepSetpointItem object(s) to add to the collection.

Clear

The Clear method clears all InStepSetpointItem objects from an InStepSetpointItems object.

Syntax returnCode = %InStepSetpointItems_Object.Clear(); 9-112 Chapter 9

Item

The Item method locates an InStepSetpointItem object within an InStepSetpointItems object. The InStepSetpointItem object is specified by index in the method call.

Syntax %InStepSetpointItem_Object = %InStepSetpointItems.Item(index);

where:

Parameter Data Type Description

Index Integer (long) List position of InStepSetpointItem object to locate (1 ≤ index ≤ Count)

Remove

The Remove method removes an InStepSetpointItem object from an InStepSetpointItems object. The InStepSetpointItem object is specified by index, name, or InStepSetpointItem object in the method call.

Syntax returnCode = %InStepSetpointItems.Remove(index); returnCode = %InStepSetpointItems.Remove(%InStepSetpointItem);

where:

Parameter Data Type Description

Index Integer (long) List position of InStepSetpointItem object to remove (1 ≤ index ≤ Count) InStepSetpointItem Object InStepSetpointItem object to remove. Import API Objects 9-113

TransferFromTaglist

The TransferFromTaglist method transfers all setpoint values from a TagList to each InStepSetpointItem object in the collection. The order of the tags in the list must match the order of the InStepSetpointItems in this collection. This method will work only when called from an InTouch script.

Syntax returnCode = %InStepSetpointItems.TransferFromTaglist(tagList);

where:

Parameter Data Type Description

TagList Message or String Name of the TagList from which to transfer setpoint values

TransferToTaglist

The TransferToTaglist method transfers setpoint values from each InStepSetpointItem object in the collection to a TagList, so the values can be later manipulated or displayed. The order of the tags in the list must match the order of the InStepSetpointItems in this collection. This method will work only when called from an InTouch script.

Syntax returnCode = %InStepSetpointItems.TransferToTaglist(tagList);

where:

Parameter Data Type Description

TagList Message or String Name of the TagList to which to transfer setpoint values

9-114 Chapter 9

InTable Object Class

The InTable object class, along with the InTableColumn and InTableColumns classes, provides the ability to define and manage user tables. User-defined tables are created in ModelMaker using the User-Defined Table editor. When the User-Defined Table editor creates a new user table, it calls the UserDefined Table::Create Table method. When this call succeeds, it will create a DataSetDefinition with the name assigned for the new table (DataSetDefinition::SetName) and a version of “None” (DataSetDefinition::SetVersion) with a type set to “UDT” (DataSetDefinition::SetDataSetType). No data item rows are defined. This definition is saved the DSTemplate table so that the new table will appear in subsequent UDA queries. The InTable object class (creation string of “InTrack.Table”) provides an OLE automation interface to user-defined table management functions, formerly available only through ModelMaker. A NameKey is used to identify a specific row in a user-defined table. In addition, row management functions enable the ability to save (insert or update), read or delete a row from the database using the OLE automation interface.

Note: Table management functions cannot be part of a transaction. Changes are automatically written to the database each time a method is invoked.

Using the InTable Object Class The InTable object class is designed to work efficiently with other InTrack functions. Note the following changes made to accommodate the object class: General Database User-defined tables follow the format of existing UDAs on InTrack tables. The UDT row in the DSTemplate table enables use of the ModelMaker UDT editor query. Stored Procedures (SQL Server Only) Like data collection tables, user-defined tables create a set of stored procedures: UserTableName_I inserts a row into the table. UserTableName_S selects a row based on the primary key. UserTableName_E verifies that a primary key value exists. UserTableName_K updates the primary key value. UserTableName_D deletes a row from the table based on a primary key value.UserTableName_I inserts a row into the table. Migration InTrack will preserve all existing user-defined tables when migrating from a previous version. A new UDTBaseValues table will be created in the database to enable mapping to UDA tables created on older versions. ArchiveItem Class In order to archive data in user-defined tables using the OLE database object, the ArchiveItem Class ID property must be set to 20. The TableName property should be set to the user- defined table name. Archiving procedures for user-defined tables is similar to those used for data collection tables. Query.SQL The generic query method of the Query.SQL class operates with user-defined tables in the same manner as standard InTracktables. Import API Objects 9-115

Properties The following table describes the properties of an InTable object.

Property Data Type Access Description

Name Message or String r/w String identifying the table (default property) ColumnDefinition Object r A list of InTableColumn objects that describes each non-primary key column in the table.

Methods This section describes the methods of the InTable class. These methods are used to control the table as a whole

Create

The Create method adds a new user-defined table to the InTrack database.

Syntax returnCode = %InTable_Object.Create(name, columns);

where:

Parameter Data Type Description

Name Message or String Table name columns Object InTableColumn(s) Automation object of the InTableColumn(s) class

Delete

The Delete method removes a user-defined table from the InTrack database.

Syntax returnCode = %InTable_Object.Delete();

Load

The Load method populates the properties of the InTable object with values read from the database. The table name property must be set before this method can be called.

Syntax returnCode = %InTable_Object.Load(); 9-116 Chapter 9

Modify

The Modify method edits columns associated with a user-defined table. The table name property must be set before this method can be called. If the old and new table column count is the same, any changes made to the existing column definition will be reflected in the modifed table. If more columns are provided for the new table, the additional columns will be appended to the table in the order listed. If fewer columns are provided, the missing columns will be be deleted from the table.

Syntax returnCode = %InTable_Object.Modify(columns);

where:

Parameter Data Type Description

columns Object InTableColumn(s) Automation object of the InTableColumn(s) class Import API Objects 9-117

Row Methods In addition to the methods that operate on the table as a whole, the following methods deal with a row of data in the tables. The InTableColumns object is used to represent a row of data, and each InTableColumn object contains the actual data value for the row. In order to set or read the actual column data value, you must determine the data type for the column, then invoke the appropriate property for the data value.

DeleteRow

The DeleteRow method removes a row of data from the user-defined table. The row is identified by name.

Syntax returnCode = %InTable_Object.DeleteRow(rowID, commit);

where:

Parameter Data Type Description

rowID Message or String NameKey of the row to delete commit Boolean Boolean value indicating whether to commit the row: -1 = commit changes 0 = do not commit

ReadRow

The ReadRow method reads a row of data from the user-defined table into the InTableColumns object. The row is identified by name.

Syntax returnCode = %InTable_Object.ReadRow(rowID, columns);

where:

Parameter Data Type Description

rowID Message or String NameKey of the row to read columns Object InTable Columns Columns with actual row data 9-118 Chapter 9

SaveRow

The SaveRow method writes a row of data into the user-defined table from the InTableColumns object. The row is identified by name. If the row does not exist, it is inserted into the table. If the row exists, it is updated with new data values.

Syntax returnCode = %InTable_Object.SaveRow(rowID, columns, commit)

where:

Parameter Data Type Description

rowID Message or String NameKey of the row to save columns Object InTableColumns Columns with actual row data commit Boolean Boolean value indicating whether to commit the row: -1 = commit changes 0 = do not commit Import API Objects 9-119

InTableColumn Object Class

The InTableColumn object class (creation string of “InTrack.TableColumn”) provides an OLE automation interface to columns in user-defined tables (identified by the InTable object class). It is called directly from the InTable object class.

Note: Table management functions cannot be part of a transaction.

Properties The following table describes the properties of an InTableColumn object.

Property Data Type Access Description

DataType Integer (short) r/w Data type of this column, where: 1 = real 2 = message/string 3 = discrete/boolean 4 = date 5 = long integer 7 = date and time of day 8 = time of day 9 = time interval 12 = double Description Message or String r/w Description of this column IsIndexed Discrete r/w Boolean value indicating if the column: -1 = is indexed 0 = is not indexed Label Message or String r/w An optional label for the column Name Message or String r/w Column name NullsAllowed Boolean r/w Boolean value indicating if: -1 = nulls are allowed 0 = nulls are not allowed StringWidth Integer (long) r/w Maximum width of a string column (up to 255) Value VARIANT r/w Column value corresponding to the data type.

Methods No methods exist for the InTableColumn object class. Refer to the row methods for the InTable object class. 9-120 Chapter 9

InTableColumns Object Class

The InTableColumns object class is a collection class. It groups multiple InTableColumn objects for processing as a group instead of single entries.

Properties The following table describes the property of an InTableColumns object.

Property Data Type Access Description

Count Integer (long) r Number of InTableColumn objects in the InTableColumns object.

Methods This section describes the methods of the InTableColumns class.

Add

The Add method adds an InTableColumn object(s) to an InTableColumns object. The InTableColumn object is specified through the %InTableColumn in the method call.

Syntax returnCode = %InTableColumns_Object.Add(InTableColumn);

where:

Parameter Data Type Description

InTableColumn Object InTableColumn(s) object to add.

Clear

The Clear method clears all InTableColumn objects from an InTableColumns object.

Syntax returnCode = %InTableColumns_Object.Clear(); Import API Objects 9-121

Item

The Item method locates an InTableColumn object within an InTableColumns object. The InTableColumn object is specified by index or column name in the method call.

Syntax %InTableColumn_Object = %InTableColumns_Object.Item(index); %InTableColumn_Object = %InTableColumns_Object.Item(columnName);

where:

Parameter Data Type Description

Index Integer (long) List position of InTableColumn object to locate (1 ≤ index ≤ Count) columnName Message or String Name identifying the InTableColumn object to locate.

Remove

The Remove method removes an InTableColumn object from an InTableColumns object. The InTableColumn object is specified by index, columnName, or %InTableColumn object in the method call.

Syntax returnCode = %InTableColumns_Object.Remove(index); returnCode = %InTableColumns_Object.Remove(columnName); returnCode = %InTableColumns_Object.Remove(inTableColumn);

where:

Parameter Data Type Description

Index Integer (long) List position of InTableColumn object to remove (1 ≤ index ≤ Count) columnName Message or String Name identifying the InTableColumn object to remove. InTableColumn Object InTableColumn(s) object to remove. 9-122 Chapter 9

InWorkInstructions Object Class

The InWorkInstructions class (creation string of “InTrack.WorkInstructions”) provides an OLE automation interface to InTrack work instructions objects.

Properties The following table describes the properties of an InWorkInstructions object.

Property Data Type Access Description

WorkInstructionsKey String r/w String identifying the WorkInstructions object (default property) Description String r Description Label String r Label TimeLastChanged InDateTime r Last date and time this work instructions object was changed DaysToNotify Long r Number of days to notify an operator that this work instruction has changed IsInternal Boolean r Boolean value indicating that work instructions are: TRUE = internal FALSE = linked or embedded FileName String r If the work instructions are linked (IsInternal = FALSE), the actual file name and path of linked instructions. If the work instructions are embedded, the actual file name and temporary path containing the work instructions. For example, “c:\temp\filename.doc” for an embedded file, or a temporary file name and path for internal work instructions (IsInternal = TRUE), such as “c:\temp\itr9.txt.” Import API Objects 9-123

Methods This section describes the methods of the InWorkInstructions class. The standard methods provide all the functions necesarry to insert, update and delete InTrack objects from the database. The first time Create is called, an initial version of the object is inserted into the database. After Load is called (and edits performed), a second call to Create saves an updated version of the objecct. Note that it is not necessary to call Delete before calling a second Create for the same object.

Create

The Create method creates an InWorkInstruction object and saves it to the InTrack database. The key property is the first argument of this method. The object’s key property is set after a successful create.

Syntax returnCode = %InWorkInstructions.Create ( Key, Description, LastChanged, DaysToNotify, InternalFlag, Text, Label );

where:

Parameter Data Type Description

Key String Object key Description String Description LastChanged InDateTime Last date and time this work instruction was changed DaysToNotify InTimeInterval Number of days to notify an operator that this work instruction has been changed. InternalFlag Boolean TRUE if the work instructions are internal. FALSE if the work instructions are linked or embedded. Text String Work instruction text, if internal. File name and path if external and linked. File name and path prefaced with an “[EMBED]” string if work instructions are to be embedded. For example, “[EMBED]c:\folder\filename.doc”. Label String Label 9-124 Chapter 9

Delete

The Delete method removes an InWorkInstructions object from the InTrack database. The key property must be set before calling the Delete Method.

Syntax returnCode = %InWorkInstructions.Delete();

GetUDAType

The GetUDAType method returns the data type of a specified UDA of the InWorkInstructions object class.

Syntax returnCode = %InWorkInstructions.GetUDAType(udaName, udaType);

where:

Parameter Data Type Description

udaName String Name of the UDA udaType Integer (long) Returned value identifying the UDA data type

GetUDAValue

The GetUDAValue method returns the value of a specified UDA of the InWorkInstructions object class. The udaValue is a VARIANT data type containing the returned UDA value.

Syntax ReturnedUDAValue = %InWorkInstructions.GetUDAValue(udaName, returnCode);

where:

Parameter Data Type Description

ReturnedUDAValue VARIANT Returned UDA value udaName String Name of the UDA returnCode Integer (long) Returned status of the method call Import API Objects 9-125

Load

The Load method populates the properties of the InWorkInstructions object with values read from the database. The key property must be set before this method can be called.

Syntax returnCode = %InWorkInstructions.Load();

SetUDAValue

The SetUDAValue method updates the value of a specified UDA of an InWorkInstructions object.

Syntax returnCode = %InWorkInstructions.SetUDAValue(udaName, udaValue);

where:

Parameter Data Type Description

udaName String Name of the UDA udaValue VARIANT New UDA value of the data type corresponding to the UDA data type 9-126 Chapter 9

InWorkInstructionsList Object Class

The InWorkInstructionsList class is a collection class. It groups multiple InWorkInstructions objects for processing as a collection instead of as single entities.

Property The following table describes the property of an InWorkInstructionsList object.

Property Data Type Access Description

Count Integer (long) r Number of InWorkInstructions objects in the collection.

Methods This section describes the methods of the InWorkInstructionsList class.

Add

The Add method adds the InWorksInstructions object(s) to the InWorkInstructionsList object, as specified by the argument in the method call.

Syntax returnCode = %InWorkInstructionsList.Add(InWorkInstructions);

where:

Parameter Data Type Description

InWorkInstructions Object InWorkInstructions object(s) to add to the collection

Clear

The Clear method clears all InWorkInstructions objects from the InWorkInstructionsList class.

Syntax returnCode = %InWorkInstructionsList.Clear();

Item

TheItem method locates the InWorkInstructions object in an InWorkInstructionsList object. The InWorkInstructions object is specified by the index or key name in the call method.

Syntax InWorkInstructions = InWorkInstructionsList.Item(index); InWorkInstructions – InWorkInstructionsList.Item(key):

where: Import API Objects 9-127

Parameter Data Type Description

index Integer (long) List position of InWorkInstructions object to locate (1 ≤ index ≤ Count) key String Name identifying the InWork- Instructions object to locate

Remove

The Remove method removes InWorkInstructions object from the InWorkInstructionsList object, as specified by index, key or InWorkInstructions object in the method call.

Syntax returnCode = %InWorkInstructionsList.Remove(index); returnCode = %InWorkInstructionsList.Remove(key); returnCode = %InWorkInstructionsList.Remove(InWorkInstructions);

where:

Parameter Data Type Description

index Integer (long) List position of InWorkInstructions object to remove (1 ≤ index ≤ Count) key String Name identifying the InWork- Instructions object to remove InWorkInstructions Object InWorkInstructions object to remove

10-1

CHAPTER 10

ActiveX Controls

InTrack ActiveX controls provide information needed for InTrack database transactions at runtime. Each control is based on a query provided through the InTrack Automation Server. InTrack ActiveX controls interface with InTrack OLE Object Classes. The properties and methods of the OLE Object Class are provided and selected by the ActiveX control during Runtime development. InTrack uses both grid-based and list-based ActiveX Controls, outlined in this chapter. This section provides reference for methods and properties of InTrack’s ActiveX controls. For general instructions on changing the font or color properties of ActiveX controls, refer to the Runtime User Guide. 10-2 Chapter 10

Contents Grid-Based ActiveX Controls, 3 ITDataItemList, 5 ITLotDataSet, 7 ITLotDispCode, 9 ITLotInputItems, 11 ITLotInputMtls, 13 ITLotMachAvail, 15 ITLotUndoList, 17 ITLotWorkInst, 19 ITSubInputMtls, 21 ITSelector, 23 ListBox ActiveX Controls, 28 ITLotMergeList, 29 ITMachineInfoList, 31 ITQueryList, 33 ITSampleList, 35

ActiveX Controls 10-3

Grid-Based ActiveX Controls

InTrack uses the following customized ActiveX controls: ITDataItemList ITLotDataSet ITLotDispCode ITLotInputItems ITLotMachAvail ITLotUndoList ITLotWorkInst ITSubInputMatls ITSelector Individual properties, methods, events for each control are provided on the following pages.

Common Properties All grid-based InTrack ActiveX controls have properties for changing the appearance of the control’s columns. Although the columns vary, each ActiveX control column includes the following properties that can be changed individually. These properties are assigned on the Properties tab for the ActiveX control.

Column Title

The Column Title box displays the column header. You can change the font and color properties as needed.

Column Number

Use the Column Number to change the order in which columns will appear at Runtime. Column numbers read left to right.

Column Width

The width can be changed for any ActiveX control column. Setting a column width to 0 will hide the column.

Column Resizing

The Column Resizing property enables or disables the ability for users to change column widths at Runtime. When enabled, the user can click and hold the mouse on the column edge to drag the column borders to the desired width. 10-4 Chapter 10

Changing Column Attributes To view or change the columns attributes of an InTrack grid-based ActiveX control: 1. Double-click the ActiveX control. The selected ActiveX control's Properties dialog box will appear. 2. Click the Columns tab to activate the Columns property sheet. 3. Attributes can be changed individually for each column, identified by Column Name. Each column name will correspond to a property of the object. The total number of columns will vary for each object class. 4. If needed, you can change the Column Title in the column header display. 5. If needed, change the Column Number list to change the order of the column display at runtime. Column 1 is the leftmost column. 6. Assign a default column width for the column. Setting this attribute to 0 will hide the associated column. The column width is measured in TWIPS (1440 TWIPS per inch.) 7. Enable or disable column resizing as needed. 8. After assigning the desired InTrack grid-based ActiveX control attributes, click Apply to apply the properties. Click OK to close the dialog box. ActiveX Controls 10-5

ITDataItemList

The ITDataItemList control provides an interface to the Query.DataSetItem object. The results of the query are displayed in an eight-column grid. The display is read-only. The ITDatatItemList control has a unique property sheet, Query Parameters. The Dataset box must include the VersionKey of the dataset template from which data items will be retrieved. ITDataItemList uses standard ActiveX control font and color properties.

Properties The ITDataItemList control has the following properties.

Design Runtime Property Description Access Access Type

Dataset Dataset template name R/W R/W String DataItemName Data item name NA R String DataType Data item data Type NA R String ItemIndex Position in the dataset NA R Long Description Data item description NA R String Label Label of the data item NA R String Required Data item required NA R Boolean CheckLimits Limit checking required NA R Boolean Format String selection choices NA R String ColumnName Name of the column (1-8) R/W R/W Number ColumnNumber Grid position for the current column R/W R Enumerated ColumnWidth Width of the current column. Value of 0 hides the column. R/W R/W Integer ColumnTitle Title of the current column R/W R/W String RequiredBackColor Background color of required data items R/W R/W OLEColor ColumnResizing Allow/Disable runtime user resizing R/W R/W Boolean Row Return/set selected row NA R/W Integer Font Standard font object R/W NA Font ForeColor Color of list text R/W R/W OLEColor Backcolor Color of list background R/W R/W OLEColor Enabled Control enabled/disabled R/W R/W Boolean Count Number of items in the list NA R Integer 10-6 Chapter 10

Methods The ITDataItemList control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the Query.DataSetItem object The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITDataItemList control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened.

ActiveX Controls 10-7

ITLotDataSet

The ITLotDataSet control provides an interface to the Query.LotDataSet object. The results of the query are displayed in a four-column grid. The display is read-only. The Sublot box must include the SublotKey of the sublot from which dataset templates will be retrieved. ITLotDataSet uses standard ActiveX control font and color properties.

Properties The ITLotDataSet control has the following properties.

Design Runtime Property Description Access Access Type

Sublot Sublot key R/W R/W String ColumnName Name of the column (1-4) R/W R/W Enumerated ColumnNumber Grid column number (1-4) R/W R Integer ColumnWidth Width of the current column Value of 0 hides the column R/W R/W Integer ColumnTitle Title of the current column R/W R/W String DataSet Dataset version key NA R String Description Dataset description NA R String SampleRowCount Number of samples defined NA R Integer Level Override level (0, 1, 2) NA R Integer ColumnResizing Allow/Disable user column resizing R/W R/W Boolean Row Return/set selected row NA R/W Integer Font Standard font object R/W NA Font ForeColor Color of list text R/W R/W OLEColor Backcolor Color of list background R/W R/W OLEColor Enabled Control enabled/disabled R/W R/W Boolean Count Number of items in the list NA R Integer 10-8 Chapter 10

Methods The ITLotDataSet control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the Query.LotDataSet object The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITLotDataSet control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the DataSet, Description, SampleRowCount and Level values for the selected list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the DataSet, Description, SampleRowCount and Level values for the selected list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened. ActiveX Controls 10-9

ITLotDispCode

The ITLotDispCode control provides an interface to the Query.Disposition object. The results of the query are displayed in a four-column grid. The display is read-only. The Material box must include the VersionKey identifying a target material associated with the route. The Route box must include the VersionKey of the route from which to retrieve disposition codes. The RouteStep box must include the NameKey for the route step of the route. ITLotDispCode uses standard ActiveX control font and color properties.

Properties The ITLotDispCode control has the following properties.

Design Runtime Property Description Access Access Type

Route Route name and version R/W R/W String RouteStep Route step R/W R/W String Material Material name and version R/W R/W String ColumnName Name of the column (1-4) R/W R/W Enumerated ColumnNumber Number (1-4) for current column R/W R Integer ColumnWidth Width of the current column Value of 0 hides the column. R/W R/W Integer ColumnTitle Title of the current column R/W R/W String DispCode Selected row’s disposition code NA R String CompType Completion Type specified in Externif NA R Integer Destination Destination using the selected DispCode NA R String Row Return/set selected row NA R/W Integer Count Number of items in the list NA R Integer ColumnResizing Allow column resizing at runtime R/W R/W Boolean Font Standard Font object R/W NA Font ForeColor Color of text R/W R/W OLEColor Backcolor Color of background R/W R/W OLEColor Enabled Control enabled/disabled R/W R/W Boolean 10-10 Chapter 10

Methods The ITLotDispCode control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the Query.LotDispCode object The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITLotDispCode control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the DispCode, CompType, and Destination values for the selected list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the DispCode, CompType, and Destination values for the selected list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened. ActiveX Controls 10-11

ITLotInputItems

The ITLotInputItems control provides an interface for the Sublot.GetConsumeItems object. The results of this query are presented in a read-only six column display. The Sublot box include the SublotKey of the sublot on which to perform transactions. The Input Material box must include the VersionKey of the material (for example, bottles[2]). Use NONE if the material name does not include a version. The Filter box must include the SQL predicate that serves as the basis for filtering (for example, a WHERE clause). ITLotInputItems uses standard ActiveX control font and color properties.

Properties The ITLotInputItems control has the following properties.

Design Runtime Property Description Access Access Type

Sublot Sublot for which input items are needed R/W R/W String InputMaterial Input Material R/W R/W String Filter WHERE clause for query R/W R/W String ColumnName Name of the column (1 – 6) R/W R/W Enumerated ColumnNumber Number (1 – 6) for current column R/W R Integer ColumnWidth Width of the current column. Value of 0 hides the column. R/W R/W Integer ColumnTitle Title of the current column R/W R/W String ColumnResizing Allow column resizing at runtime R/W R/W Boolean Font Standard font object R/W NA Font ForeColor Color of text R/W R/W OLEColor BackColor Color of background R/W R/W OLEColor ItemSublot SublotKey of input material sublot NA R String ItemLotID LotID of input material sublot NA R String ItemRoute Route of input material sublot NA R String ItemStep RouteStep of input material sublot NA R String ItemLocation Location of input material sublot NA R String ItemQuantity Queued quantity of input material sublot NA R Double Enabled Control enabled/disabled R/W R/W Boolean Row Return/set selected row NA R/W Integer Count Number of items in the list NA R Integer

Methods 10-12 Chapter 10

The ITLotInputItems control has two standard methods.

Refresh

Refresh performs a new query of the database using the Sublot.GetConsumeItems() using the Sublot, InputMaterial and Filter properties. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITLotDispCode control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the LotID, Route, Step, Location, Quantity, and Sublot values for the selected list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the LotID, Route, Step, Location, Quantity, and Sublot values for the selected list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened. ActiveX Controls 10-13

ITLotInputMtls

The ITLotInputMtls control provides an interface for the InTrack Sublot.GetConsumableMaterials method. The results of this query are read-only and presented in a read-only grid-based display. The Sublot box must include the SublotKey of the sublot on which to perform transactions. Show Remaining Only may be selected as an option. ITLotInputMtls uses standard ActiveX control font and color properties.

Properties The ITLotInputMtls control has the following properties.

Design Runtime Property Description Access Access Type

Sublot Sublot key R/W R/W String Material Input material NA R String StandardQty Standard quantity to consume NA R Double UnitOfMeasure Unit of measure of input Material NA R String RemainingQty LowerQty, actual consumed NA R Double LowerQty Lower tolerance for consumption NA R Double UpperQty Upper tolerance for consumption NA R Double ShowRemainingOnly Show only materials with remaining consumption requirements R/W R/W Boolean ColumnName Name of the column (1-6) R/W R/W Enumerated ColumnNumber Number of the column (1-6) R/W R Integer ColumnWidth Width of the current column. Value of 0 makes the column not visible. R/W R/W Integer ColumnTitle Title of the current column R/W R/W String ColumnResizing Allow column re-sizing at runtime R/W R/W Boolean Row Return/set selected row NA R/W Integer Font Standard font object R/W NA Font ForeColor Color of list text R/W R/W OLEColor Backcolor Color of list background R/W R/W OLEColor Enabled Control enabled/disabled R/W R/W Boolean Count Number of items in the list NA R Integer 10-14 Chapter 10

Methods The ITLotInputMtls control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the Sublot.GetConsumableMaterials object and the Sublot value. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITLotInputMtls control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the Material, StandardQty, and UnitOfMeasure values for the selected list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the Material, StandardQty, and UnitOfMeasure values for the selected list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened. ActiveX Controls 10-15

ITLotMachAvail

The ITLotMachAvail control provides an interface for the InTrack Query.LotMachine object. The results of this query are presented in a read-only grid-based display. The Sublot box must include the SublotKey for the sublot from which to retrieve machine information. An Override Level must be selected: 0 (ITOperationLevel) Show Operation Level machines 1 (ITProductLevel ) Show Product Level machines 2 (ITCustSpecLevel) Show CustomerSpec Level machines 3 (ITAllLevels) Show all override levels ITLotMachAvail uses standard ActiveX control font and color properties.

Properties The ITLotMachAvail control has the following properties.

Design Runtime Property Description Access Access Type

Sublot Sublot key R/W R/W String OverrideLevel Override level to display (see description above) R/W R/W Enumerated Machine Available machine NA R String RemainingCapacity Remaining capacity on machine NA R Double UnitOfMeasure Unit of Measure of machine capacity NA R String OperationalStatus Machine OperationalStatus NA R String Level Override level NA R Integer ColumnName Name of the column (1-4) R/W R/W Enumerated ColumnNumber Number of the column (1-4) R/W R Integer ColumnWidth Width of the current column Value of 0 hides the column. R/W R/W Integer ColumnTitle Title of the current column R/W R/W String ColumnResizing Allow column resizing at runtime R/W R/W Boolean Row Return/set selected row NA R/W Integer Font Standard font object R/W NA Font ForeColor Color of list text R/W R/W OLEColor Backcolor Color of list background R/W R/W OLEColor Enabled Control enabled/disabled R/W R/W Boolean Count Number of items in the list NA R Integer 10-16 Chapter 10

Methods The ITLotMachAvail control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the Query.LotMachine object and the Sublot value. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITLotMachAvail control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the Machine, RemainingCapacity, UnitOfMeasure, OperationalStatus, and Level values for the selected list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the Machine, RemainingCapacity, UnitOfMeasure, OperationalStatus, and Level values for the selected list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened.

ActiveX Controls 10-17

ITLotUndoList

The ITLotUndoList control provides an interface for the InTrack Query.LotUndo object. The results of this query are presented in a read-only grid-based display. The LotID box must include the LotKey of the lot for which to retrieve information about undo transactions. ITLotUndoList uses standard ActiveX control font and color properties.

Properties The ITLotUndoList control has the following properties.

Design Runtime Property Description Access Access Type

LotID LotID for which to find transactions. R/W R/W String TransLogID Identifier of the undo transaction. NA R String TransTime Date and time of the transaction. NA R String TransUserID UserID for the transaction. NA R String TransName Name of the transaction. NA R String ColumnName Name of the column (1-4) R/W R/W Enumerated ColumnNumber Number of the column (1-4) R/W R Integer ColumnWidth Width of the current column. Value of 0 hides the column. R/W R/W Integer ColumnTitle Title of the current column. R/W R/W String ColumnResizing Allow column resizing at runtime. R/W R/W Boolean AllTransactions Show all lot transactions (or only most recent). R/W R/W Boolean Font Standard font object. R/W NA Font ForeColor Color of list text. R/W R/W OLEColor Backcolor Color of list background. R/W R/W OLEColor Enabled Control enabled/disabled. R/W R/W Boolean Count Number of items in the list. NA R Integer 10-18 Chapter 10

Methods The ITLotUndoList control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the Query.LotUndo object and the LotID value. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITLotUndoList control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the TransLogID TransTime, TransUser, and TransName values for the selected list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the TransLogID TransTime, TransUser, and TransName values for the selected list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened. ActiveX Controls 10-19

ITLotWorkInst

The ITLotWorkInst control provides an interface for the InTrack Query.LotWorkInstructions object. The results of this query are presented in a read-only grid-based display. The Sublot box must be filled in with the SublotKey of the sublot for which to retrieve work instructions. ITLotWorkInst uses standard ActiveX control font and color properties.

Properties The ITLotWorkInst control has the following properties.

Design Runtime Property Description Access Access Type

Sublot Sublotkey R/W R/W String WorkInstructions WorkInstructions NameVersionKey NA R String IsInternal Work Instructions internal text NA R Boolean DaysToNotify Change notification NA R Integer Level Override level (0, 1, 2) NA R Integer TimeLastChanged Date and time of last change NA R String ColumnName Name of the column (1-5) R/W R/W Enumerated ColumnNumber Number of the column (1-5) R/W R Integer ColumnWidth Width of the current column. Value of 0 hides the column. R/W R/W Integer ColumnTitle Title of the current column. R/W R/W String ColumnResizing Allow column resizing at runtime. R/W R/W Boolean Row Return/set selected row NA R/W Integer Font Standard font object. R/W NA Font ForeColor Color of list text. R/W R/W OLEColor Backcolor Color of list background. R/W R/W OLEColor ChangedBackcolor Color of list background when TimeLastChanged ≤ DaysToNotify R/W R/W OLEColor Enabled Control enabled/disabled. R/W R/W Boolean Count Number of items in the list. NA R Integer 10-20 Chapter 10

Methods The ITLotWorkInst control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the Query.LotWorkInstructions object and the Sublot value. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITLotWorkInst control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the WorkInstructions, DaysToNotify, LastChanged, IsInternal, and Level values for the selected list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the WorkInstructions, DaysToNotify, LastChanged, IsInternal, and Level values for the selected list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened.

ActiveX Controls 10-21

ITSubInputMtls

The ITSubInputMtls control provides an interface for the InTrack Query. SubstituteMaterialInput object. The results of this query are presented in a read-only grid-based display. The Route box must include the VersionKey identifying the route for which to retrieve a substitute input material. The Step box must include the NameKey of the route step associated with the route. The Material box must include the VersionKey of the target material associated with the route The InputMaterial box must include the VersionKey of the input material for which to retrieve a substitute input material. ITSubInputMtls uses standard ActiveX control font and color properties.

Properties The ITSubInputMtls control has the following properties.

Design Runtime Property Description Access Access Type

Route Route name key R/W R/W String RouteStep Route step R/W R/W String Material Material produced on the Route R/W R/W String InputMaterial Primary input Material R/W R/W String SubMaterial Substitute Material NA R String StandardQty Standard quantity of substitute material NA R Double UnitOfMeasure Unit of Measure of substitute material NA R String MaxSubRatio Maximum substitution ratio NA R Double ColumnName Name of the column (1-4) R/W R/W Enumerated ColumnNumber Number of the column (1-4) R/W R Integer ColumnWidth Width of the current column. Value of 0 hides the column. R/W R/W Integer ColumnTitle Title of the current column. R/W R/W String ColumnResizing Allow column resizing at runtime. R/W R/W Boolean Row Return/set selected row NA R/W Integer Font Standard font object. R/W NA Font ForeColor Color of list text. R/W R/W OLEColor Backcolor Color of list background. R/W R/W OLEColor Enabled Control enabled/disabled. R/W R/W Boolean Count Number of items in the list. NA R Integer 10-22 Chapter 10

Methods The ITSubInputMtls control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the QuerySubMaterialInput.Query object/method. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITSubInputMtls control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the SubMaterial, StandardQty, and UnitOfMeasure, and MaxSubRatio values for the selected list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the SubMaterial, StandardQty, and UnitOfMeasure, and MaxSubRatio values for the selected list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened.

ActiveX Controls 10-23

ITSelector

The ITSelector control provides an interface for the general Query.SQL object class: When the selector displays inventory or WIP lots, the Lot, Sublot, and Material tables are queried. When the selector displays machine information, the Machine and MachineStatus tables are queried. The results of this query are presented in a read-only grid-based display. Data displayed is not automatically updated. The following database table columns must be updated by the application prior to viewing data by the ITSelector ActiveX control: Sublot/EstimatedCompletion Sublot/CriticalRatio Sublot/DataCollectDone Sublot/ConsumptionDone In addition to the InTouch Control Name, Properties and Events, the Intrack ITSelector ActiveX control has two unique property panels: Query Parameters and Column Select. The Column Select property panel replaces the standard Column Name property sheet used for other ActiveX controls.

Using the ITSelector Control

When using the ITSelector Control: The Selector Type must be selected from the list. The Filter Expression box can be used to provide the name of the SQL WHERE predicate for filtering the list of rows. The filter expression will be added to the following partial SQL clauses. Do not add the text “WHERE” to the filter. WIP and Inventory Queries: SELECT * FROM Lot, Sublot, Material WHERE Lot.LotID = Sublot.LotID AND Lot.MaterialName = Material.MaterialName AND Lot. MaterialVersion = Material.Material Version

MachineQueries: SELECT * FROM Machine, MachineStatus, Material WHERE Machine.Machine = MachineStatus.Machine The predicate should contain join condition(s). The Sort Expression box can be filled with an Order By SQL clause. 10-24 Chapter 10

Changing Column Select Properties

To view or change the attributes of the ITSelector Column Select property sheet: 1. Double-click the ActiveX control. The selected ActiveX control's Properties dialog box will appear. 2. Click the Column Select tab to activate the Column Select property sheet. 3. The left panel displays a list of available items. The right panel displays a list of selected items. Use the single arrow keys to move available items to the selected list. Use the double arrow keys to move all items at the same time. 4. To reposition items in the query list, use the up and down arrows. This will affect the columns displayed in runtime, with the topmost item shown at the far left of the grid. 5. Use the Column Detail box to select the column width and heading for the runtime display of the grid. 6. The lower box allows you to enter a user name and password for the InTrack database to access user-defined attributes (UDAs). Clicking the Query UDAs button will query the Intrack database for UDAs and add them to the selected items list.

ITSelector Colors

The ITSelector control uses the standard InTrack ActiveX control Font and Color property panels. Supported Color attributes are: ClosedColor IdleColor InProcessColor InQuarantineColor InUseColor NormalColor OfflineColor OnHoldColor QueuedColor BackColor ForeColor ActiveX Controls 10-25

Properties The ITSelector control has the following properties.

Design Runtime Property Description Access Access Type

FilterExpr SQL WHERE Clause R/W R/W String SortExpr SQL Order By Clause R/W R/W String maxRows Maximum number of rows returned. Default value is 100. Range is 0 to 32K. R/W R/W Integer QueryType Type of lots to be selected: 1. WIP 2. Lot Inventory 3. Bulk Inventory 4. All Lots 5. Machine R/W R/W Enumerated Selection Key for currently selected row NA R String ClosedColor Column color if WorkState = Closed R/W R/W OLEColor QueuedColor Column color if WorkState = Queued R/W R/W OLEColor InProcessColor Column color if WorkState = In_Process R/W R/W OLEColor OnHoldColor Column color if HoldStatus = On_Hold R/W R/W OLEColor InQuarantineColor Column color if QuarantineStatus = Quarantined R/W R/W OLEColor IdleColor Column color if OperationalStatus = Idle R/W R/W OLEColor InUseColor Column color if OperationalStatus = In_Use R/W R/W OLEColor NormalColor Column color for Bulk or Inventory Lots if QuarantineStatus = Active R/W R/W OLEColor OfflineColor Column color if OperationalStatus = Offline R/W R/W OLEColor AllowColumnResizing Allow column resizing at runtime R/W R/W Boolean ColumnCount Number of columns in the results NA R Integer Row Return/set selected row NA R/W Integer Font Standard font object R/W NA Font ForeColor Color of list text R/W R/W OLEColor Backcolor Color of list background R/W R/W OLEColor Enabled Control enabled/disabled R/W R/W Boolean Count Number of items in the list NA R Integer 10-26 Chapter 10

Methods The ITSelector control has two standard methods and three specific methods.

Refresh

Refresh performs a new query of the database for the current dataset using the current filter and sort properties. During the query, an hourglass is displayed. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

CellValue (r, c)

This method returns the string value for the specified row/column of the grid: r = integer row value; c = integer column value.

ColumnValue (r, heading)

This method returns the string value from the column with the specified heading at the specified row. r = integer row value heading = string column heading

SelectRow (s)

This method selects the row whose Selection matches s s = string Selection property value It also is possible to set the selected row by setting the Row property of the object. ActiveX Controls 10-27

Events Four events can be used with the ITSelector control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened.

10-28 Chapter 10

ListBox ActiveX Controls

InTrack uses the following customized ActiveX controls: ITLotMergeList ITMachineInfoList ITQueryList ITSampleList Individual properties, methods, events for each control are provided on the following pages.

Common Properties All grid-based InTrack ActiveX controls have common properties: Font Color Control Name Properties Events These properties are assigned on the Properties tab for the ActiveX control. ActiveX Controls 10-29

ITLotMergeList

The ITLotMergeList control provides an interface for the InTrack Query.MergeLot object. The results of this query are presented in a read-only Windows listbox. The LotID box must include the LotKey of the lot from which to retrieve sublots eligible for merging. ITLotMergeList uses standard ActiveX control font and color properties.

Properties The ITLotMergeList control has the following properties.

Design Runtime Property Description Access Access Type

LotID LotID of merge candidates R/W R/W String SublotKey Sublot key of the current selection NA R String SublotQty Quantity of the current selection NA R Double Row Currently selected row NA R/W Integer Font Standard font object R/W NA Font ForeColor Color of list text R/W R/W OLEColor Backcolor Color of list background R/W R/W OLEColor Enabled Control enabled/disabled R/W R/W Boolean Count Number of items in the list NA R Integer 10-30 Chapter 10

Methods The ITLotMergeList control has two standard methods.

Refresh

Refresh performs a new query of the database for the current dataset using the Query.MergeLots object and the LotID value. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITLotMergeList control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the SublotKey, SublotQty, and selected properties for the list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the SublotKey, SublotQty, and selected properties for the list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened. ActiveX Controls 10-31

ITMachineInfoList

The ITMachineInfoList control provides an interface for the InTrack Query.MachineTask, MachineType.FailureReasons, MachineType.FailureSymptoms, Query.InWarningMachineTask, or Query.ExpiredMachineTask objects, depending on the QueryType used. The Machine box must be filled in with the identifier for the machine. A Query Type must be selected. ITMachineInfoList uses standard ActiveX control font and color properties.

Properties The ITMachineInfoList control has the following properties.

Design Runtime Property Description Access Access Type

Machine Machine ID R/W R/W String QueryType Enumerated list of query types (0-5) R/W R/W Enumerated SelectedObjectKey Machine Task, Reason or Symptom NA R String Row Return/set selected row NA R/W Integer Font Standard font object R/W NA Font ForeColor Color of list text R/W R/W OLEColor Backcolor Color of list background R/W R/W OLEColor Enabled Control enabled/disabled R/W R/W Boolean Count Number of items in the list NA R Integer 10-32 Chapter 10

Methods The ITMachineInfoList control has two standard methods.

Refresh

Refresh performs a new query of the database for the current query and machine objects. The Count property is updated.

Clear

This method clears the list and sets the Count property to 0.

Events Four events can be used with the ITMachineInfoList control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object. It will update the SelectedObjectKey values for the list item.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called. It will update the SelectedObjectKey values for the list item.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened. ActiveX Controls 10-33

ITQueryList

The ITQueryList control provides an interface for the InTrack Query.SQL object. The results of this query are presented in a read-only Windows listbox. The Query Type must be selected from the list. Depending on the query type, one or more of the following items can be used to further refine the result set. No additional information is required for any of the queries. The possible types of queries include: Route RouteStepMaterial BulkMaterial LotMaterial Operation CustomerSpec Disposition DataSet Machine Location The following conditions apply to some queries: The Material box must include the VersionKey identifying the target material. (Optional for Route, CustomerSpec and Disposition) The Route box must include the VersionKey of the route for which to retrieve a substitute input material. (Optional for Material, RouteStep and Disposition) The Route Step box must include the NameKey identifying a route step associated with the route. (Optional for Disposition) The Filter box can be used to provide the name of the SQL WHERE predicate for filtering the list. The Sort Order must be selected from the list. ITQueryList uses standard ActiveX control font and color properties.

Properties Properties depend on the Query.SQL object used for the control. The following properties apply to all queries.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of rows meeting the search criteria ColumnCount Integer Long r Number of columns meeting the search criteria 10-34 Chapter 10

Methods The ITQueryList control has three standard methods.

Clear

This method clears the list and sets the Count property to 0.

Refresh

Refresh performs a new query of the database for the current query objects. The Count property is updated.

SelectRow (s)

This method selects the row whose Selection matches s s = string Selection property value It also is possible to set the selected row by setting the Row property of the object.

Events Four events can be used with the ITQueryList control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened.

ActiveX Controls 10-35

ITSampleList

The ITSampleList control provides an interface for the InTrack Query.DataSetSample object class. The DataSet box must be filled in with the VersionKey identifying the data set template for which to retrieve data samples ITSampleList uses standard ActiveX control font and color properties.

Properties The following table describes the properties of an ITSampleList control.

Data Type Data Type Property (InTouch) (VB) Access Description

RowCount Integer Long r Number of data sample collection instances found for the data set template Sample Message String r Name of the specified data sample Index Integer Long r Sequential position of this data sample in the data set template 10-36 Chapter 10

Methods The ITSampleList control has three standard methods.

Clear

This method clears the list and sets the Count property to 0.

Refresh

Refresh performs a new query of the database for the current query objects. The Count property is updated.

SelectRow (s)

This method selects the row whose Selection matches s s = string Selection property value It also is possible to set the selected row by setting the Row property of the object.

Events Four events can be used with the ITSampleList control. DblClick and SelectionChanged can have scripts attached during development to allow Runtime users to perform updates of control properties.

DblClick

The DblClick event is fired when the user double-clicks anywhere on the object.

SelectionChanged

The SelectionChanged event is fired when the user selects a record in the control that is different from the currently highlighted row. It also is fired when the .Refresh() method is called.

ShutDown

The ShutDown event is fired when the window containing the control is closed.

StartUp

The StartUp event is fired when the window containing the control is opened.

I-1

InMachine class, 9-33 InOperation class, 9-70 Index Machine class, 5-52 Operation class, 5-106 AddFailureReasons method InMachineType class, 9-44 A MachineType class, 5-75 AddFailureSymptoms method Add method InMachineType class, 9-45 ArchiveItems class, 4-15 MachineType class, 5-75 BOMItems class, 4-23 adding serial numbers BOMSubItems class, 4-28 ClassificationItems class, 5-13 Amount class CloseItems class, 4-33 to an empty object, 4-7 CompleteItems class, 4-38 to an object with some serial numbers, 4-5 ConsumableMaterials class, 4-44 SerialNumbers class, 4-75 ConsumeItems class, 4-49 Sublot object class, 6-40 DataSetItems class, 5-24 AddInputItems method DataSetTemplates class, 5-37 InMaterial class, 9-52 Date class, 4-52 InRoute class, 9-80 DateTime class, 4-56 Material class, 5-84 DisassembleItems class, 4-66 Route class, 5-121 DispositionCodes class, 5-42 AddMachineOverride method FailureReasons class, 5-44 InMaterial class, 9-52 FailureSymptoms class, 5-46 Material class, 5-85 InDataSetItems class, 9-12 AddMachineTasks method InDataSetTemplates class, 9-22 InMachineType class, 9-45 InDispositionCodes class, 9-27 MachineType class, 5-75 InMachines class, 9-42 AddOutputItems method InRoutePaths class, 9-90 InMaterial class, 9-53 InRouteSteps class, 9-94 InRoute class, 9-80 InSetpointItems class, 9-99 Material class, 5-86 InSetpointTemplates class, 9-107 Route class, 5-121 InStepSetpointItems class, 9-111 AddOverlapOverride method InTableColumns class, 9-120 InMaterial class, 9-53 InWorkInstructionsList class, 9-126 Material class, 5-86 Machines class, 5-68 AddPrivileges method MachineTasks class, 5-72 SecurityGroup class, 5-140 Privileges class, 5-116 AddQualifiedMachines method RoutePaths class, 5-133 InOperation class, 9-70 RouteSteps class, 5-137 Operation class, 5-106 SecurityGroups class, 5-142 AddRoutePaths method SerialNumbers class, 4-75 InRoute class, 9-81 SetpointItems class, 4-81 Route class, 5-122 SetpointTemplates class, 5-149 AddRouteSteps method StartItems class, 4-86 StepInputItems class, 4-91 InRoute class, 9-81 StepOutputItems class, 4-98 Route class, 5-122 StepSetpointItems class, 4-102 AddSerialNumbers method TableColumns class, 5-160 Amount class, 4-5 Time class, 4-106 Sublot class, 6-40 TimeInterval class, 4-109 AddSetpointItems method UserCertifications class, 5-171 InRoute class, 9-82 WorkInstructionsList class, 5-179 InSetpointTemplate class, 9-102 AddCycleTimeOverride method Route class, 5-123 InMaterial class, 9-51 SetpointTemplate class, 5-145 Material class, 5-83 AddSetpointTemplateOverride method AddDataSetItems method InMaterial class, 9-54 DataSetTemplate class, 5-28 Material class, 5-87 InDataSetTemplate class, 9-15 AddSetpointTemplates method AddDataSetOverride method InOperation class, 9-71 InMaterial class, 9-51 Operation class, 5-107 Material class, 5-83 AddSubstitutes method AddDataSetTemplates method BOMItem class, 4-19 AddTrackingOverride method

I-2 Index

InMaterial class, 9-54 Attach method Material class, 5-87 ClassificationItem class, 5-10 AddWorkInstructions method AttachTo method InOperation class, 9-71 Selector class, 4-73 Operation class, 5-107 AddWorkInstructionsOverride method B InMaterial class, 9-55 Material class, 5-88 BackDate AddYieldOverride method setting, 3-2 InMaterial class, 9-55 BeginTrans method Material class, 5-89 Database object class, 3-5 adjusting BOMItem class due date, 7-4 methods lot name, 7-4 AddSubstitutes, 4-19 primary quantity, 7-4 ClearSubstitutes, 4-20 priority, 7-4 RemoveSubstitutes, 4-21 queued quantity, 7-4 properties, 4-18 secondary quantity, 7-4 BOMItems class started quantity, 7-4 methods UDAs, 7-4 Add, 4-23 alias Clear, 4-23 table, 4-69 Item, 4-23 Amount class Remove, 4-24 adding serial numbers properties, 4-22 to an empty object, 4-7 BOMSubItem class to an object with some serial numbers, 4-5 properties, 4-26 clearing serial numbers, 4-7 BOMSubItems class methods methods AddSerialNumbers, 4-5 Add, 4-28 GetSerialNumbers, 4-6 Clear, 4-28 RemoveSerialNumbers, 4-6 Item, 4-28 Serialize, 4-7 Remove, 4-29 Unserialize, 4-7 properties, 4-27 properties, 4-5 BringOnLine method removing serial numbers, 4-6 InMachine class, 9-33 Amount object class Machine class, 5-53 serialized, 4-4 by-products unserialized, 4-4 completing, 6-49 Archive method completing on machine, 6-50 ArchiveItems object class, 3-5 ArchiveItem C description of, 4-8 CheckUserPrivilege method ArchiveItem class Database object class, 3-6 properties, 4-10 Classification class ArchiveItems properties, 5-3 description of, 4-14 Classification class methods ArchiveItems class Create, 5-5 methods Delete, 5-5 Item, 4-16 GetUDAType, 5-6 properties, 4-14 GetUDAValue, 5-6 Assemble method Load, 5-7 Sublot class, 6-41 SetRoot, 5-7 AssignRepairPerson method SetUDAValue, 5-7 InMachine class, 9-33 ClassificationItem class Machine class, 5-53 properties, 5-9 AssociateParent method ClassificationItem class methods DataSetTemplate class, 5-28 Attach, 5-10 InDataSetTemplate class, 9-15 Create, 5-10 InSetpointTemplate class, 9-102 Delete, 5-10 SetpointTemplate class, 5-145 Detach, 5-11 AssociateRoute method GetUDAType, 5-11 InMaterial class, 9-55 GetUDAValue, 5-12 Material class, 5-89

Index I-3

Load, 5-12 Close method SetUDAValue, 5-12 InMachine class, 9-34 ClassificationItems class Machine class, 5-54 properties, 5-13 Sublot class, 6-43 ClassificationItems class methods CloseAllQty method Add, 5-13 Sublot class, 6-45 Clear, 5-14 CloseItem class Item, 5-14 properties, 4-31 Remove, 5-14 CloseItems class Clear method methods ArchiveItems class, 4-15 Add, 4-33 BOMItems class, 4-23 Clear, 4-33 BOMSubItems class, 4-28 Item, 4-33 ClassificationItems class, 5-14 Remove, 4-34 CloseItems class, 4-33 properties, 4-32 CompleteItems class, 4-38 CloseOnMachine method ConsumableMaterials class, 4-44 Sublot class, 6-46 ConsumeItems class, 4-49 CloseRepair method DataSetItems class, 5-24 InMachine class, 9-34 DataSetTemplates class, 5-37 Machine class, 5-55 DisassembleItems class, 4-66 closing DispositionCodes class, 5-43 repairs FailureReasons class, 5-44 machine, 5-55,7-6 FailureSymptoms class, 5-46 sublots InDataSetItems class, 9-12 multiple, 5-54 InDataSetTemplates class, 9-22 single, 5-54,6-43,6-46,7-5 InDispositionCodes class, 9-27 collection objects InMachines class, 9-42 BOMItems, 4-22 InRoutePaths class, 9-90 BOMSubItems, 4-27 InRouteSteps class, 9-94 CloseItems, 4-32 InSetpointItems class, 9-99 CompleteItems, 4-37 InSetpointTemplates class, 9-107 ConsumableMaterials, 4-43 InStepSetpointItems class, 9-111 ConsumeItems, 4-48 InTableColumns class, 9-120 DisassembleItem, 4-62 InWorkInstructionsList class, 9-126 DisassembleItems, 4-65 Machines class, 5-68 SerialNumbers, 4-74 MachineTasks class, 5-72 StartItems, 4-85 Privileges class, 5-116 StepInputItems, 4-90 RoutePaths class, 5-134 StepOutputItems, 4-97 RouteSteps class, 5-137 Collection objects SecurityGroups class, 5-143 SerialNumbers class, 4-75 description of, 2-15 SetpointItems class, 4-82 ColumnName method SetpointTemplates class, 5-150 QuerySQL object class, 8-92 StartItems class, 4-86 ColumnSize method StepInputItems class, 4-91 QuerySQL object class, 8-93 StepOutputItems class, 4-98 ColumnType method StepSetpointItems class, 4-103 QuerySQL object class, 8-94 TableColumns class, 5-160 ColumnValue method UserCertifications class, 5-172 QuerySQL object class, 8-95 WorkInstructionsList class, 5-180 comment clearing serial numbers adding to a sublot, 7-8 Amount class, 4-7 Comment method SerialNumbers class, 4-75 Sublot class, 6-47 ClearSubstitutes method comments BOMItem class, 4-20 adding to ClockIn method sublots, 6-47 User class, 5-164 transactions, 3-2 clocking setting through the Database object class, 3-2 in, 5-164 CommitTrans method out, 5-164 Database object class, 3-8 ClockOut method Complete method User class, 5-164 InMachine class, 9-34

I-4 Index

Machine class, 5-56 standard, 6-53 Sublot class, 6-48 sublot, 7-12 CompleteItem class serialized, 6-41 properties, 4-36 unserialized, 6-52 CompleteItems class consumption methods Assemble method, 6-41 Add, 4-38 Consume method, 6-52 Clear, 4-38 ConsumeQty method, 6-53 Item, 4-38 ConsumeStdQty method, 6-53 Remove, 4-39 Consumption properties, 4-37 Dialog.Consume object class, 7-12 CompleteOnMachine method coproducts Sublot class, 6-50 completing, 6-49 CompleteTask method completing on machine, 6-50 InMachine class, 9-34 Count property, 2-15 Machine class, 5-57 Create method completing Classification class, 5-5 by-products, 6-49 ClassificationItem class, 5-10 coproducts, 6-49 CustomerSpecification class, 5-16 single sublots, 7-9 DataSetTemplate class, 5-29 sublots DispositionCode class, 5-40 multiple, 5-56 InCustomerSpecification class, 9-4 single, 5-56,6-48,6-50 InDataSetTemplate class, 9-16 tasks InDispositionCode class, 9-24 machine, 5-57,7-10 InLocation class, 9-29 completing on machine InMachine class, 9-35 by-products, 6-50 InMachineType class, 9-46 coproducts, 6-50 InMaterial class, 9-56 ConnectEx method InOperation class, 9-72 Database object class, 3-9 InRoute class, 9-82 connecting to a database InSetpointTemplate class, 9-103 and a specified server, 3-9 InTable class, 9-115 procedure, 3-2 InWorkInstructions class, 9-123 connecting to a database, 3-8 Location class, 5-49 ConsumableMaterial class Lot class, 6-26 Machine class, 5-58 methods MachineType class, 5-76 SetMaterial, 4-42 Material class, 5-90 properties, 4-41 Operation class, 5-108 ConsumableMaterials class Route class, 5-124 methods SecurityGroup class, 5-140 Add, 4-44 SetpointTemplate class, 5-146 Clear, 4-44 Sublot class, 6-54 Item, 4-45 Table class, 5-154 Remove, 4-45 User class, 5-164 properties, 4-44 UserCertification class, 5-168 Consume method WorkInstructions class, 5-175 Sublot class, 6-52 CreateBOM method ConsumeItem class InMaterial class, 9-56 properties, 4-47 Material class, 5-91 ConsumeItems class CreateEx method methods InOperation class, 9-73 Add, 4-49 Operation class, 5-109 Clear, 4-49 creating Item, 4-49 lots, 6-26,6-54 Remove, 4-50 sublots, 6-26,6-54 properties, 4-48 creating ConsumeQty method lots, 7-13 Sublot class, 6-53 sublots, 7-13 ConsumeStdQty method customer specification Sublot class, 6-53 updating, 6-31 consuming material CustomerSpecification class methods quantity Create, 5-16 specified, 6-53

Index I-5

Delete, 5-16 DataSetItem class methods GetUDAType, 5-17 GetHoldFlags, 5-20 GetUDAValue, 5-17 GetLimitValue, 5-21 Load, 5-17 GetRanges, 5-21 SetUDAValue, 5-18 SetHoldFlags, 5-22 SetRanges, 5-23 D DataSetItems class properties, 5-24 data DataSetItems class methods purging, 3-16 Add, 5-24 data samples Clear, 5-24 retrieving Item, 5-25 associated with a machine, 8-58 Remove, 5-25 associated with a sublot, 8-37 datasets not associated with a sublot, 8-25 purging, 6-29 data set template DataSetSample class retrieving methods associated with a machine, 8-56 GetItem, 6-8 associated with a sublot, 8-35 GetItemType, 6-9 information about, 8-7 GetItemValue, 6-10 data sets InitializeSample, 6-11 purging, 3-15,3-17,3-18 LoadLotSample, 6-11 database LoadMachineSample, 6-12 connecting, 3-8,7-11 LoadSample, 6-14 and a specified server, 3-9 SaveLotSample, 6-15 procedure, 3-2 SaveMachineSample, 6-16 disconnecting, 3-9,7-16 SaveSample, 6-17 Database object class SetItem, 6-18 methods SupersedeLotSample, 6-19 BeginTrans, 3-5 SupersedeMachineSample, 6-20 CheckUserPrivilege, 3-6 SupersedeSample, 6-22 CommitTrans, 3-8 TransferFromTagList, 6-23 Connect, 3-8 TransferToTagList, 6-24 ConnectEx, 3-9 properties, 6-7 Disconnect, 3-9 DataSetTemplate class GetDBTableOwner, 3-9 properties, 5-27 GetErrorMessage, 3-10 DataSetTemplate class methods GetUDA, 3-11 AddDataSetItems, 5-28 GetUDAType, 3-12 AssociateParent, 5-28 GetUDAValue, 3-13 Create, 5-29 GetUniqueID, 3-10 Delete, 5-29 GetUserVariable, 3-13 DeleteDataSetItems, 5-30 LogMessage, 3-14 DisassociateParent, 5-30 PurgeDataSet, 3-15 GetItemIntegerRanges, 5-31 PurgeDataTable, 3-16 GetItemRealRanges, 5-33 PurgeLot, 3-17 GetUDAType, 5-34 PurgeLotByUserQuery, 3-18 GetUDAValue, 5-35 PurgeMachine, 3-19 Load, 5-35 PurgeMachineLogs, 3-20 SetUDA, 5-36 PurgeUserLogs, 3-20 DataSetTemplates class RemoveUserVariable, 3-21 properties, 5-37 RollbackTrans, 3-21 DataSetTemplates class methods SaveUserVariable, 3-22 SetUDA, 3-23 Add, 5-37 UserLogoff, 3-24 Clear, 5-37 UserLogon, 3-24 Item, 5-38 properties, 3-4 Remove, 5-38 database tables Date class retrieving information from, 8-90 methods table owner, 3-9 Add, 4-52 DataCollectionLogFlag Diff, 4-52 GetString, 4-52 setting, 3-2 IsEqual, 4-53 DataSetItem class IsGreater, 4-53 properties, 5-19

I-6 Index

IsLess, 4-53 Machine class, 5-59 SetLocalTime, 4-53 Operation class, 5-110 SetMonthDayYear, 4-54 DeleteAllFailureReasons method TimeSpan, 4-54 InMachineType class, 9-47 properties, 4-51 MachineType class, 5-76 DateTime class DeleteAllFailureSymptoms method methods InMachineType class, 9-47 Add, 4-56 MachineType class, 5-77 Diff, 4-57 DeleteAllInputItems method GetString, 4-57 InMaterial class, 9-58 IsEqual, 4-58 InRoute class, 9-83 IsGreater, 4-58 Material class, 5-93 IsLess, 4-58 Route class, 5-125 SetHourMinSec, 4-59 DeleteAllMachineTasks method SetLocalTime, 4-60 InMachineType class, 9-47 SetMonthDayYear, 4-60 MachineType class, 5-77 TimeSpan, 4-61 DeleteAllOutputItems method properties, 4-56 InMaterial class, 9-60 DelAllDataSetOverride method InRoute class, 9-83 InMaterial class, 9-58 Material class, 5-93 Material class, 5-91 Route class, 5-125 DelAllMachineOverride method DeleteAllQualifiedMachines method InMaterial class, 9-59 InOperation class, 9-75 Material class, 5-92 Operation class, 5-110 DelAllSetpointTemplateOverride method DeleteAllSetpointItems method InMaterial class, 9-61 InRoute class, 9-84 Material class, 5-92 Route class, 5-126 DelAllWorkInstructionsOverride method DeleteAllSetpointTemplates method InMaterial class, 9-63 InOperation class, 9-76 Material class, 5-93 Operation class, 5-110 Delete method DeleteAllWorkInstructions method Classification class, 5-5 InOperation class, 9-76 ClassificationItem class, 5-10 Operation class, 5-110 CustomerSpecification class, 5-16 DeleteBOM method DataSetTemplate class, 5-29 InMaterial class, 9-57 DispositionCode class, 5-40 Material class, 5-94 InCustomerSpecification class, 9-5 DeleteCycleTimeOverride method InDataSetTemplate class, 9-16 InMaterial class, 9-57 InDispositionCode class, 9-25 Material class, 5-94 InLocation class, 9-29 DeleteDataSetItems method InMachine class, 9-35 InMachineType class, 9-46 DataSetTemplate class, 5-30 InMaterial class, 9-57 InDataSetTemplate class, 9-17 InOperation class, 9-74 DeleteDataSetOverride method InRoute class, 9-83 InMaterial class, 9-57 InSetpointTemplate class, 9-103 Material class, 5-94 InTable class, 9-115 DeleteDataSetTemplates method InWorkInstructions class, 9-124 InMachine class, 9-36 Location class, 5-49 InOperation class, 9-74 Lot class, 6-29 Machine class, 5-59 Machine class, 5-58 Operation class, 5-111 MachineType class, 5-76 DeleteFailureReasons method Material class, 5-93 InMachineType class, 9-47 Operation class, 5-110 MachineType class, 5-77 Route class, 5-125 DeleteFailureSymptoms method SecurityGroup class, 5-140 InMachineType class, 9-48 SetpointTemplate class, 5-146 MachineType class, 5-78 Table class, 5-154 DeleteInputItems method User class, 5-164 InMaterial class, 9-58 UserCertification class, 5-168 InRoute class, 9-84 WorkInstructions class, 5-176 Material class, 5-95 DeleteAllDataSetTemplates method Route class, 5-126 InMachine class, 9-36 DeleteMachineOverride method InOperation class, 9-74

Index I-7

InMaterial class, 9-59 method Material class, 5-95 Launch, 7-5 DeleteMachineTasks method properties, 7-5 InMachineType class, 9-48 Dialog.CloseRepair object class MachineType class, 5-78 method DeleteOutputItems method Launch, 7-6 InMaterial class, 9-60 properties, 7-6 InRoute class, 9-84 Dialog.Collect object class Material class, 5-96 method Route class, 5-127 Launch, 7-7 DeleteOverlapOverride method properties, 7-7 InMaterial class, 9-60 Dialog.Comment object class Material class, 5-96 method DeletePrivileges method Launch, 7-8 SecurityGroup class, 5-141 properties, 7-8 DeleteQualifiedMachines method Dialog.Complete object class InOperation class, 9-75 method Operation class, 5-111 Launch, 7-9 DeleteRoutePaths method properties, 7-9 InRoute class, 9-85 Dialog.CompleteTask object class Route class, 5-127 method DeleteRouteSteps method Launch, 7-10 InRoute class, 9-85 properties, 7-10 Route class, 5-127 Dialog.Connect object class DeleteRow method method InTable class, 9-117 Launch, 7-11 Table class, 5-156 properties, 7-11 DeleteSetpointItems method Dialog.Consume object class InRoute class, 9-85 method InSetpointTemplate class, 9-104 Launch, 7-12 Route class, 5-128 properties, 7-12 SetpointTemplate class, 5-146 Dialog.Create object class DeleteSetpointTemplateOverride method method InMaterial class, 9-61 Launch, 7-13 DeleteSetpointTemplateOverrides method properties, 7-13 Material class, 5-97 Dialog.Delete object class DeleteSetpointTemplates method method InOperation class, 9-75 Launch, 7-14 Operation class, 5-112 properties, 7-14 DeleteTrackingOverride method Dialog.Detail object class InMaterial class, 9-62 methods Material class, 5-97 Launch, 7-15 DeleteWorkInstructions method properties, 7-15 InOperation class, 9-76 Dialog.Disconnect object class Operation class, 5-112 method DeleteWorkInstructionsOverride method Launch, 7-16 InMaterial class, 9-62 Dialog.Filter object class Material class, 5-98 method DeleteYieldOverride method Launch, 7-17 InMaterial class, 9-63 SetSelector, 7-17 Material class, 5-98 properties, 7-17 deleting Dialog.Instruct object class sublots, 7-14 method Detach method Launch, 7-19 properties, 7-19 ClassificationItem class, 5-11 Dialog.LogIn object class Dialog object class methods method Launch, 7-1 Launch, 7-20 Dialog.Adjust object class properties, 7-20 method Dialog.LogOut object class Launch, 7-4 method properties, 7-4 Launch, 7-21 Dialog.Close object class properties, 7-21

I-8 Index

Dialog.MachineStatus object class SetMaterial, 4-64 method DisassembleItem class Launch, 7-22 properties, 4-63 properties, 7-22 DisassembleItems Dialog.Merge object class description of, 4-65 method DisassembleItems class Launch, 7-23 methods properties, 7-23 Add, 4-66 Dialog.Move object class Clear, 4-66 method Item, 4-66 Launch, 7-24 DisassembleItems class properties, 7-24 methods Dialog.OpenRepair object class Remove, 4-67 method properties, 4-65 Launch, 7-25 DisassociateParent method properties, 7-25 DataSetTemplate class, 5-30 Dialog.Purge object class InDataSetTemplate class, 9-17 method InSetpointTemplate class, 9-104 Launch, 7-26 SetpointTemplate class, 5-147 properties, 7-26 Disconnect method Dialog.Receive object class Database object class, 3-9 method Disconnect object class Launch, 7-27 properties, 7-16 properties, 7-27 disconnecting Dialog.Ship object class from a database, 3-9,7-16 method disposition codes Launch, 7-28 types of, 6-49 properties, 7-28 DispositionCode class Dialog.Split object class properties, 5-39 method DispositionCode class methods Launch, 7-29 Create, 5-40 properties, 7-29 Delete, 5-40 Dialog.Start object class GetUDAType, 5-40 method GetUDAValue, 5-41 Launch, 7-30 Load, 5-41 properties, 7-30 SetUDAValue, 5-41 Dialog.StartTask object class DispositionCodes class method properties, 5-42 Launch, 7-31 DispositionCodes class methods properties, 7-31 Add, 5-42 Dialog.Status object class Clear, 5-43 method Item, 5-43 Launch, 7-32 Remove, 5-43 properties, 7-32 due date Dialog.Undo object class updating, 6-32 method Launch, 7-33 E properties, 7-33 Dialog.UpdateRepair object class error messages, 3-10 method expiration date Launch, 7-35 updating, 6-32 properties, 7-34 Diff method F Date class, 4-52 DateTime class, 4-57 FailureReasons class Time class, 4-106 properties, 5-44 TimeInterval class, 4-110 FailureReasons class methods Disassemble method Add, 5-44 Sublot class, 6-56 Clear, 5-44 DisassembleItem Item, 5-45 description of, 4-62 Remove, 5-45 DisassembleItem class FailureSymptoms class methods properties, 5-46

Index I-9

FailureSymptoms class methods DataSetItem class, 5-21 Add, 5-46 InDataSetItem class, 9-9 Clear, 5-46 GetSerialNumbers method Item, 5-47 Amount class, 4-6 Remove, 5-47 GetString method force completion Date class, 4-52 description of, 6-50 DateTime class, 4-57 functions Time class, 4-106 OLE_CreateObject, 1-6 TimeInterval class, 4-110 OLE_IsObjectValid, 1-7 GetSubstituteConsumeItems method OLE_ReleaseObject, 1-7 Sublot class, 6-64 GetSubstituteMaterials method G Sublot class, 6-64 GetTaskWorkInstructions method GetAllConsumeItems method InMachine class, 9-36 Sublot class, 6-58 Machine class, 5-59 GetCompletionDate method GetUDA method Sublot class, 6-59 Database object class, 3-11 GetConsumableMaterials method InSetpointTemplate class, 9-104 Sublot class, 6-59 GetUDAType method GetConsumeItems method Classification class, 5-6 Sublot class, 6-60 ClassificationItem class, 5-11 GetConsumeQty method CustomerSpecification class, 5-17 Sublot class, 6-61,6-63 Database object class, 3-12 GetDBTableOwner method DataSetTemplate class, 5-34 Database object class, 3-9 DispositionCode class, 5-40 GetDispMaterialOutput method InCustomerSpecification class, 9-5 InRoute class, 9-86 InDataSetTemplate class, 9-20 Route class, 5-128 InDispositionCode class, 9-25 GetErrorMessage method InLocation class, 9-30 Database object class, 3-10 InMachine class, 9-37 GetHoldFlags method InMachineType class, 9-48 DataSetItem class, 5-20 InMaterial class, 9-63 InDataSetItem class, 9-8 InOperation class, 9-77 GetInfo method InRoute class, 9-87 InRoute class, 9-86 InSetpointTemplate class, 9-105 Route class, 5-129 InWorkInstructions class, 9-124 GetItem method Location class, 5-49 DataSetSample class, 6-8 Lot class, 6-30 GetItemIntegerRanges method Machine class, 5-60 MachineType class, 5-78 DataSetTemplate class, 5-31 Material class, 5-99 InDataSetTemplate class, 9-18 Operation class, 5-112 GetItemRealRanges method Route class, 5-129 DataSetTemplate class, 5-33 SetpointTemplate class, 5-147 InDataSetTemplate class, 9-19 Sublot class, 6-2,6-66 GetItemType method UserCertification class, 5-169 DataSetSample class, 6-9 WorkInstructions class, 5-176 GetItemValue method GetUDAValue method DataSetSample class, 6-10 Classification class, 5-6 GetLimits method ClassificationItem class, 5-12 InSetpointItem class, 9-97 CustomerSpecification class, 5-17 SetpointItem class, 4-79 Database object class, 3-13 GetLimitValue method DataSetTemplate class, 5-35 DataSetItem class, 5-21 DispositionCode class, 5-41 InDataSetItem class, 9-9 InCustomerSpecification class, 9-5 InSetpointItem class, 9-97 InDataSetTemplate class, 9-20 SetpointItem class, 4-79 InDispositionCode class, 9-25 GetOperationInfo method InLocation class, 9-30 Sublot class, 6-62 InMachine class, 9-37 GetQualificationStatus method InMachineType class, 9-49 User class, 5-165 InMaterial class, 9-64 GetRanges method InOperation class, 9-77

I-10 Index

InRoute class, 9-87 Delete, 9-16 InSetpointTemplate class, 9-105 DeleteDataSetItems, 9-17 InWorkInstructions class, 9-124 DisassociateParent, 9-17 Location class, 5-50 GetItemIntegerRanges, 9-18 Lot class, 6-31 GetItemRealRanges, 9-19 Machine class, 5-60 GetUDAType, 9-20 MachineType class, 5-79 GetUDAValue, 9-20 Material class, 5-99 Load, 9-21 Operation class, 5-113 SetUDA, 9-21 Route class, 5-129 InDataSetTemplates class SetpointTemplate class, 5-148 properties, 9-22 Sublot class, 6-67 InDataSetTemplates class methods UserCertification class, 5-169 Add, 9-22 WorkInstructions class, 5-177 Clear, 9-22 GetUniqueID method Item, 9-23 Database object class, 3-10 Remove, 9-23 GetUserVariable method InDispositionCode class Database object class, 3-13 properties, 9-24 GrantPrivileges method InDispositionCode class methods User class, 5-165,5-166 Create, 9-24 Delete, 9-25 H GetUDAType, 9-25 GetUDAValue, 9-25 hold Load, 9-26 lot SetUDAValue, 9-26 putting on, 6-32 InDispositionCodes class releasing, 6-32 properties, 9-27 releasing from, 7-32 InDispositionCodes class methods sublot Add, 9-27 putting on, 6-32,7-32 Clear, 9-27 releasing from, 6-32,7-32 Item, 9-28 Remove, 9-28 I InitializeFrom method InCustomerSpecification class InStepSetpointItem class, 9-110 properties, 5-15,9-4 StepInputItem class, 4-89 InCustomerSpecification class methods StepOutputItem class, 4-96 Create, 9-4 StepSetpointItem class, 4-101 Delete, 9-5 InitializeSample method GetUDAType, 9-5 DataSetSample class, 6-11 GetUDAValue, 9-5 InLocation class Load, 9-6 properties, 9-29 SetUDAValue, 9-6 InLocation class methods InDataSetItem class Create, 9-29 properties, 9-7 Delete, 9-29 InDataSetItem class methods GetUDAType, 9-30 GetHoldFlags, 9-8 GetUDAValue, 9-30 GetLimitValue, 9-9 Load, 9-30 GetRanges, 9-9 SetUDAValue, 9-31 SetHoldFlags, 9-10 InMachine class SetRanges, 9-11 properties, 9-32 InDataSetItems class InMachine class methods properties, 9-12 AddDataSetTemplates, 9-33 InDataSetItems class methods AssignRepairPerson, 9-33 Add, 9-12 BringOnLine, 9-33 Clear, 9-12 Close, 9-34 Item, 9-13 CloseRepair, 9-34 Remove, 9-13 Complete, 9-34 InDataSetTemplate class CompleteTask, 9-34 properties, 9-14 Create, 9-35 InDataSetTemplate class methods Delete, 9-35 AddDataSetItems, 9-15 DeleteAllDataSetTemplates, 9-36 AssociateParent, 9-15 DeleteDataSetTemplates, 9-36 Create, 9-16 GetTaskWorkInstructions, 9-36

Index I-11

GetUDAType, 9-37 DeleteDataSetOverride, 9-57 GetUDAValue, 9-37 DeleteInputItems, 9-58 Load, 9-37 DeleteMachineOverride, 9-59 OpenRepair, 9-38 DeleteOutputItems, 9-60 SetUDAValue, 9-38 DeleteOverlapOverride, 9-60 Start, 9-38 DeleteSetpointTemplateOverride, 9-61 StartRepair, 9-39 DeleteTrackingOverride, 9-62 StartTask, 9-39 DeleteWorkInstructionsOverride, 9-62 StopRepair, 9-39 DeleteYieldOverride, 9-63 TakeOffline, 9-39 GetUDAType, 9-63 UpdateDiagnosis, 9-40 GetUDAValue, 9-64 UpdateFailureReason, 9-40 Load, 9-64 UpdateFailureSymptom, 9-40 RemoveRouteAssociation, 9-64 UpdateWorkStatus, 9-41 SetControlType, 9-65 InMachines class SetDescription, 9-65 properties, 9-42 SetLifeTime, 9-65 InMachines class methods SetQuantity, 9-66 Add, 9-42 SetUDAValue, 9-66 Clear, 9-42 SetUnitsOfMeasure, 9-66 Item, 9-43 ToggleDataSetOverride, 9-67 Remove, 9-43 ToggleMachineOverride, 9-67 InMachineType class ToggleSetpointTemplateOverride, 9-68 properties, 9-44 ToggleWorkInstructionsOverride, 9-68 InMachineType class methods InOperation class AddFailureReasons, 9-44 properties, 9-69 AddFailureSymptoms, 9-45 InOperation class methods AddMachineTasks, 9-45 AddDataSetTemplates, 9-70 Create, 9-46 AddQualifiedMachines, 9-70 Delete, 9-46 AddSetpointTemplates, 9-71 DeleteAllFailureReasons, 9-47 AddWorkInstructions, 9-71 DeleteAllFailureSymptoms, 9-47 Create, 9-72 DeleteAllMachineTasks, 9-47 CreateEx, 9-73 DeleteFailureReasons, 9-47 Delete, 9-74 DeleteFailureSymptoms, 9-48 DeleteAllDataSetTemplates, 9-74 DeleteMachineTasks, 9-48 DeleteAllQualifiedMachines, 9-75 GetUDAType, 9-48 DeleteAllSetpointTemplates, 9-76 GetUDAValue, 9-49 DeleteAllWorkInstructions, 9-76 Load, 9-49 DeleteDataSetTemplates, 9-74 SetUDAValue, 9-49 DeleteQualifiedMachines, 9-75 InMaterial class DeleteSetpointTemplates, 9-75 properties, 9-50 DeleteWorkInstructions, 9-76 InMaterial class methods GetUDAType, 9-77 AddCycleTimeOverride, 9-51 GetUDAValue, 9-77 AddDataSetOverride, 9-51 Load, 9-77 AddInputItems, 9-52 SetUDAValue, 9-78 AddMachineOverride, 9-52 InProcessMove method AddOutputItems, 9-53 Sublot class, 6-68 AddOverlapOverride, 9-53 InRoute class AddSetpointTemplateOverride, 9-54 properties, 9-79 AddTrackingOverride, 9-54 InRoute class methods AddWorkInstructionsOverride, 9-55 AddInputItems, 9-80 AddYieldOverride, 9-55 AddOutputItems, 9-80 AssociateRoute, 9-55 AddRoutePaths, 9-81 Create, 9-56 AddRouteSteps, 9-81 CreateBOM, 9-56 AddSetpointItems, 9-82 DelAllDataSetOverride, 9-58 Create, 9-82 DelAllMachineOverride, 9-59 Delete, 9-83 DelAllSetpointTemplateOverride, 9-61 DeleteAllInputItems, 9-83 DelAllWorkInstructionsOverride, 9-63 DeleteAllOutputItems, 9-83 Delete, 9-57 DeleteAllSetpointItems, 9-84 DeleteAllInputItems, 9-58 DeleteInputItems, 9-84 DeleteAllOutputItems, 9-60 DeleteOutputItems, 9-84 DeleteBOM, 9-57 DeleteRoutePaths, 9-85 DeleteCycleTimeOverride, 9-57 DeleteRouteSteps, 9-85

I-12 Index

DeleteSetpointItems, 9-85 InStepSetpointItem class methods GetDispMaterialOutput, 9-86 InitializeFrom, 9-110 GetInfo, 9-86 InStepSetpointItems class GetUDAType, 9-87 properties, 9-111 GetUDAValue, 9-87 InStepSetpointItems class methods Load, 9-87 Add, 9-111 SetDefaultDispositionCode, 9-88 Clear, 9-111 SetInitialRouteStep, 9-88 Item, 9-112 SetUDAValue, 9-88 Remove, 9-112 InRoutePath class TransferFromTaglist, 9-113 properties, 9-89 TransferToTaglist, 9-113 InRoutePaths class InTable class properties, 9-90 properties, 9-115 InRoutePaths class methods InTable class methods Add, 9-90 Create, 9-115 Clear, 9-90 Delete, 9-115 Item, 9-91 DeleteRow, 9-117 Remove, 9-91 Load, 9-115 InRouteStep class Modify, 9-116 properties, 9-92 ReadRow, 9-117 InRouteSteps class SaveRow, 9-118 properties, 9-94 InTableColumn class InRouteSteps class methods properties, 9-119 Add, 9-94 InTableColumns class Clear, 9-94 properties, 9-120 Item, 9-95 InTableColumns class methods Remove, 9-95 Add, 9-120 InSetpointItem class Clear, 9-120 properties, 9-96 Item, 9-121 InSetpointItem class methods Remove, 9-121 GetLimits, 9-97 InTrack table owner, 3-9 GetLimitValue, 9-97 inventory SetLimits, 9-98 receiving, 6-74,7-27 InSetpointItems class InWorkInstructions class properties, 9-99 properties, 9-122 InSetpointItems class methods InWorkInstructions class methods Add, 9-99 Create, 9-123 Clear, 9-99 Delete, 9-124 Item, 9-100 GetUDAType, 9-124 Remove, 9-100 GetUDAValue, 9-124 InSetpointTemplate class Load, 9-125 properties, 9-101 SetUDAValue, 9-125 InSetpointTemplate class methods InWorkInstructionsList class AddSetpointItems, 9-102 properties, 9-126 AssociateParent, 9-102 InWorkInstructionsList class methods Create, 9-103 Add, 9-126 Delete, 9-103 Clear, 9-126 DeleteSetpointItems, 9-104 Item, 9-126 DisassociateParent, 9-104 Remove, 9-127 GetUDA, 9-104 IsEqual method GetUDAType, 9-105 Date class, 4-53 GetUDAValue, 9-105 DateTime class, 4-58 Load, 9-106 IsGreater method SetUDA, 9-106 Date class, 4-53 InSetpointTemplates class DateTime class, 4-58 properties, 9-107 IsLess method InSetpointTemplates class methods Date class, 4-53 Add, 9-107 DateTime class, 4-58 Clear, 9-107 IsMember method Item, 9-108 SerialNumbers class, 4-76 Remove, 9-108 ITDataItemList InStepSetpointItem class properties, 10-5 properties, 9-109

Index I-13 item properties, 10-31 getting value, 6-8,6-10,8-23 ITQueryList identifying type, 6-9 properties, 10-33 Item method ITSampleList control ArchiveItems class, 4-16 properties, 10-35 BOMItems class, 4-23 ITSelector BOMSubItems class, 4-28 properties, 10-25 ClassificationItems class, 5-14 ITSubInputMtls CloseItems class, 4-33 properties, 10-21 CompleteItems class, 4-38 ConsumableMaterials class, 4-45 L ConsumeItems class, 4-49 DataSetItems class, 5-25 Launch method, 7-21 DataSetTemplates class, 5-38 Load method DisassembleItems class, 4-66 Classification class, 5-7 DispositionCodes class, 5-43 ClassificationItem class, 5-12 FailureReasons class, 5-45 CustomerSpecification class, 5-17 FailureSymptoms class, 5-47 DataSetTemplate class, 5-35 InDataSetItems class, 9-13 description of, 5-1 InDataSetTemplates class, 9-23 DispositionCode class, 5-41 InDispositionCodes class, 9-28 InCustomerSpecification class, 9-6 InMachines class, 9-43 InDataSetTemplate class, 9-21 InRoutePaths class, 9-91 InDispositionCode class, 9-26 InRouteSteps class, 9-95 InLocation class, 9-30 InSetpointItems class, 9-100 InMachine class, 9-37 InSetpointTemplates class, 9-108 InMachineType class, 9-49 InStepSetpointItems class, 9-112 InMaterial class, 9-64 InWorkInstructionsList class, 9-126 InOperation class, 9-77 Machines class, 5-69 InRoute class, 9-87 MachineTasks class, 5-73 InSetpointTemplate class, 9-106 Privileges class, 5-117 InTable class, 9-115 RoutePaths class, 5-134 InWorkInstructions class, 9-125 RouteSteps class, 5-138 Location class, 5-50 SecurityGroups class, 5-143 Lot class, 6-31 SerialNumbers class, 4-76 Machine class, 5-60 SetpointItems class, 4-82 MachineType class, 5-79 SetpointTemplates class, 5-150 Material class, 5-99 StartItems class, 4-86 Operation class, 5-113 StepInputItems class, 4-91 Route class, 5-130 StepOutputItems class, 4-98 SecurityGroup class, 5-141 StepSetpointItems class, 4-103 SetpointTemplate class, 5-148 UserCertifications class, 5-172 Sublot class, 6-69 WorkInstructionsList class, 5-180 Table class, 5-154 Itemmethod User class, 5-165 InTableColumns class, 9-121 UserCertification class, 5-170 TableColumns class, 5-161 WorkInstructions class, 5-177 ITLotDataSet LoadLotSample method properties, 10-7 DataSetSample class, 6-11 ITLotDispCode LoadMachineSample method properties, 10-9 DataSetSample class, 6-12 ITLotInputItems LoadSample method properties, 10-11 DataSetSample class, 6-14 ITLotInputMtls Location class properties, 10-13 properties, 5-48 ITLotMachAvail Location class methods properties, 10-15 Create, 5-49 ITLotMergeList Delete, 5-49 properties, 10-29 GetUDAType, 5-49 ITLotUndoList GetUDAValue, 5-50 properties, 10-17 Load, 5-50 ITLotWorkInst SetUDAValue, 5-50 properties, 10-19 logging ITMachineInfoList off runtime, 3-24,7-21

I-14 Index

on runtime, 7-20 StartTask, 5-64 on to runtime, 3-24 TakeOffline, 5-66 LogMessage method UpdateDiagnosis, 5-66 Database object class, 3-14 UpdateFailureReason, 5-66 logs UpdateFailureSymptom, 5-67 purging UpdateWorkStatus, 5-67 base and transaction, 3-15,3-17,3-18,6-29 machine repairs machine, 3-19,3-20 closing, 5-55,7-6 Lot class opening, 5-61,7-25 methods stopping, 5-65 Create, 6-26 updating, 7-34 Delete, 6-29 machine tasks GetUDAType, 6-30 completing, 5-57,7-10 GetUDAValue, 6-31 description of, 5-64 Load, 6-31 non-periodic, 5-64,7-10,7-31 SetCustomerSpecification, 6-31 periodic, 5-64,7-10,7-31 SetDueDate, 6-32 retrieving SetExpirationDate, 6-32 expired, 8-31 SetHoldStatus, 6-32 in warning, 8-33 SetMaterial, 6-33 starting, 5-64,7-31 SetName, 6-34 machine types SetPriority, 6-34 retrieving information about, 8-101 SetQuarantineStatus, 6-35 Machines class SetSecondaryAmount, 6-35 properties, 5-68 SetUDA, 6-36 Machines class methods Undo, 6-36 Add, 5-68 properties, 6-25 Clear, 5-68 lot name Item, 5-69 updating, 6-34 Remove, 5-69 lot(s) MachineTask class creating, 6-26,6-54,7-13 properties, 5-71 deleting, 7-14 MachineTasks class purging, 3-17,3-18,6-29,7-26 properties, 5-72 splitting, 6-83,7-29 MachineTasks class methods LotKey Add, 5-72 updating, 6-34 Clear, 5-72 Item, 5-73 M Remove, 5-73 MachineType class Machine class properties, 5-74 methods MachineType class methods Close, 5-54 CloseRepair, 5-55 AddFailureReasons, 5-75 Complete, 5-56 AddFailureSymptoms, 5-75 CompleteTask, 5-57 AddMachineTasks, 5-75 OpenRepair, 5-61 Create, 5-76 Start, 5-62 Delete, 5-76 StartTask, 5-64 DeleteAllFailureReasons, 5-76 StopRepair, 5-65 DeleteAllFailureSymptoms, 5-77 properties, 5-52 DeleteAllMachineTasks, 5-77 Machine class methods DeleteFailureReasons, 5-77 DeleteFailureSymptoms, 5-78 AddDataSetTemplates, 5-52 DeleteMachineTasks, 5-78 AssignRepairPerson, 5-53 GetUDAType, 5-78 BringOnLine, 5-53 GetUDAValue, 5-79 Create, 5-58 Load, 5-79 Delete, 5-58 SetUDAValue, 5-79 DeleteAllDataSetTemplates, 5-59 material DeleteDataSetTemplates, 5-59 GetTaskWorkInstructions, 5-59 consuming GetUDAType, 5-60 serialized sublot, 6-41 GetUDAValue, 5-60 specified quantity, 6-53 Load, 5-60 standard quantity, 6-53 SetUDAValue, 5-61 sublot, 7-12 StartRepair, 5-63 unserialized sublot, 6-52

Index I-15

getting Merge method completion date, 6-59 Sublot class, 6-70 ConsumableMaterials, 6-59 merging consume quantity, 6-61,6-63 sublots, 6-70,7-23 ConsumeItems, 6-58,6-60,6-64 methods substitutes, 6-64 Dialog object class of for consumption Launch, 7-1 by input material, 8-70 Modify method by material type, 8-68 InTable class, 9-116 by substitute material, 8-99 Table class, 5-155 for a target material, 8-21 Move method removing consumed, 6-56 Sublot class, 6-72 updating, 6-33 moving Material class sublots, 6-68,6-72,7-24 methods multiple sublots AddDataSetOverride, 5-83 AddInputItems, 5-84 closing, 5-54 AddMachineOverride, 5-85 completing, 5-56 AddOutputItems, 5-86 starting, 5-62 AddSetpointTemplateOverride, 5-87 AddWorkInstructionsOverride, 5-88 O Create, 5-90 OLE_CreateObject function, 1-6 CreateBOM, 5-91 OLE_IsObjectValid function, 1-7 Delete, 5-93 OLE_ReleaseObject function, 1-7 DeleteSetpointTemplateOverrides, 5-97 properties, 5-82 opening Material class methods machine AddCycleTimeOverride, 5-83 repairs, 5-61,7-25 AddOverlapOverride, 5-86 OpenRepair method AddTrackingOverride, 5-87 InMachine class, 9-38 AddYieldOverride, 5-89 Machine class, 5-61 AssociateRoute, 5-89 Operation class DelAllDataSetOverride, 5-91 properties, 5-105 DelAllMachineOverride, 5-92 Operation class methods DelAllSetpointTemplateOverride, 5-92 AddDataSetTemplates, 5-106 DelAllWorkInstructionsOverride, 5-93 AddQualifiedMachines, 5-106 DeleteAllInputItems, 5-93 AddSetpointTemplates, 5-107 DeleteAllOutputItems, 5-93 AddWorkInstructions, 5-107 DeleteBOM, 5-94 Create, 5-108 DeleteCycleTimeOverride, 5-94 CreateEx, 5-109 DeleteDataSetOverride, 5-94 Delete, 5-110 DeleteInputItems, 5-95 DeleteAllDataSetTemplates, 5-110 DeleteMachineOverride, 5-95 DeleteAllQualifiedMachines, 5-110 DeleteOutputItems, 5-96 DeleteAllSetpointTemplates, 5-110 DeleteOverlapOverride, 5-96 DeleteAllWorkInstructions, 5-110 DeleteTrackingOverride, 5-97 DeleteDataSetTemplates, 5-111 DeleteWorkInstructionsOverride, 5-98 DeleteQualifiedMachines, 5-111 DeleteYieldOverride, 5-98 DeleteSetpointTemplates, 5-112 GetUDAType, 5-99 DeleteWorkInstructions, 5-112 GetUDAValue, 5-99 GetUDAType, 5-112 Load, 5-99 GetUDAValue, 5-113 RemoveRouteAssociation, 5-100 Load, 5-113 SetControlType, 5-100 SetUDAValue, 5-113 SetDescription, 5-100 SetLifeTime, 5-101 P SetQuantity, 5-101 SetUDAValue, 5-101 priority SetUnitsOfMeasure, 5-102 updating, 6-34 ToggleDataSetOverride, 5-102 Privilege class ToggleMachineOverride, 5-103 properties, 5-114 ToggleSetpointTemplateOverride, 5-103 Privileges class ToggleWorkInstructionsOverride, 5-104 properties, 5-116 maximum number of rows in a selector Privileges class methods specifying, 4-69 Add, 5-116

I-16 Index

Clear, 5-116 FailureReasons class, 5-44 Item, 5-117 FailureSymptoms class, 5-46 Remove, 5-117 InCustomerSpecification class, 5-15,9-4 properties InDataSetItem class, 9-7 Amount class, 4-5 InDataSetItems class, 9-12 ArchiveItem class, 4-10 InDataSetTemplate class, 9-14 ArchiveItems class, 4-14 InDataSetTemplates class, 9-22 BOMItem class, 4-18 InDispositionCode class, 9-24 BOMItems class, 4-22 InDispositionCodes class, 9-27 BOMSubItem class, 4-26 InLocation class, 9-29 BOMSubItems class, 4-27 InMachine class, 9-32 Classification class, 5-3 InMachines class, 9-42 ClassificationItem class, 5-9 InMachineType class, 9-44 ClassificationItems class, 5-13 InMaterial class, 9-50 CloseItem class, 4-31 InOperation class, 9-69 CloseItems class, 4-32 InRoute class, 9-79 CompleteItem class, 4-36 InRoutePath class, 9-89 CompleteItems class, 4-37 InRoutePaths class, 9-90 ConsumableMaterial class, 4-41 InRouteStep class, 9-92 ConsumableMaterials class, 4-44 InRouteSteps class, 9-94 ConsumeItem class, 4-47 InSetpointItem class, 9-96 ConsumeItems class, 4-48 InSetpointItems class, 9-99 Database object class, 3-4 InSetpointTemplate class, 9-101 DataSetItem class, 5-19 InSetpointTemplates class, 9-107 DataSetItems class, 5-24 InStepSetpointItem class, 9-109 DataSetSample class, 6-7 InStepSetpointItems class, 9-111 DataSetTemplate class, 5-27 InTable class, 9-115 DataSetTemplates class, 5-37 InTableColumn class, 9-119 Date class, 4-51 InTableColumns class, 9-120 DateTime class, 4-56 InWorkInstructions class, 9-122 Dialog.Adjust object class, 7-4 InWorkInstructionsList class, 9-126 Dialog.Close object class, 7-5 ITDataItemList, 10-5 Dialog.CloseRepair object class, 7-6 ITLotDataSet, 10-7 Dialog.Collect object class, 7-7 ITLotDispCode, 10-9 Dialog.Comment object class, 7-8 ITLotInputItems, 10-11 Dialog.Complete object class, 7-9 ITLotInputMtls, 10-13 Dialog.CompleteTask object class, 7-10 ITLotMachAvail, 10-15 Dialog.Connect object class, 7-11 ITLotMergeList, 10-29 Dialog.Consume object class, 7-12 ITLotUndoList, 10-17 Dialog.Create object class, 7-13 ITLotWorkInst, 10-19 Dialog.Delete object class, 7-14 ITMachineInfoList, 10-31 Dialog.Detail object class, 7-15 ITQueryList, 10-33 Dialog.Filter object class, 7-17 ITSelector, 10-25 Dialog.Instruct object class, 7-19 ITSubInputMtls, 10-21 Dialog.LogIn object class, 7-20 Location class, 5-48 Dialog.LogOut object class, 7-21 Lot class, 6-25 Dialog.MachineStatus object class, 7-22 Machine class, 5-52 Dialog.Merge object class, 7-23 Machines class, 5-68 Dialog.Move object class, 7-24 MachineTask class, 5-71 Dialog.OpenRepair object class, 7-25 MachineTasks class, 5-72 Dialog.Purge object class, 7-26 MachineType class, 5-74 Dialog.Receive object class, 7-27 Material class, 5-82 Dialog.Ship object class, 7-28 Operation class, 5-105 Dialog.Split object class, 7-29 Privilege class, 5-114 Dialog.Start object class, 7-30 Privileges class, 5-116 Dialog.StartTask object class, 7-31 QueryExpiredMachineTaskobject class, 8-31 Dialog.Status object class, 7-32 QueryInWarningMachineTask object class, 8-33 Dialog.Undo object class, 7-33 read-only Dialog.UpdateRepair object class, 7-34 viewing, 5-1 DisassembleItem class, 4-63 Route class, 5-118 DisassembleItems class, 4-65 RoutePath class, 5-132 Disconnect object class, 7-16 RoutePaths class, 5-133 DispositionCode class, 5-39 RouteStep class, 5-135 DispositionCodes class, 5-42 RouteSteps class, 5-137

Index I-17

SecurityGroup class, 5-139 lot SecurityGroups class, 5-142 putting in, 6-35,7-32 Selector class, 4-72 releasing, 6-35 SerialNumbers class, 4-74 releasing from, 7-32 SetpointItem class, 4-78 sublot SetpointItems class, 4-81 putting in, 6-35,7-32 SetpointTemplate class, 5-144 releasing, 6-35 SetpointTemplates class, 5-149 releasing from, 7-32 StartItem class, 4-84,4-85 Query method StepInputItem class, 4-89 description of, 8-1 StepInputItems class, 4-90 QueryAllDisposition object class, 8-5 StepOutputItem class, 4-95 QueryAllDSTemplate object class, 8-7 StepOutputItems class, 4-97 QueryAllLocation object, 8-9 StepSetpointItem class, 4-100 QueryAllMachine object class, 8-11 StepSetpointItems class, 4-102 QueryAllOperation object class, 8-13 Sublot class, 6-38 QueryAllRoute object, 8-15 Table class, 5-153 QueryAllSetpointTemplate object class, 8-17 TableColumn class, 5-158 QueryCloseLot object class, 8-20 TableColumns class, 5-160 QueryConsumeLot object class, 8-22 Time class, 4-105 QueryDataSetItem object class, 8-24 TimeInterval class, 4-108 QueryDataSetSample object class, 8-26 User class, 5-162 QueryDataSetTimeStamp object class, 8-28 UserCertification class, 5-167 QueryDisposition object class, 8-30 UserCertifications class, 5-171 QueryExpiredMachineTask object class, 8-31 WorkInstructions class, 5-174 QueryInWarningMachineTask object class, 8-33 WorkInstructionsList class, 5-179 QueryLotDataSet object class, 8-36 PurgeDataSet method QueryLotDataSetSample object class, 8-38 Database object class, 3-15 QueryLotDataSetTimeStamp object class, 8-40 PurgeDataTable method QueryLotLocation object class, 8-42 Database object class, 3-16 QueryLotMachine object class, 8-44 PurgeLot method QueryLotMachineQty object class, 8-46 Database object class, 3-17 QueryLotPurgeItem object class, 8-48 PurgeLotByUserQuery method QueryLotSerialNumber object class, 8-51 Database object class, 3-18 QueryLotUndo object class, 8-53 PurgeMachine method QueryLotWorkInstructions object class, 8-55 Database object class, 3-19 QueryMachineDataSet object class, 8-57 PurgeMachineLogs method QueryMachineDataSetSample object class, 8-59 QueryMachineDataSetTimeStamp object class, 8-61 Database object class, 3-20 QueryMachineLot object class, 8-63 PurgeUserLogs method QueryMachinesAtOperation object class, 8-65 Database object class, 3-20 QueryMachineTask object class, 8-67 purging QueryMaterial object class, 8-69 by user query, 3-18 QueryMaterialInput object class, 8-71 data, 3-16 QueryMaterialOutput object class, 8-73 data sets, 3-15,3-17,3-18 QueryMaterialRoute object class, 8-75 datasets, 6-29 QueryMaterialSpec object class, 8-77 logs QueryMergeLot object class, 8-79 base and transaction, 3-15,3-17,3-18,6-29 QueryOperation object class, 8-81 machine, 3-19,3-20 QueryQualifiedUser object class, 8-83 user, 3-20 QueryRouteMaterial object class, 8-85 lots, 3-17,3-18,6-29,7-26 QueryRouteStep object class, 8-87 machine data sets, 3-19 QueryRuntimeConfig object class, 8-88 machine status, 3-19 QuerySQL object class, 8-95 runtime collection data, 3-16 QueryStepSetpoint object class, 8-98 runtime collection logs, 3-15 QuerySubstituteMaterialInput object class, 8-100 putting a lot QueryTypedMachines object class, 8-102 in quarantine, 6-35,7-32 QueryUDA_Name object class, 8-104 on hold, 6-32,7-32 QueryAllDisposition object class putting a sublot methods in quarantine, 6-35,7-32 Query, 8-5 on hold, 6-32,7-32 SetRow, 8-6 properties, 8-5 Q QueryAllDSTemplate object class quarantine methods

I-18 Index

Query, 8-7 querying SetRow, 8-8 data sets properties, 8-7 QueryAllDSTemplate object class, 8-7 QueryAllLocation object class QueryAllSetpointTemplate object class, 8-17 methods QueryDataSetSample object, 8-27 Query, 8-9 QueryDataSetTimeStamp object class, 8-27 SetRow, 8-10 QueryStepSetpoint object class, 8-97 properties, 8-9 database tables, 8-90 QueryAllMachine object class dispositions methods QueryAllDisposition object, 8-5 Query, 8-11 QueryDisposition object class, 8-29 SetRow, 8-12 locations properties, 8-11 QueryAllLocation object class, 8-9 QueryAllOperation object class QueryCloseLot object, 8-19 methods QueryLotLocation object class, 8-41 Query, 8-13 lots SetRow, 8-14 QueryLotPurgeItem object, 8-47 properties, 8-13 QueryMergeLot object class, 8-78 QueryAllRoute object class machines methods QueryAllMachine object, 8-11 Query, 8-15 QueryExpiredMachineTask object class, 8-31 SetRow, 8-16 QueryInWarningMachineTask object class, 8-33 properties, 8-15 QueryLotMachine object, 8-43 QueryAllSetpointTemplate object class QueryLotMachineQty object class, 8-45 methods QueryMachinesAtOperation object class, 8-64 Query, 8-17 QueryMachineTask object class, 8-66 SetRow, 8-18 QueryTypedMachines object class, 8-101 properties, 8-17 materials QueryCloseLot object class QueryLotLocation object, 8-41 QueryMaterial object class, 8-68 methods QueryMaterialInput object, 8-70 Query, 8-20 QueryMaterialOutput object class, 8-72 SetRow, 8-20 QueryMaterialRoute object, 8-74 properties, 8-19 QueryMaterialSpec object class, 8-76 QueryConsumeLot object class QueryRouteMaterial object, 8-84 methods QuerySubstituteMaterialInput object class, 8-99 Query, 8-22 operations SetRow, 8-22 QueryAllOperation object class, 8-13 properties, 8-21 QueryMachinesAtOperation object class, 8-64 QueryDataSetItem object class QueryOperation object class, 8-80 methods routes Query, 8-24 QueryAllRoute object, 8-15 SetRow, 8-24 QueryMaterialRoute object class, 8-74 properties, 8-23 QueryRouteMaterial object class, 8-84 QueryDataSetSample object class QueryRouteStep object class, 8-86 methods runtime configuration Query, 8-26 QueryRuntimeConfig object class, 8-88 SetRow, 8-26 serial numbers properties, 8-25 QueryLotSerialNumber object, 8-50 QueryDataSetTimeStamp object class users methods QueryQualifiedUser object class, 8-82 Query, 8-28 work instructions SetRow, 8-28 QueryLotWorkInstructions object class, 8-54 properties, 8-27 Querying QueryDisposition object class lots methods QueryLotUndo object class, 8-52 Query, 8-30 QueryInWarningMachineTask object class SetRow, 8-30 methods properties, 8-29 Query, 8-33 QueryExpiredMachineTask object class SetRow, 8-34 methods properties, 8-33 Query, 8-31 QueryLotDataSet object class SetRow, 8-32 methods properties, 8-31 Query, 8-36

Index I-19

SetRow, 8-36 QueryMachineLot object class properties, 8-35 methods QueryLotDataSetSample object class Query, 8-63 methods SetRow, 8-63 Query, 8-38 properties, 8-62 SetRow, 8-38 QueryMachinesAtOperation object class properties, 8-37 methods QueryLotDataSetTimeStamp object class Query, 8-65 methods SetRow, 8-65 Query, 8-40 properties, 8-64 SetRow, 8-40 QueryMachineTask object class properties, 8-39 methods QueryLotLocation object class Query, 8-67 methods SetRow, 8-67 Query, 8-42 properties, 8-66 SetRow, 8-42 QueryMaterial object class properties, 8-41 methods QueryLotMachine object class Query, 8-69 methods SetRow, 8-69 Query, 8-44 properties, 8-68 SetRow, 8-44 QueryMaterialInput object class properties, 8-43 methods QueryLotMachineQty object class Query, 8-71 methods SetRow, 8-71 Query, 8-46 properties, 8-70 SetRow, 8-46 QueryMaterialOutput object class properties, 8-45 methods QueryLotPurgeItem object class Query, 8-73 methods SetRow, 8-73 Query, 8-48 properties, 8-72 SetRow, 8-48 QueryMaterialRoute object class UserQuery, 8-49 methods properties, 8-47 Query, 8-75 QueryLotSerialNumber object class SetRow, 8-75 methods properties, 8-74 Query, 8-51 QueryMaterialSpec object class SetRow, 8-51 methods properties, 8-50 Query, 8-77 QueryLotUndo object class SetRow, 8-77 methods properties, 8-76 Query, 8-53 QueryMergeLot object class SetRow, 8-53 methods properties, 8-52 Query, 8-79 QueryLotWorkInstructions object class SetRow, 8-79 methods properties, 8-78 Query, 8-55 QueryOperation object class SetRow, 8-55 methods properties, 8-54 Query, 8-81 QueryMachineDataSet object class SetRow, 8-81 methods properties, 8-80 Query, 8-57 QueryQualifiedUser object class SetRow, 8-57 methods properties, 8-56 Query, 8-83 QueryMachineDataSetSample object class SetRow, 8-83 methods properties, 8-82 Query, 8-59 QueryRouteMaterial object class SetRow, 8-59 methods properties, 8-58 Query, 8-85 QueryMachineDataSetTimeStamp object class SetRow, 8-85 methods properties, 8-84 Query, 8-61 QueryRouteStep object class SetRow, 8-61 methods properties, 8-60 Query, 8-87

I-20 Index

SetRow, 8-87 BOMSubItems class, 4-29 properties, 8-86 ClassificationItems class, 5-14 QueryRuntimeConfig object class CloseItems class, 4-34 methods CompleteItems class, 4-39 Query, 8-88 ConsumableMaterials class, 4-45 SetRow, 8-89 ConsumeItems class, 4-50 properties, 8-88 DataSetItems class, 5-25 QuerySQL object class DataSetTemplates class, 5-38 methods DisassembleItems class, 4-67 ColumnName, 8-92 DispositionCodes class, 5-43 ColumnSize, 8-93 FailureReasons class, 5-45 ColumnType, 8-94 FailureSymptoms class, 5-47 ColumnValue, 8-95 InDataSetItems class, 9-13 Query, 8-95 InDataSetTemplates class, 9-23 SetRow, 8-96 InDispositionCodes class, 9-28 properties, 8-92 InMachines class, 9-43 QueryStepSetpoint object class InRoutePaths class, 9-91 methods InRouteSteps class, 9-95 Query, 8-98 InSetpointItems class, 9-100 SetRow, 8-98 InSetpointTemplates class, 9-108 properties, 8-97 InStepSetpointItems class, 9-112 QuerySubstituteMaterialInput object class InTableColumns class, 9-121 methods InWorkInstructionsList class, 9-127 Query, 8-100 Machines class, 5-69 SetRow, 8-100 MachineTasks class, 5-73 properties, 8-99 Privileges class, 5-117 QueryTypedMachines object class RoutePaths class, 5-134 RouteSteps class, 5-138 methods SecurityGroups class, 5-143 Query, 8-102 SerialNumbers class, 4-77 SetRow, 8-102 SetpointItems class, 4-82 properties, 8-101 SetpointTemplates class, 5-150 QueryUDA_Name object class StartItems class, 4-87 methods StepInputItems class, 4-92 Query, 8-104 StepOutputItems class, 4-99 SetRow, 8-105 StepSetpointItems class, 4-103 properties, 8-103 TableColumns class, 5-161 queued quantity UserCertifications class, 5-172 updating, 6-80 WorkInstructionsList class, 5-180 RemoveRouteAssociation method R InMaterial class, 9-64 ReadRow method Material class, 5-100 InTable class, 9-117 RemoveSerialNumbers method Table class, 5-156 Amount class, 4-6 Receive method Sublot class, 6-77 Sublot class, 6-74 RemoveSubstitutes method receiving BOMItem class, 4-21 inventory, 6-74,7-27 RemoveUserVariable method Refresh method Database object class, 3-21 Selector class, 4-73 removing serial numbers releasing Amount class, 4-6 lots Sublot object class, 6-77 from hold, 6-32,7-32 return codes from quarantine, 7-32 using, 3-10 in quarantine, 6-35 RollbackTrans method sublots Database object class, 3-21 from hold, 6-32 rolling back a transaction, 3-21 from quarantine, 7-32 Route class in quarantine, 6-35 properties, 5-118 on hold, 7-32 Route class methods Remove method AddInputItems, 5-121 ArchiveItems class, 4-16 AddOutputItems, 5-121 BOMItems class, 4-24 AddRoutePaths, 5-122

Index I-21

AddRouteSteps, 5-122 updating, 6-35 AddSetpointItems, 5-123 SecurityGroup class Create, 5-124 properties, 5-139 Delete, 5-125 SecurityGroup class methods DeleteAllInputItems, 5-125 AddPrivileges, 5-140 DeleteAllOutputItems, 5-125 Create, 5-140 DeleteAllSetpointItems, 5-126 Delete, 5-140 DeleteInputItems, 5-126 DeletePrivileges, 5-141 DeleteOutputItems, 5-127 Load, 5-141 DeleteRoutePaths, 5-127 SecurityGroups class DeleteRouteSteps, 5-127 properties, 5-142 DeleteSetpointItems, 5-128 SecurityGroups class methods GetDispMaterialOutput, 5-128 Add, 5-142 GetInfo, 5-129 Clear, 5-143 GetUDAType, 5-129 Item, 5-143 GetUDAValue, 5-129 Remove, 5-143 Load, 5-130 Selector class SetDefaultDispositionCode, 5-130 methods SetInitialRouteStep, 5-130 AttachTo, 4-73 SetUDAValue, 5-131 Refresh, 4-73 route step properties, 4-72 updating, 6-81 selectors RoutePath class attaching to, 4-73 properties, 5-132 filtering, 4-69 RoutePaths class sorting, 4-69 properties, 5-133 serial numbers RoutePaths class methods adding, 4-7,6-40 Add, 5-133 clearing, 4-7,4-75 Clear, 5-134 removing, 4-6,6-77 Item, 5-134 Serialize method Remove, 5-134 Amount class, 4-7 RouteStep class serialized properties, 5-135 description of, 4-4 RouteSteps class SerialNumbers class properties, 5-137 adding serial numbers, 4-75 RouteSteps class methods clearing serial numbers, 4-75 Add, 5-137 methods Clear, 5-137 Add, 4-75 Item, 5-138 Clear, 4-75 Remove, 5-138 IsMember, 4-76 runtime Item, 4-76 logging Remove, 4-77 off, 3-24,7-21 properties, 4-74 on, 3-24,7-20 SetControlType method runtime collection data InMaterial class, 9-65 purging, 3-16 Material class, 5-100 Runtime configuration information SetCustomerSpecification method retrieving, 8-88 Lot class, 6-31 SetDaysHoursMinutesSeconds method S TimeInterval class, 4-111 SaveLotSample method SetDefaultDispositionCode method DataSetSample class, 6-15 InRoute class, 9-88 SaveMachineSample method Route class, 5-130 SetDescription method DataSetSample class, 6-16 SaveRow method InMaterial class, 9-65 Material class, 5-100 InTable object class, 9-118 SetDueDate method Table object class, 5-157 SaveSample method Lot class, 6-32 SetExpirationDate method DataSetSample class, 6-17 SaveUserVariable method Lot class, 6-32 SetHoldFlags method Database object class, 3-22 secondary quantity DataSetItem class, 5-22

I-22 Index

InDataSetItem class, 9-10 Load, 5-148 SetHoldStatus method SetUDA, 5-148 Lot class, 6-32 SetpointTemplates class SetHourMinSec method properties, 5-149 DateTime class, 4-59 SetpointTemplates class methods Time class, 4-107 Add, 5-149 SetInitialRouteStep method Clear, 5-150 InRoute class, 9-88 Item, 5-150 Route class, 5-130 Remove, 5-150 SetItem method SetPriority method DataSetSample class, 6-18 Lot class, 6-34 SetKeyItems method SetQuantity method Sublot class, 6-80 InMaterial class, 9-66 SetLifeTime method Material class, 5-101 InMaterial class, 9-65 SetQuarantineStatus method Material class, 5-101 Lot class, 6-35 SetLimits method SetQueuedAmount method InSetpointItem class, 9-98 Sublot class, 6-80 SetpointItem class, 4-80 SetRanges method SetLocalTime method DataSetItem class, 5-23 Date class, 4-53 InDataSetItem class, 9-11 DateTime class, 4-60 SetRoot method Time class, 4-107 Classification class, 5-7 SetMaterial method SetRouteStep method ConsumableMaterial class, 4-42 Sublot class, 6-81 DisassembleItem class, 4-64 SetRow method Lot class, 6-33 description of, 8-1 SetMonthDayYear method QueryAllDisposition object class, 8-6 Date class, 4-54 QueryAllDSTemplate, 8-8 DateTime class, 4-60 QueryAllLocation object class, 8-10 SetName method QueryAllMachine object, 8-12 Lot class, 6-34 QueryAllOperation object class, 8-14 setpoint QueryAllRoute object class, 8-16 retrieving QueryAllSetpointTemplate object class, 8-18 information about, 8-97 QueryCloseLot object class, 8-20 setpoint template QueryConsumeLot object class, 8-22 retrieving QueryDataSetItem object class, 8-24 information about, 8-17 QueryDataSetSample object class, 8-26 SetpointItem class QueryDataSetTimeStamp object class, 8-28 properties, 4-78 QueryDisposition object class, 8-30 SetpointItem class methods QueryExpiredMachineTask object class, 8-32 QueryInWarningMachineTask object class, 8-34 GetLimits, 4-79 QueryLotDataSet object, 8-36 GetLimitValue, 4-79 QueryLotDataSetSample object class, 8-38 SetLimits, 4-80 QueryLotDataSetTimeStamp object class, 8-40 SetpointItems class QueryLotLocation object class, 8-42 properties, 4-81 QueryLotMachine object class, 8-44 SetpointItems class methods QueryLotMachineQty object class, 8-46 Add, 4-81 QueryLotPurgeItem object class, 8-48 Clear, 4-82 QueryLotSerialNumber object class, 8-51 Item, 4-82 QueryLotUndo object class, 8-53 Remove, 4-82 QueryLotWorkInstructions object class, 8-55 SetpointTemplate class QueryMachineDataSet object class, 8-57 properties, 5-144 QueryMachineDataSetSample object class, 8-59 SetpointTemplate class methods QueryMachineDataSetTimeStamp object class, 8-61 AddSetpointItems, 5-145 QueryMachineLot object class, 8-63 AssociateParent, 5-145 QueryMachinesAtOperation object class, 8-65 Create, 5-146 QueryMachineTask object class, 8-67 Delete, 5-146 QueryMaterial object class, 8-69 DeleteSetpointItems, 5-146 QueryMaterialInput object class, 8-71 DisassociateParent, 5-147 QueryMaterialOutput object class, 8-73 GetUDAType, 5-147 QueryMaterialRoute object class, 8-75 GetUDAValue, 5-148 QueryMaterialSpec object class, 8-77

Index I-23

QueryMergeLot object class, 8-79 completing, 5-56,6-48,6-50,7-9 QueryOperation object class, 8-81 starting, 5-62,6-85,6-86,7-30 QueryQualifiedUser object class, 8-83 Split method QueryRouteMaterial object class, 8-85 Sublot class, 6-83 QueryRouteStep object class, 8-87 splitting QueryRuntimeConfig object class, 8-89 lots, 6-83,7-29 QuerySQL object class, 8-96 sublots, 6-83,7-29 QueryStepSetpoint object class, 8-98 Start method QuerySubstituteMaterialInput object class, 8-100 InMachine class, 9-38 QueryTypedMachines object class, 8-102 Machine class, 5-62 QueryUDA_Name object class, 8-105 Sublot class, 6-85 SetSecondaryAmount method started quantity Lot class, 6-35 updating, 6-81 SetStartedAmount method starting Sublot class, 6-81 machine setting tasks, 5-64,7-31 BackDate, 3-2 sublots Comment, 3-2 multiple, 5-62 DataCollectionLogFlag, 3-2 single, 5-62,6-85,6-86,7-30 SublotKey, 2-4,6-80 StartItem class UDALogFlag, 3-2 properties, 4-84,4-85 UDAs, 3-3 StartItems class SetUDA method methods Database object class, 3-23 Add, 4-86 DataSetTemplate class, 5-36 Clear, 4-86 InDataSetTemplate class, 9-21 Item, 4-86 InSetpointTemplate class, 9-106 Remove, 4-87 Lot class, 6-36 StartOnMachine method SetpointTemplate class, 5-148 Sublot class, 6-86 Sublot class, 6-82 StartRepair method UserCertification class, 5-170 InMachine class, 9-39 SetUDAValue method Machine class, 5-63 Classification class, 5-7 StartTask method ClassificationItem class, 5-12 InMachine class, 9-39 CustomerSpecification class, 5-18 Machine class, 5-64 DispositionCode class, 5-41 StepInputItem class InCustomerSpecification class, 9-6 InDispositionCode class, 9-26 methods InLocation class, 9-31 InitializeFrom, 4-89 InMachine class, 9-38 properties, 4-89 InMachineType class, 9-49 StepInputItems class InMaterial class, 9-66 methods InOperation class, 9-78 Add, 4-91 InRoute class, 9-88 Clear, 4-91 InWorkInstructions class, 9-125 Item, 4-91 Location class, 5-50 Remove, 4-92 Machine class, 5-61 properties, 4-90 MachineType class, 5-79 StepOutputItem class Material class, 5-101 methods Operation class, 5-113 InitializeFrom, 4-96 Route class, 5-131 properties, 4-95 WorkInstructions class, 5-178 StepOutputItems class SetUnitsOfMeasure method methods InMaterial class, 9-66 Add, 4-98 Material class, 5-102 Clear, 4-98 SetWhenIssued method Item, 4-98 UserCertification class, 5-170 Remove, 4-99 Ship method properties, 4-97 Sublot class, 6-82 StepSetpointItem class shipping properties, 4-100 sublots, 6-82,7-28 StepSetpointItem class methods single sublots InitializeFrom, 4-101 closing, 5-54,6-43,6-46,7-5 StepSetpointItems class properties, 4-102

I-24 Index

StepSetpointItems class methods multiple sublots, 5-56 Add, 4-102 single sublots, 5-56,6-48,6-50 Clear, 4-103 sublots Item, 4-103 single, 7-9 Remove, 4-103 creating, 6-26,6-54,7-13 TransferFromTaglist, 4-104 deleting, 7-14 TransferToTaglist, 4-104 getting a completion date, 6-59 stopping merging, 6-70,7-23 machine moving, 6-68,6-72,7-24 repairs, 5-65 shipping, 6-82,7-28 StopRepair method splitting, 6-83,7-29 InMachine class, 9-39 starting Machine class, 5-65 multiple sublots, 5-62 Sublot class single sublots, 5-62,6-85,6-86,7-30 methods SublotKey AddSerialNumbers, 6-40 setting, 2-4,6-80 Assemble, 6-41 updating, 6-80 Close, 6-43 SupersedeLotSample method CloseAllQty, 6-45 DataSetSample class, 6-19 CloseOnMachine, 6-46 SupersedeMachineSample method Comment, 6-47 DataSetSample class, 6-20 Complete, 6-48 SupersedeSample method CompleteOnMachine, 6-50 DataSetSample class, 6-22 Consume, 6-52 ConsumeQty, 6-53 T ConsumeStdQty, 6-53 Create, 6-54 table aliases, 4-69 Disassemble, 6-56 Table class GetAllConsumeItems, 6-58 properties, 5-153 GetCompletionDate, 6-59 Table class methods GetConsumableMaterials, 6-59 Create, 5-154 GetConsumeItems, 6-60 Delete, 5-154 GetConsumeQty, 6-61,6-63 DeleteRow, 5-156 GetOperationInfo, 6-62 Load, 5-154 GetSubstituteConsumeItems, 6-64 Modify, 5-155 GetSubstituteMaterials, 6-64 ReadRow, 5-156 GetUDAType, 6-2,6-66 SaveRow, 5-157 GetUDAValue, 6-67 TableColumn class InProcessMove, 6-68 properties, 5-158 Load, 6-69 TableColumns class Merge, 6-70 properties, 5-160 Move, 6-72 TableColumns class methods Receive, 6-74 Add, 5-160 RemoveSerialNumbers, 6-77 Clear, 5-160 SetKeyItems, 6-80 Item, 5-161 SetQueuedAmount, 6-80 Remove, 5-161 SetRouteStep, 6-81 TakeOffline method SetStartedAmount, 6-81 InMachine class, 9-39 SetUDA, 6-82 Machine class, 5-66 Ship, 6-82 Time class Split, 6-83 methods Start, 6-85 Add, 4-106 StartOnMachine, 6-86 Diff, 4-106 UpdateCompletionDate, 6-88 GetString, 4-106 UpdateConsumptionFlag, 6-89 SetHourMinSec, 4-107 UpdateCriticalRatio, 6-90 SetLocalTime, 4-107 UpdateDataCollectFlag, 6-91 properties, 4-105 properties, 6-38 time stamps sublot(s) retrieving closing associated with a machine, 8-60 an entire sublot, 6-45 associated with a sublot, 8-39 multiple sublots, 5-54 not associated with a sublot, 8-27 single sublots, 5-54,6-43,6-46,7-5 TimeInterval class completing

Index I-25

methods description of, 4-4 Add, 4-109 UpdateCompletionDate method Diff, 4-110 Sublot class, 6-88 GetString, 4-110 UpdateConsumptionFlag method SetDaysHoursMinutesSeconds, 4-111 Sublot class, 6-89 properties, 4-108 UpdateCriticalRatio method TimeSpan method Sublot class, 6-90 Date class, 4-54 UpdateDataCollectFlag method DateTime class, 4-61 Sublot class, 6-91 ToggleDataSetOverride method UpdateDiagnosis method InMaterial class, 9-67 InMachine class, 9-40 Material class, 5-102 Machine class, 5-66 ToggleMachineOverride method UpdateFailureReason method InMaterial class, 9-67 InMachine class, 9-40 Material class, 5-103 Machine class, 5-66 ToggleSetpointTemplateOverride method UpdateFailureSymptom method InMaterial class, 9-68 InMachine class, 9-40 Material class, 5-103 Machine class, 5-67 ToggleWorkInstructionsOverride method UpdateWorkStatus method InMaterial class, 9-68 InMachine class, 9-41 Material class, 5-104 Machine class, 5-67 transaction control methods updating BeginTrans, 3-5 customer specification, 6-31 CommitTrans, 3-8 due date, 6-32 RollbackTrans, 3-21 expiration date, 6-32 transaction set lot name, 6-34 description of, 3-5 machine repairs, 7-34 TransferFromTaglist method material, 6-33 InStepSetpointItems class, 9-113 priority, 6-34 StepSetpointItems class, 4-104 queued quantity, 6-80 TransferFromTagList method route step, 6-81 DataSetSample class, 6-23 secondary quantity, 6-35 transferring serial numbers started quantity, 6-81 from Amount class, 4-6 UDAs, 3-23,6-36,6-82 from SerialNumbers class, 4-7 user certification to Amount class, 4-7 verifying for a specified operation, 8-82 to SerialNumbers class, 4-6 verifying for an operation, 5-165 TransferToTaglist method User class InStepSetpointItems class, 9-113 methods StepSetpointItems class, 4-104 ClockIn, 5-164 TransferToTagList method ClockOut, 5-164 DataSetSample class, 6-24 GetQualificationStatus, 5-165 Type Library, 2-7 properties, 5-162 User class methods U Create, 5-164 Delete, 5-164 UDALogFlag GrantPrivileges, 5-165,5-166 setting, 3-2 Load, 5-165 UDAs user privilege adjusting, 7-4 verifying, 3-6 getting a UDA value, 3-10,3-11,3-13,6-31,6-67 UserCertification class identifying a UDA data type, 3-12,6-2,6-30,6-66 properties, 5-167 setting, 3-3 UserCertification class methods updating, 3-23,6-36,6-82 Create, 5-168 UnArchive method Delete, 5-168 ArchiveItems class, 3-24 GetUDAType, 5-169 Unassemble method GetUDAValue, 5-169 Sublot Object class, 6-87 Load, 5-170 Undo method SetUDA, 5-170 Lot class, 6-36 SetWhenIssued, 5-170 Unserialize method UserCertifications class Amount class, 4-7 properties, 5-171 unserialized UserCertifications class methods

I-26 Index

Add, 5-171 Clear, 5-172 Item, 5-172 Remove, 5-172 User-defined attributes. See UDAs UserLogoff method Database object class, 3-24 UserLogon method Database object class, 3-24 UserQuery method QueryLotPurgeItem object class, 8-49 V viewing read-only properties, 5-1 W work instructions, 5-173,7-19 WorkInstructions class properties, 5-174 WorkInstructions class methods Create, 5-175 Delete, 5-176 GetUDAType, 5-176 GetUDAValue, 5-177 Load, 5-177 SetUDAValue, 5-178 WorkInstructionsList class properties, 5-179 WorkInstructionsList class methods Add, 5-179 Clear, 5-180 Item, 5-180 Remove, 5-180