示例#1
0
        /// <summary>
        /// Export to dwg with filter "Для печати" and scheme "SIA DWG"
        /// </summary>
        private void ExportToDwg()
        {
            // Scheme of marking export
            string exportType = "DWGPROJECT";
            //string exportScheme = "SIA";
            string exportPath = @"d:\Work\DWG\";
            // Action
            string strAction = "export";

            // Export a project in DXF / DWG format
            ActionManager oAMnr = new ActionManager();

            Eplan.EplApi.ApplicationFramework.Action oAction = oAMnr.FindAction(strAction);
            if (oAction != null)
            {
                // Action properties
                ActionCallingContext ctx = new ActionCallingContext();

                ctx.AddParameter("TYPE", exportType);
                // ctx.AddParameter("EXPORTSCHEME", exportScheme);
                ctx.AddParameter("DESTINATIONPATH", exportPath);
                //ctx.AddParameter("USEPAGEFILTER", "1");

                bool bRet = oAction.Execute(ctx);
                if (bRet == false)
                {
                    DoWireMarking.DoWireMarking.MassageHandler("Error in Action - ExportToDwg");

                    DoWireMarking.DoWireMarking.MassageHandler(ctx.ToString());
                    DoWireMarking.DoWireMarking.MassageHandler(ctx.GetParameters().ToString());
                    DoWireMarking.DoWireMarking.MassageHandler(ctx.GetStrings().ToString());
                }
            }
        }