Corel X7 .NET AddOn

Shelbym wrote some nice guides on how to create custom .NET dockers for CorelDRAW x6. There where some changes in X7 described here.

This post is pretty much about putting the above together, so one can quickly start playing with custom tools in X7.

The content of the attached archive is as follows:

  • TestAddOn - a ready to go X7 addon; just coy it to the CorelDRAW Graphics Suite X7\Programs64\Addons and review the Window\Dockers
  • TestAddOnSolution - an extremely simplistic project to give an idea on how to start with the addon customisation
  • TestAddonTemplate - UserUI and AppUI xslts that make orel create Window\Dockers entry and load the custom dll

AddonBase.zip (64.5KB)

OpenLayers.Layer.Panoramio

While working on one of our recent projects we came with an idea (or I should rather say - we eventually managed to spare some time on something not strictly project related ;) that giving some more context to a map should improve the perception of the map data itself:

More...

ExtJs 4 - avoid adding duplicate records

This is quick tip on how to avoid adding duplicate records to data store in ExtJs 4.

In my example I have Ext.grid.Panel which dynamically creates store for itself in constructor method from provided list of fields:

 More...

Export all components of given type from manifold map file

You may sometime need to export all the components of given type so they can be used in another GIS environment. Here goes a script that does exactly this. The example exports all the drawings and tables to either shp or xls:

using Manifold.Interop.Scripts;
using M = Manifold.Interop;

class Script {
	static void Main() {
		//Some setup stuff first
        string exportFld = "H:\\ExportedComponents\\";

        M.Application mApp = Context.Application;
        M.Document mDoc = (M.Document)mApp.ActiveDocument;
        M.ComponentSet mCompSet = mDoc.ComponentSet;

        //Exporters
        M.ExportShp shpExporter = (M.ExportShp)mApp.NewExport("SHP");
        shpExporter.ConvertPolicy = M.ConvertPolicy.ConvertAll;

        M.ExportXls xlsExporter = (M.ExportXls)mApp.NewExport("XLS");
        xlsExporter.ConvertPolicy = M.ConvertPolicy.ConvertAll;

       //iterate through all components
        for (int i = 0; i < mCompSet.Count; i++ )
        {
            mApp.StatusText = "Reading component " + i.ToString() + " of " + mCompSet.Count;

            switch (mCompSet[i].Type)
            {
                case M.ComponentType.ComponentDrawing:

                    shpExporter.Export(mCompSet[i], exportFld + mCompSet[i].Name + shpExporter.DefaultExtension, M.ConvertPrompt.PromptNone);

                    break;

                case M.ComponentType.ComponentTable:

                    xlsExporter.Export(mCompSet[i], exportFld + mCompSet[i].Name + xlsExporter.DefaultExtension, M.ConvertPrompt.PromptNone);
                    break;
            }
        }

        mApp.StatusText = "";
        mApp.MessageBox("Done!", "Info");
	}
}

Upload and save image in a database - ExtJs and ASP.NET

It's been a while since the last post appeared here so this one will be rather longish ;-)

Recently in one of our projects we had a requirement to allow users to upload their images to the database so they can later be viewed by other users of the application.

For the clientside we used the ExtJs framework while the serverside was ASP.NET and c#.

Basically the process can be divided into three parts: image upload on the clientside, image processing on the server side and also image retrieval from the database so it can be displayed again in a browser.

More...