Example #1
0
    static void Main()
    {
        DateTime date = DateTime.Now;

        if (Manifold != null)
        {
            App = Manifold.Application;
        }
        App.OpenLog();
        using (M.Database db = App.GetDatabaseRoot())
        {
            string filedir        = Path.GetDirectoryName(MapFilePath(db));
            string filenamePrefix = Path.GetFileNameWithoutExtension(MapFilePath(db));
            DumpDatabaseCode(db, filedir, filenamePrefix);
            App.Log(String.Format(@"Dumps saved: {0}\{1}.*", filedir, filenamePrefix));
        }
    }
Example #2
0
    [STAThread] // important
    static void Main()
    {
        // Path to ext.dll
        // If path is an empty string, the object will try to use EXT.DLL
        // in the default installation path C:\Program Files\Manifold\v9.0\Bin64
        String extdll = @"";

        using (M.Root root = new M.Root(extdll))
        {
            Script.App = root.Application;
            Console.WriteLine(Script.App.Name);
            String     mapfile        = Path.GetFullPath(@"testmap.map");
            M.Database db             = Script.App.CreateDatabaseForFile(mapfile, true);
            String     filedir        = Path.GetDirectoryName(mapfile);
            String     filenamePrefix = Path.GetFileNameWithoutExtension(mapfile);
            Script.DumpDatabaseCode(db, filedir, filenamePrefix);
        }
    }
Example #3
0
    static List <string> CompNames(M.Database db)
    {
        var names = new List <string>();

        using (M.Table t = db.Search("mfd_root"))
        {
            using (M.Sequence sequence = t.SearchAll(new string[] { "mfd_id", "type", "name" }))
            {
                while (sequence.Fetch())
                {
                    names.Add(
                        sequence.GetValues()[1].Data.ToString()
                        + " " + "[" + sequence.GetValues()[2].Data.ToString() + "]"
                        + " " + sequence.GetValues()[0].Data.ToString()
                        );
                }
            }
        }
        names.Sort();
        return(names);
    }