CGToGH.GH_FileComposer.SaveFile C# (CSharp) Method

SaveFile() public method

public SaveFile ( string savePath ) : void
savePath string
return void
        public void SaveFile(string savePath)
        {
            doc.Save(savePath);
        }

Usage Example

Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("hello!");

            try
            {
                var    path = args[0];
                string dest = path.Replace(Path.GetExtension(path), "_Generated.ghx");
                if (args.Length > 1)
                {
                    dest = args[1];
                }

                CSharpCommonGraph.CommonGraph graphFromFile = DeserializeCG(path);

                Console.WriteLine("now attempting to convert back to a new .gh");

                GH_FileComposer composer = new GH_FileComposer(graphFromFile);
                composer.SaveFile(dest);
                // Console.ReadKey();
            }


            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }