diff --git a/IntegrationEgaltech/Generator.cs b/IntegrationEgaltech/Generator.cs index 23ef9b5..c3134b1 100644 --- a/IntegrationEgaltech/Generator.cs +++ b/IntegrationEgaltech/Generator.cs @@ -172,16 +172,23 @@ namespace ib.essetre.integration.egaltech bool BtlOk = btlObject.WriteIntoFile( BtlPath, pattInfo.IsFromProject) ; // Se modalità cloud, scrittura del file di punti + bool bErrOnCloud = false ; if ( bCloud) { - using ( var tw = new StreamWriter( Path.ChangeExtension( BtlPath, ".pnt"), false)) { - for ( int j = 0 ; j < pattInfo.Cloud.Count() ; j++) { - double dPosX = - pattInfo.Cloud[j].Y ; - double dPosY = pattInfo.Cloud[j].X ; - string sPosX = dPosX.ToString( "0.00", System.Globalization.CultureInfo.InvariantCulture) ; - string sPosY = dPosY.ToString( "0.00", System.Globalization.CultureInfo.InvariantCulture) ; - tw.WriteLine( sPosX + " " + sPosY) ; + if ( pattInfo.Cloud != null) { + using ( var tw = new StreamWriter( Path.ChangeExtension( BtlPath, ".pnt"), false)) { + for ( int j = 0 ; j < pattInfo.Cloud.Count() ; j++) { + double dPosX = - pattInfo.Cloud[j].Y ; + double dPosY = pattInfo.Cloud[j].X ; + string sPosX = dPosX.ToString( "0.00", System.Globalization.CultureInfo.InvariantCulture) ; + string sPosY = dPosY.ToString( "0.00", System.Globalization.CultureInfo.InvariantCulture) ; + tw.WriteLine( sPosX + " " + sPosY) ; + } } } + else { + BtlOk = false ; + bErrOnCloud = true ; + } } // Se scrittura Btl non riuscita @@ -190,7 +197,7 @@ namespace ib.essetre.integration.egaltech int ErrCutId = ( pattInfo.IsFromProject ? pattInfo.ElementId : pattInfo.PatternId) ; using ( var tw = new StreamWriter( Path.ChangeExtension( BtlPath, ".txt"), false)) { tw.WriteLine( "ERR=10") ; - tw.WriteLine( "BTL without processes") ; + tw.WriteLine( bErrOnCloud ? "Cloud without points" : "BTL without processes") ; tw.WriteLine( "CUTID=" + ErrCutId.ToString()) ; tw.WriteLine( "TASKID=0") ; } diff --git a/IntegrationEgaltech/Properties/AssemblyInfo.cs b/IntegrationEgaltech/Properties/AssemblyInfo.cs index 6cb3f14..d44012e 100644 --- a/IntegrationEgaltech/Properties/AssemblyInfo.cs +++ b/IntegrationEgaltech/Properties/AssemblyInfo.cs @@ -36,5 +36,5 @@ using System.Runtime.InteropServices; // È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build // usando l'asterisco '*' come illustrato di seguito: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.2.7.4")] -[assembly: AssemblyFileVersion("2.2.7.4")] +[assembly: AssemblyVersion("2.2.7.5")] +[assembly: AssemblyFileVersion("2.2.7.5")]