3 Replies Latest reply on Nov 23, 2018 6:33 AM by fs@ctsGmbH

    PI SDK is it possible to search PIUnitBatches by Unit Name

    fs@ctsGmbH

      Hi everyone,

       

      I have some trouble to find some a methode to search PIUnitBatches by Unit Name.

       

      I am using the PIUnitBatchSearch Methode like this:

       

                        string sModuleNameMask = IsNullorEmpty((string)jDataObject["farg"]["ModuleNameMask"]); // PIModule name to match. Defaults to “*”.
                        string sBatchIDMask = IsNullorEmpty((string)jDataObject["farg"]["BatchIDMask"]); // BatchID to match. Defaults to “*”.
                        string sProductMask = IsNullorEmpty((string)jDataObject["farg"]["ProductMask"]); // Product to match. Defaults to “*”.
                        string sProcedureMask = IsNullorEmpty((string)jDataObject["farg"]["ProcedureMask"]);// ProcedureName to match. Defaults to  “*”.
                        string sSubBatchMask = IsNullorEmpty((string)jDataObject["farg"]["SubBatchMask"]); // SubBatch name to match Defaults to  “*”.
                        PISDKCommon.PIAsynchStatus piAsynchStatus = null; // Optional asynchronous status object(PIAsyncStatus). Default Null
                        string siUnitBatchUniqueID = IsNullorEmpty((string)jDataObject["farg"]["UnitBatchUniqueID"]);// Optional unique id of PIUnitBatch find specific unit batch.
                        string siModuleUniqueID = IsNullorEmpty((string)jDataObject["farg"]["ModuleUniqueID"]); // Optional unique id of PIModule. Used to find unit batches created on a  specific module
      
                        pIUnitBatchList = CurrentpIServer.PIModuleDB.PIUnitBatchSearch(pTimeSearchStart, pTimeSearchEnd, sModuleNameMask, sBatchIDMask, sProductMask, sProcedureMask, sSubBatchMask, piAsynchStatus, siUnitBatchUniqueID, siModuleUniqueID);              
      
      
      
      
      

       

      Is there any way to Filter by Unit Name or is the only posibility to search between Start -> Endtime and after this Search Filter by Unit Name?

       

       

      Thanks all,

      Flo