<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: c# Command just-in-time (JIT) with form in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205401#M12779</link>
    <description>&lt;P&gt;Try code of &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/how-to-apply-fillet-to-lwpolyline-with-c/m-p/8962763#M63442" target="_blank"&gt;https://forums.autodesk.com/t5/net/how-to-apply-fillet-to-lwpolyline-with-c/m-p/8962763#M63442&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 16:15:06 GMT</pubDate>
    <dc:creator>Alexander.Rivilis</dc:creator>
    <dc:date>2022-05-31T16:15:06Z</dc:date>
    <item>
      <title>c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11202848#M12770</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;First sorry for the poor Title.&amp;nbsp; Anyway I'm making a Form for AutoCAD in C# So at the beginning I got error by creating polyline in case using Form&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Application does not support Windows Forms just-in-time (JIT)&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So I looked in the form and I found that I should lock the&amp;nbsp;Document and it &lt;FONT size="5" color="#99CC00"&gt;solved the problem&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using (DocumentLock acLckDoc = acDoc.LockDocument())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But after that I had to use&amp;nbsp;&lt;SPAN&gt;ed.Command to perform fillet like this .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; acDoc.Database.Filletrad = 5.0;
 ed.Command("_.fillet", "Polyline", acPoly.ObjectId);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I got this error again but locking the Document didn't help this time&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Application does not support Windows Forms just-in-time (JIT)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;help me plz and thx in advance&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;

namespace AutoNader.Data.Creator
{
    public class PolyLineClass
    {
       
