Properties under specific PIUnits will work fine but then under others I will not get any values back. Could there be some sort of corrupt in the module database? I am using an EMDVB interface to create batches in the batch database. I have added some custom properties and alias on top of what the interface is using. In my code I reference those properties when needed. Of course I had no problems in development, but when move onto a clients machine the properties would not always read in properly.
The code below is used to get all of the values which are then used in a short term cache.
For Each piProperty As PIProperty In phaseModule.PIProperties Select Case piProperty.Name Case "MaterialName" phaseData.materialName = piProperty.Value Case "MaterialCode" phaseData.materialCode = piProperty.Value Case "EngUnits" phaseData.engUnits = piProperty.Value End Select Next