--- xmlTools/trunk/posUpdate/ParametersParser.cs 2013/03/27 16:13:41 750 +++ xmlTools/trunk/posUpdate/ParametersParser.cs 2013/05/09 10:37:17 867 @@ -50,11 +50,11 @@ namespace xmlTools public static void updateChainValues( [Parameter(Required = true, Description = "The new first value of the chain. All the chain will be updated based on this value")] string newValue, [Parameter(Description = "Value which have some kind of relation with -newVal \n Together with -newVal updates all the values based on the" + - "-newVal and another position specified on -valRelation parameter (basically starts with (newVal-valRelation) ) Is especially useful when" + + "-newvalue and another position specified on -valrelation parameter (basically starts with (newvalue-valrelation) ) Is especially useful when" + "updating multiple related chains (on different files), like multiple objects from one position to another. Don't use with -filename, because" + - "it will only update one file. \nExample: xmlTools.exe -newVal \"1 1 1\" -valRelation \"4 4 4\" -valElement Translation -valParentElement" + + "it will only update one file. \nExample: xmlTools.exe updatechainvalues -filename:OBANheli_body_center.xml -newvalue:\"1 1 1\" -valrelation:\"4 4 4\" -element:Translation -parelement:" + "OBANKeyFrame")] string valRelation, - [Parameter(Description = "Only update specific positions. Positions starts with 0, separted multiple positions with space. Example: valPositions=0 1 4")] [MoreThan(-1)] string valPositions + [Parameter(Description = "Only update specific positions. Positions starts with 0, separted multiple positions with space. Example: valpositions=\"0 1 4\"")] [MoreThan(-1)] string valPositions ) { initialChecks(); @@ -106,7 +106,7 @@ namespace xmlTools List filesToProcess = getFilesToProcess(globalFileName); foreach (string currentFile in filesToProcess) { - if (valPositions != null) + if (!String.IsNullOrEmpty(valPositions)) { myTools.replaceAll(currentFile, value, valPositions); } @@ -129,7 +129,7 @@ namespace xmlTools { XmlPatch myPatch; - if (forceInFiles != "") + if (!String.IsNullOrEmpty(forceInFiles)) { myPatch = new XmlPatch(globalFileName, forceInFiles, globalNoBackups); } @@ -195,7 +195,7 @@ namespace xmlTools { List filesToProccess = new List(); - if (filename == "") // No filename? Process everything xml file found. + if (String.IsNullOrEmpty(filename)) // No filename? Process everything xml file found. { List allXmlFiles = Util.getAllXmlFiles(); foreach (String file in allXmlFiles)