        public static void PolyLineCreate()
        {
            // Get the current document and database
            Document acDoc = Application.DocumentManager.MdiActiveDocument;         
            Database acCurDb = acDoc.Database;
            var ed = acDoc.Editor;
            Polyline acPoly = new Polyline();

            // Lock the new document
            using (DocumentLock acLckDoc = acDoc.LockDocument())
            {
                // Start a transaction
                using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
                {
                    // Open the Block table for read
                    BlockTable acBlkTbl;
                    acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId,
                                                 OpenMode.ForRead) as BlockTable;

                    // Open the Block table record Model space for write
                    BlockTableRecord acBlkTblRec;
                    acBlkTblRec = acTrans.GetObject(acBlkTbl[BlockTableRecord.ModelSpace],
                                                    OpenMode.ForWrite) as BlockTableRecord;

                    // Create a polyline with two segments (3 points)
                   
                    
                    acPoly.SetDatabaseDefaults();
                    acPoly.AddVertexAt(0, new Point2d(0, 0), 0, 0, 0);
                    acPoly.AddVertexAt(1, new Point2d(300, 0), 0, 0, 0);
                    acPoly.AddVertexAt(2, new Point2d(300, 300), 0, 0, 0);
                    acPoly.AddVertexAt(3, new Point2d(0, 300), 0, 0, 0);
                    acPoly.AddVertexAt(4, new Point2d(0, 0), 0, 0, 0);

               

                    // Add the new object to the block table record and the transaction
                    acBlkTblRec.AppendEntity(acPoly);
                    acTrans.AddNewlyCreatedDBObject(acPoly, true);
                 
                    // Save the new object to the database
                    acTrans.Commit();
                    acDoc.Database.Filletrad = 5.0;
                    ed.Command("_.fillet", "Polyline", acPoly.ObjectId);




                }

            }
     
        }
    


    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zK5AV.png" style="width: 487px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1073859i36300692DD4A37E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="zK5AV.png" alt="zK5AV.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private void Button1_Click(object sender, EventArgs e)
        {
            PolyLineClass.PolyLineCreate();     
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;    public class MainClass
    {
        [CommandMethod("AN")]
        public void Main()
        {
            Form1 F1 = new Form1();
            F1.Show();
         // PolyLineClass.PolyLineCreate();
         
        }

    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 15:38:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11202848#M12770</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T15:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11203131#M12771</link>
      <description>&lt;P&gt;You should show more code of yours (e.g. the entire code execution context where the line of code causes error, rather than just the error message, which sometimes does not provide meaningful clue at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, since you mention Form, you need to show how the code is shown in AutoCAD (modal, or modeless), how do you ca;; Editor.Command()....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because you said that locking your document helped you, it implies that your form is modeless. If so, and you call Editor.Command() from a form event (clicking a button, for example), then, that is the issue: Editor.Command can only be called in document context, while a modeless form is in Application context.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are fairly new, you need to know a lot more than very basics in order to know how/when to use modeless form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, show entire chunk of related code, plus necessary descriptions, so that other can better understand what you want to do, and whether you do it correctly or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 20:05:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11203131#M12771</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-05-30T20:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11203710#M12772</link>
      <description>&lt;P&gt;I edit my post and include all the code line 58 59 if I delete&amp;nbsp;&lt;/P&gt;&lt;P&gt;acDoc.Database.Filletrad = 5.0;&lt;BR /&gt;ed.Command("_.fillet", "Polyline", acPoly.ObjectId);&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code work well&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 04:30:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11203710#M12772</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T04:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205012#M12773</link>
      <description>&lt;P&gt;Well, you still not show the code that is related to your issue: how the form is shown: is the form shown as modal or modeless. If it is the latter, that is the source of the problem: you cannot call Editor.Command() from modeless form/ApplicationContext, or from a command method that has CommandFlgas.Session bit set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have to do this from a modeless form, you can use Document.SendTextToExecution(...) to execute an existing command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 13:59:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205012#M12773</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-05-31T13:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205261#M12774</link>
      <description>the form called by MainClass&lt;BR /&gt;public class MainClass&lt;BR /&gt;{&lt;BR /&gt;[CommandMethod("AN")]&lt;BR /&gt;public void Main()&lt;BR /&gt;{&lt;BR /&gt;Form1 F1 = new Form1();&lt;BR /&gt;F1.Show();&lt;BR /&gt;// PolyLineClass.PolyLineCreate();&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}</description>
      <pubDate>Tue, 31 May 2022 15:38:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205261#M12774</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T15:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205311#M12775</link>
      <description>&lt;P&gt;so I should use this&lt;BR /&gt;acDoc.SendStringToExecute("_.fillet", true, false,false);&lt;/P&gt;&lt;P&gt;it worked but i should selects by mouse also choose&amp;nbsp;&lt;SPAN&gt;Polyline and then the object&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 15:50:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205311#M12775</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T15:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205340#M12776</link>
      <description>acDoc.SendStringToExecute("_.fillet ", true, false,true);&lt;BR /&gt;acDoc.SendStringToExecute("Polyline ", true, false, true);&lt;BR /&gt;acDoc.SendStringToExecute("Radius ", true, false, true);&lt;BR /&gt;acDoc.SendStringToExecute("5 ", true, false, true);&lt;BR /&gt;it worked but i can't put the poly line object so it done auto i should selected</description>
      <pubDate>Tue, 31 May 2022 15:57:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205340#M12776</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T15:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205374#M12777</link>
      <description>&lt;P&gt;Command _FILLET waiting not for ObjectId of object but for list of ObjectId of object and point of selection.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 16:07:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205374#M12777</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2022-05-31T16:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205388#M12778</link>
      <description>so are there a way to select by ObjectId ?</description>
      <pubDate>Tue, 31 May 2022 16:11:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205388#M12778</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T16:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205401#M12779</link>
      <description>&lt;P&gt;Try code of &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/how-to-apply-fillet-to-lwpolyline-with-c/m-p/8962763#M63442" target="_blank"&gt;https://forums.autodesk.com/t5/net/how-to-apply-fillet-to-lwpolyline-with-c/m-p/8962763#M63442&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 16:15:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205401#M12779</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2022-05-31T16:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205439#M12780</link>
      <description>&lt;P&gt;You DO NOT show WinForm by calling&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Form.Show()/ShowDialog();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Application.ShowModalDialog()/ShowModelessDialog();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using Application.ShowModelessDialog(), which shows the for in the same way as Form.Show() (which you should not use!), is a very tricky and is a bit advanced topic. The way you show the form in AutoCAD is quite problematic: try to execute your command "AN" multiple time, you would see what I mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 16:28:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205439#M12780</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-05-31T16:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205454#M12781</link>
      <description>thx like this&lt;BR /&gt;Form1 F1 = new Form1();&lt;BR /&gt;Application.ShowModalDialog(null, F1, false);</description>
      <pubDate>Tue, 31 May 2022 16:35:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205454#M12781</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T16:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205459#M12782</link>
      <description>thx it worked with&lt;BR /&gt;acDoc.Database.Filletrad = 5.0;&lt;BR /&gt;ed.Command("_.fillet", "Polyline", acPoly.ObjectId);&lt;BR /&gt;it was the way how to call form i don't have a lot of experience with form if you can send to the right place for autocad form docm</description>
      <pubDate>Tue, 31 May 2022 16:37:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205459#M12782</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T16:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205463#M12783</link>
      <description>&lt;P&gt;If you have to do the work from a modeless form (well, as I said, you need to first understand how modeless form work in AutoCAD. typically, you would want to make it a singleton form in ApplicationContext), you can wrap Edtor.Command() in your own CommandMethod, and then use SendStringToExecute(0 to call your command. Something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// Do your customized fillet work&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[CommandMethod("MyFillet")]&lt;/P&gt;
&lt;P&gt;public static void DoFillet()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; // Create polyline&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; // Call Editor.Command here&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; ed.Command("_.fillet", ......);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; // Or, you can simply show your math skill to calculate&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; // the arc that collect each vetex point of the polyline&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// Show the form&lt;/P&gt;
&lt;P&gt;private static MyForm _form = null;&lt;/P&gt;
&lt;P&gt;[CommandMethod("ShowForm", CommandFlags.Session]&lt;/P&gt;
&lt;P&gt;public static void ShowUI()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If (_form == null)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _form=new MyForm();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Application.ShowModelessDialog(_form);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// Then with a button's click event of the form&lt;/P&gt;
&lt;P&gt;private void Button1_Click(...)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; var doc=Application....MdiActiveDocument;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; doc.SendStringToExecute("MyFillet ", ....);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this give you an idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 16:41:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205463#M12783</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-05-31T16:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: c# Command just-in-time (JIT) with form</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205513#M12784</link>
      <description>Thank you a lot it indeed help thx again</description>
      <pubDate>Tue, 31 May 2022 17:06:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-command-just-in-time-jit-with-form/m-p/11205513#M12784</guid>
      <dc:creator>naderlabbad309</dc:creator>
      <dc:date>2022-05-31T17:06:09Z</dc:date>
    </item>
  </channel>
</rss>

