diff --git a/libEDSsharp/CanOpenEDS.cs b/libEDSsharp/CanOpenEDS.cs index d4be60f6..0532d839 100644 --- a/libEDSsharp/CanOpenEDS.cs +++ b/libEDSsharp/CanOpenEDS.cs @@ -387,7 +387,14 @@ public void Write(StreamWriter writer, InfoSection.Filetype ft, Odtype odt = Odt } writer.WriteLine(string.Format("ObjectType=0x{0:X}", (int)objecttype)); - writer.WriteLine(string.Format(";StorageLocation={0}", prop.CO_storageGroup)); + if (prop.CO_countLabel != "") + { + writer.WriteLine(string.Format(";CountLabel={0}", prop.CO_countLabel)); + } + if (prop.CO_storageGroup != "") + { + writer.WriteLine(string.Format(";StorageLocation={0}", prop.CO_storageGroup)); + } if (objecttype == ObjectType.ARRAY) { @@ -521,9 +528,9 @@ public void Parseline(string linex, int no) } } else - //Only allow our own extensions to populate the key/value pair { - if (key == "StorageLocation" || key == "TPDODetectCos") + //Only allow our own extensions to populate the key/value pair + if (key == "CountLabel" || key == "StorageLocation" || key == "TPDODetectCos") { try { @@ -618,6 +625,11 @@ public void ParseEDSentry(KeyValuePair> kvp) } //Access Type + if (kvp.Value.ContainsKey("CountLabel")) + { + od.prop.CO_countLabel = kvp.Value["CountLabel"]; + } + if (kvp.Value.ContainsKey("StorageLocation")) { od.prop.CO_storageGroup = kvp.Value["StorageLocation"];