public void Main(ref cSapModel SapModel, ref cPluginCallback ISapPlugin)
        {
            model          = SapModel;
            pluginCallback = ISapPlugin;
            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(OnAssemblyResolve);
            try
            {
                cHelper helper      = new Helper();
                var     etabsObject = helper.GetObject("CSI.ETABS.API.ETABSObject");
                model = etabsObject.SapModel;
            }
            catch
            {
                ISapPlugin.Finish(0);
                return;
            }

            try
            {
                OpenOrFocusSpeckle(model);
                SelectionTimer = new Timer(2000)
                {
                    AutoReset = true, Enabled = true
                };
                SelectionTimer.Elapsed += SelectionTimer_Elapsed;
                SelectionTimer.Start();
            }

            catch (Exception e)
            {
                ISapPlugin.Finish(0);
                return;
            }
        }
Beispiel #2
0
        /// <summary>k
        /// plug-in data
        /// </summary>
        /// <param name="Model"></param>
        /// <param name="Isapplugin"></param>
        public void Main(ref cSapModel Model, ref cPluginCallback IsapPlugin)
        {
            try
            {
                var t = new Test1();
                t.Main(ref Model);
            }
            catch (Exception e)
            {
                IsapPlugin.Finish(0);
            }

            IsapPlugin.Finish(0);
        }
Beispiel #3
0
        /// <summary>k
        /// plug-in data
        /// </summary>
        /// <param name="Model"></param>
        /// <param name="Isapplugin"></param>
        public void Main(ref cSapModel Model, ref cPluginCallback IsapPlugin)
        {
            try
            {
                //// do something
                //MessageBox.Show("hello world");

                var t = new Test1();
                t.Main(ref Model);
            }
            catch (Exception e)
            {
                IsapPlugin.Finish(0);
            }

            IsapPlugin.Finish(0);
        }
Beispiel #4
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     // must include a call to finish()
     _Plugin.Finish(0);
 }
Beispiel #5
0
 public void main(ref cSapModel sapModel, ref cPluginCallback pluginCallback)
 {
     MessageBox.Show("ok");
     pluginCallback.Finish(0);
 }