User (Legacy) Posted January 13, 2004 Report Share Posted January 13, 2004 (precisions of my previous question) Hi I've created a small winform application to test some Map functions. I can now enumerate all the regions(countries), change their color, add values and link etc.. 1- Can I and if Yes how can I save this modified map in a new SVG file ? I tried to export the map (Map1.exportMap(Stream)) - > then I 've serialized the stream to a file for the persistance -> then I try to relad the map with a deserialization of the same file. The map is the same but all the colors and meta data are gone. 2- Is it possible to Save the custom data too ? I tried to export the custom data in XML with the exportformat.XML and it works fine, but when I tried to reload the map with the inverse command Import(exportformat.xml), the program crash with an string error. 3- How can I use the XML Export+Import methods in my programm ? Thanks for help -Vince Link to comment Share on other sites More sharing options...
Software FX Posted January 13, 2004 Report Share Posted January 13, 2004 As I responded to you from my email this is just a copy of what I wrote for others to see. I tested the below code and they run fine for me. Export Algorithiim: // Export Map map.MapSource = "YOURFILE.svg"; Stream streamList = File.Create(@"c:\temp\List.bin"); map.ExportMap(streamList); streamList.Close(); // Using ChartFX TextProvider to set data! There are many ways to set data this is just one way! map.DataSource = new TextProvider(@"YOURDATAFILE.txt"); // Set Data then FileMask and then Export Data map.FileMask |= FileMask.Data | FileMask.Colors | FileMask.Titles; map.Export(FileFormat.Binary, @"c:\temp\data.bin"); // Provide coloring of regions algorithim using PointAttributes, SeriesAttributes, or ConditionalAttributes... Import Algorithim: // Import Map Specfic structure Stream streamList = File.Open(@"c:\temp\List.bin", FileMode.Open); map.ImportMap(streamList); streamList.Close(); // Import the rest of the information as well as the Data map.Import(FileFormat.Binary, @"c:\temp\data.bin"); // Provide coloring of regions algorithim using PointAttributes, SeriesAttributes, or ConditionalAttributes... Above, are two snippets which show you how to successfully export the map into binary files an later import them, say from a client App. Both snippets do require additional algorithims to set the colors on the map!!! And even may require using of the LabelLinks Collection if your data does not exactly match your map region names. -Charles "Vincent RITHNER" <info@vmmlog.com> wrote in message news:xi77XVh2DHA.3808@WEBSERVER1... > (precisions of my previous question) > > Hi > > I've created a small winform application to test some Map functions. > > I can now enumerate all the regions(countries), change their color, add > values and > link etc.. > > 1- Can I and if Yes how can I save this modified map in a new SVG file ? > > I tried to export the map (Map1.exportMap(Stream)) - > then I 've serialized > the stream to a file for the persistance -> then > I try to relad the map with a deserialization of the same file. The map is > the same but all the colors and meta data are gone. > > 2- Is it possible to Save the custom data too ? > > I tried to export the custom data in XML with the exportformat.XML and it > works fine, but when I tried to reload the map with the inverse command > Import(exportformat.xml), the program crash with an string error. > > 3- How can I use the XML Export+Import methods in my programm ? > > > Thanks for help > > -Vince > > Link to comment Share on other sites More sharing options...
Software FX Posted January 13, 2004 Report Share Posted January 13, 2004 As I responded to you from my email this is just a copy of what I wrote for others to see. I tested the below code and they run fine for me. Export Algorithiim: // Export Map map.MapSource = "YOURFILE.svg"; Stream streamList = File.Create(@"c:\temp\List.bin"); map.ExportMap(streamList); streamList.Close(); // Using ChartFX TextProvider to set data! There are many ways to set data this is just one way! map.DataSource = new TextProvider(@"YOURDATAFILE.txt"); // Set Data then FileMask and then Export Data map.FileMask |= FileMask.Data | FileMask.Colors | FileMask.Titles; map.Export(FileFormat.Binary, @"c:\temp\data.bin"); // Provide coloring of regions algorithim using PointAttributes, SeriesAttributes, or ConditionalAttributes... Import Algorithim: // Import Map Specfic structure Stream streamList = File.Open(@"c:\temp\List.bin", FileMode.Open); map.ImportMap(streamList); streamList.Close(); // Import the rest of the information as well as the Data map.Import(FileFormat.Binary, @"c:\temp\data.bin"); // Provide coloring of regions algorithim using PointAttributes, SeriesAttributes, or ConditionalAttributes... Above, are two snippets which show you how to successfully export the map into binary files an later import them, say from a client App. Both snippets do require additional algorithims to set the colors on the map!!! And even may require using of the LabelLinks Collection if your data does not exactly match your map region names. -Charles "Vincent RITHNER" <info@vmmlog.com> wrote in message news:xi77XVh2DHA.3808@WEBSERVER1... > (precisions of my previous question) > > Hi > > I've created a small winform application to test some Map functions. > > I can now enumerate all the regions(countries), change their color, add > values and > link etc.. > > 1- Can I and if Yes how can I save this modified map in a new SVG file ? > > I tried to export the map (Map1.exportMap(Stream)) - > then I 've serialized > the stream to a file for the persistance -> then > I try to relad the map with a deserialization of the same file. The map is > the same but all the colors and meta data are gone. > > 2- Is it possible to Save the custom data too ? > > I tried to export the custom data in XML with the exportformat.XML and it > works fine, but when I tried to reload the map with the inverse command > Import(exportformat.xml), the program crash with an string error. > > 3- How can I use the XML Export+Import methods in my programm ? > > > Thanks for help > > -Vince > > Link to comment Share on other sites More sharing options...
Software FX Posted January 13, 2004 Report Share Posted January 13, 2004 As I responded to you from my email this is just a copy of what I wrote for others to see. I tested the below code and they run fine for me. Export Algorithiim: // Export Map map.MapSource = "YOURFILE.svg"; Stream streamList = File.Create(@"c:\temp\List.bin"); map.ExportMap(streamList); streamList.Close(); // Using ChartFX TextProvider to set data! There are many ways to set data this is just one way! map.DataSource = new TextProvider(@"YOURDATAFILE.txt"); // Set Data then FileMask and then Export Data map.FileMask |= FileMask.Data | FileMask.Colors | FileMask.Titles; map.Export(FileFormat.Binary, @"c:\temp\data.bin"); // Provide coloring of regions algorithim using PointAttributes, SeriesAttributes, or ConditionalAttributes... Import Algorithim: // Import Map Specfic structure Stream streamList = File.Open(@"c:\temp\List.bin", FileMode.Open); map.ImportMap(streamList); streamList.Close(); // Import the rest of the information as well as the Data map.Import(FileFormat.Binary, @"c:\temp\data.bin"); // Provide coloring of regions algorithim using PointAttributes, SeriesAttributes, or ConditionalAttributes... Above, are two snippets which show you how to successfully export the map into binary files an later import them, say from a client App. Both snippets do require additional algorithims to set the colors on the map!!! And even may require using of the LabelLinks Collection if your data does not exactly match your map region names. -Charles "Vincent RITHNER" <info@vmmlog.com> wrote in message news:xi77XVh2DHA.3808@WEBSERVER1... > (precisions of my previous question) > > Hi > > I've created a small winform application to test some Map functions. > > I can now enumerate all the regions(countries), change their color, add > values and > link etc.. > > 1- Can I and if Yes how can I save this modified map in a new SVG file ? > > I tried to export the map (Map1.exportMap(Stream)) - > then I 've serialized > the stream to a file for the persistance -> then > I try to relad the map with a deserialization of the same file. The map is > the same but all the colors and meta data are gone. > > 2- Is it possible to Save the custom data too ? > > I tried to export the custom data in XML with the exportformat.XML and it > works fine, but when I tried to reload the map with the inverse command > Import(exportformat.xml), the program crash with an string error. > > 3- How can I use the XML Export+Import methods in my programm ? > > > Thanks for help > > -Vince > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 10, 2004 Author Report Share Posted February 10, 2004 I tried this using xml format but it didn't work for me. "Software FX Support" <support@softwarefx.com> wrote in message news:DWWOzgi2DHA.3808@WEBSERVER1... > As I responded to you from my email this is just a copy of what I wrote for > others to see. > > I tested the below code and they run fine for me. > Export Algorithiim: > // Export Map > map.MapSource = "YOURFILE.svg"; > Stream streamList = File.Create(@"c:\temp\List.bin"); > map.ExportMap(streamList); > streamList.Close(); > // Using ChartFX TextProvider to set data! There are many ways to set data > this is just one way! > map.DataSource = new TextProvider(@"YOURDATAFILE.txt"); > // Set Data then FileMask and then Export Data > map.FileMask |= FileMask.Data | FileMask.Colors | FileMask.Titles; > map.Export(FileFormat.Binary, @"c:\temp\data.bin"); > // Provide coloring of regions algorithim using PointAttributes, > SeriesAttributes, or ConditionalAttributes... > > > Import Algorithim: > // Import Map Specfic structure > Stream streamList = File.Open(@"c:\temp\List.bin", FileMode.Open); > map.ImportMap(streamList); > streamList.Close(); > // Import the rest of the information as well as the Data > map.Import(FileFormat.Binary, @"c:\temp\data.bin"); > // Provide coloring of regions algorithim using PointAttributes, > SeriesAttributes, or ConditionalAttributes... > > Above, are two snippets which show you how to successfully export the map > into binary files an later import them, say from a client App. Both snippets > do require additional algorithims to set the colors on the map!!! And even > may require using of the LabelLinks Collection if your data does not exactly > match your map region names. > > -Charles > > "Vincent RITHNER" <info@vmmlog.com> wrote in message > news:xi77XVh2DHA.3808@WEBSERVER1... > > (precisions of my previous question) > > > > Hi > > > > I've created a small winform application to test some Map functions. > > > > I can now enumerate all the regions(countries), change their color, add > > values and > > link etc.. > > > > 1- Can I and if Yes how can I save this modified map in a new SVG file ? > > > > I tried to export the map (Map1.exportMap(Stream)) - > then I 've > serialized > > the stream to a file for the persistance -> then > > I try to relad the map with a deserialization of the same file. The map is > > the same but all the colors and meta data are gone. > > > > 2- Is it possible to Save the custom data too ? > > > > I tried to export the custom data in XML with the exportformat.XML and it > > works fine, but when I tried to reload the map with the inverse command > > Import(exportformat.xml), the program crash with an string error. > > > > 3- How can I use the XML Export+Import methods in my programm ? > > > > > > Thanks for help > > > > -Vince > > > > > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 10, 2004 Author Report Share Posted February 10, 2004 I tried this using xml format but it didn't work for me. "Software FX Support" <support@softwarefx.com> wrote in message news:DWWOzgi2DHA.3808@WEBSERVER1... > As I responded to you from my email this is just a copy of what I wrote for > others to see. > > I tested the below code and they run fine for me. > Export Algorithiim: > // Export Map > map.MapSource = "YOURFILE.svg"; > Stream streamList = File.Create(@"c:\temp\List.bin"); > map.ExportMap(streamList); > streamList.Close(); > // Using ChartFX TextProvider to set data! There are many ways to set data > this is just one way! > map.DataSource = new TextProvider(@"YOURDATAFILE.txt"); > // Set Data then FileMask and then Export Data > map.FileMask |= FileMask.Data | FileMask.Colors | FileMask.Titles; > map.Export(FileFormat.Binary, @"c:\temp\data.bin"); > // Provide coloring of regions algorithim using PointAttributes, > SeriesAttributes, or ConditionalAttributes... > > > Import Algorithim: > // Import Map Specfic structure > Stream streamList = File.Open(@"c:\temp\List.bin", FileMode.Open); > map.ImportMap(streamList); > streamList.Close(); > // Import the rest of the information as well as the Data > map.Import(FileFormat.Binary, @"c:\temp\data.bin"); > // Provide coloring of regions algorithim using PointAttributes, > SeriesAttributes, or ConditionalAttributes... > > Above, are two snippets which show you how to successfully export the map > into binary files an later import them, say from a client App. Both snippets > do require additional algorithims to set the colors on the map!!! And even > may require using of the LabelLinks Collection if your data does not exactly > match your map region names. > > -Charles > > "Vincent RITHNER" <info@vmmlog.com> wrote in message > news:xi77XVh2DHA.3808@WEBSERVER1... > > (precisions of my previous question) > > > > Hi > > > > I've created a small winform application to test some Map functions. > > > > I can now enumerate all the regions(countries), change their color, add > > values and > > link etc.. > > > > 1- Can I and if Yes how can I save this modified map in a new SVG file ? > > > > I tried to export the map (Map1.exportMap(Stream)) - > then I 've > serialized > > the stream to a file for the persistance -> then > > I try to relad the map with a deserialization of the same file. The map is > > the same but all the colors and meta data are gone. > > > > 2- Is it possible to Save the custom data too ? > > > > I tried to export the custom data in XML with the exportformat.XML and it > > works fine, but when I tried to reload the map with the inverse command > > Import(exportformat.xml), the program crash with an string error. > > > > 3- How can I use the XML Export+Import methods in my programm ? > > > > > > Thanks for help > > > > -Vince > > > > > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 10, 2004 Author Report Share Posted February 10, 2004 I tried this using xml format but it didn't work for me. "Software FX Support" <support@softwarefx.com> wrote in message news:DWWOzgi2DHA.3808@WEBSERVER1... > As I responded to you from my email this is just a copy of what I wrote for > others to see. > > I tested the below code and they run fine for me. > Export Algorithiim: > // Export Map > map.MapSource = "YOURFILE.svg"; > Stream streamList = File.Create(@"c:\temp\List.bin"); > map.ExportMap(streamList); > streamList.Close(); > // Using ChartFX TextProvider to set data! There are many ways to set data > this is just one way! > map.DataSource = new TextProvider(@"YOURDATAFILE.txt"); > // Set Data then FileMask and then Export Data > map.FileMask |= FileMask.Data | FileMask.Colors | FileMask.Titles; > map.Export(FileFormat.Binary, @"c:\temp\data.bin"); > // Provide coloring of regions algorithim using PointAttributes, > SeriesAttributes, or ConditionalAttributes... > > > Import Algorithim: > // Import Map Specfic structure > Stream streamList = File.Open(@"c:\temp\List.bin", FileMode.Open); > map.ImportMap(streamList); > streamList.Close(); > // Import the rest of the information as well as the Data > map.Import(FileFormat.Binary, @"c:\temp\data.bin"); > // Provide coloring of regions algorithim using PointAttributes, > SeriesAttributes, or ConditionalAttributes... > > Above, are two snippets which show you how to successfully export the map > into binary files an later import them, say from a client App. Both snippets > do require additional algorithims to set the colors on the map!!! And even > may require using of the LabelLinks Collection if your data does not exactly > match your map region names. > > -Charles > > "Vincent RITHNER" <info@vmmlog.com> wrote in message > news:xi77XVh2DHA.3808@WEBSERVER1... > > (precisions of my previous question) > > > > Hi > > > > I've created a small winform application to test some Map functions. > > > > I can now enumerate all the regions(countries), change their color, add > > values and > > link etc.. > > > > 1- Can I and if Yes how can I save this modified map in a new SVG file ? > > > > I tried to export the map (Map1.exportMap(Stream)) - > then I 've > serialized > > the stream to a file for the persistance -> then > > I try to relad the map with a deserialization of the same file. The map is > > the same but all the colors and meta data are gone. > > > > 2- Is it possible to Save the custom data too ? > > > > I tried to export the custom data in XML with the exportformat.XML and it > > works fine, but when I tried to reload the map with the inverse command > > Import(exportformat.xml), the program crash with an string error. > > > > 3- How can I use the XML Export+Import methods in my programm ? > > > > > > Thanks for help > > > > -Vince > > > > > > Link to comment Share on other sites More sharing options...
Software FX Posted February 10, 2004 Report Share Posted February 10, 2004 Using XML Format in the Export ? XML Doesn't export everything, Data for example is not exported. Can you please explain what you are trying to achieve. -- FP Software FX Link to comment Share on other sites More sharing options...
Software FX Posted February 10, 2004 Report Share Posted February 10, 2004 Using XML Format in the Export ? XML Doesn't export everything, Data for example is not exported. Can you please explain what you are trying to achieve. -- FP Software FX Link to comment Share on other sites More sharing options...
Software FX Posted February 10, 2004 Report Share Posted February 10, 2004 Using XML Format in the Export ? XML Doesn't export everything, Data for example is not exported. Can you please explain what you are trying to achieve. -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.