Exemplo n.º 1
0
 public bool DisconnectFromDraftSight()
 {
     RemoveUserInterface();
     AppDs.RemoveUserInterface(AddinGUID);
     Log.Stopper();
     AppDs = null;
     return(true);
 }
Exemplo n.º 2
0
        public void Run(DraftSight.Interop.dsAutomation.Application dsApp)
        {
            Document dsDoc = dsApp.GetActiveDocument();

            if (null == dsDoc)
            {
                return;
            }

            Model dsModel = dsDoc.GetModel();

            if (null == dsModel)
            {
                return;
            }

            SketchManager dsSketchManager;

            dsSketchManager = dsModel.GetSketchManager();
            if (null == dsSketchManager)
            {
                return;
            }

            object[] sheetsList = (object[])dsDoc.GetSheets();
            Sheet    dsSheet    = (Sheet)sheetsList[1];

            if (null == dsSheet)
            {
                return;
            }

            ViewManager dsViewManager = dsDoc.GetViewManager();

            if (null == dsViewManager)
            {
                return;
            }

            //-----------------
            Spline spline1;

            {
                spline1 = dsSketchManager.InsertSpline(
                    new double[] { 34.74545454545455, 101.82727272727271, 0.00000000000000, 110.78181818181820, 135.82727272727271, 0.00000000000000, 208.45454545454547, 98.73636363636359, 0.00000000000000, 339.50909090909090, 99.97272727272724, 0.00000000000000 },
                    false,
                    0.00000000000000,
                    0.00000000000000,
                    0.00000000000000,
                    0.00000000000000,
                    0.00000000000000,
                    0.00000000000000);
            }

            Console.WriteLine("It works!");

            //-----------------
        }
Exemplo n.º 3
0
        public bool ConnectToDraftSight(object DsApp, int Cookie)
        {
            Log.Demarrer();

            AppDs = DsApp as DraftSight.Interop.dsAutomation.Application;
            if (AppDs == null)
            {
                return(false);
            }
            CreateUserInterfaceAndCommands();
            return(true);
        }
Exemplo n.º 4
0
 public CmdLog(DraftSight.Interop.dsAutomation.Application app, string groupName) : base(app, groupName)
 {
 }
Exemplo n.º 5
0
 public CmdEffacerGravure(DraftSight.Interop.dsAutomation.Application app, string groupName) : base(app, groupName)
 {
 }
Exemplo n.º 6
0
 public CmdSimplifierSpline(DraftSight.Interop.dsAutomation.Application app, string groupName) : base(app, groupName)
 {
 }
Exemplo n.º 7
0
 public CmdBase(DraftSight.Interop.dsAutomation.Application app, string groupName)
 {
     DsApp = app;
     MathHelper.Init(app.GetMathUtility());
     m_group_name = groupName;
 }