<?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: How to use a Copy Jig for an Entity Array in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-use-a-copy-jig-for-an-entity-array/m-p/7825732#M27038</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Out of respect for those to whom you are asking for help, you should show a readable code, cleaned of any unnecessary lines commented on, but which contains all the information that might be useful.&lt;BR /&gt;By the way, always out of respect, you could make a feedback when someone tried to help you.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Mar 2018 15:37:21 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2018-03-04T15:37:21Z</dc:date>
    <item>
      <title>How to use a Copy Jig for an Entity Array</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-a-copy-jig-for-an-entity-array/m-p/7825614#M27037</link>
      <description>&lt;P&gt;I am able to populate&amp;nbsp;dataGridView1&amp;nbsp; with an attribute list.&lt;/P&gt;&lt;P&gt;I am attempting to pass that from the column 3 of&amp;nbsp;&lt;SPAN&gt;dataGridView1&amp;nbsp; back to mycommands class without luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Code attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;  //****Located in form1****
        private void button4_Click(object sender, EventArgs e)
        {
            MyCommands ObjCommands = new MyCommands();
            gridarray();
            var doc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument;
            if (doc != null)
            {
                //doc.SendStringToExecute("THWU", true, false, false);
                doc.SendStringToExecute("TEST1\n", false, false, false);
            }
            // Command Send End
            
        }
 
        public void gridarray() 
           {
            MyCommands ObjCommands = new MyCommands();
            //string[] column0Array = new string[dataGridView1.Rows.Count];
            column1Array = new string[dataGridView1.Rows.Count];
            column2Array = new string[dataGridView1.Rows.Count];
            
            int i = 0;
            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                //column0Array[i] = row.Cells[0].Value != null ? row.Cells[0].Value.ToString() : string.Empty;
                column1Array[i] = row.Cells[1].Value != null ? row.Cells[1].Value.ToString() : string.Empty;
                column2Array[i] = row.Cells[2].Value != null ? row.Cells[2].Value.ToString() : string.Empty;
                i++;
            }
            System.Windows.Forms.MessageBox.Show("grid xy");  
           // foreach (string MsgName in column2Array)
           //{

           // System.Windows.Forms.MessageBox.Show(MsgName);
          // }
            ObjCommands.column2Array = column2Array;
        }
 
 //****Located in My Commands Class****  
        [CommandMethod("TEST1")]
        public void ListTest()
       //Commands AcadCommands = new MyCommands();
        //Form1 objForm1 = new Form1();
        
        {
            PickBlock();
            Form1 ObjForm1 = new Form1();
          // column2Array = column2Array;
            column2Array = ObjForm1.column2Array;
            System.Windows.Forms.MessageBox.Show("here");   
            foreach (string MsgName in column2Array)
            {

                System.Windows.Forms.MessageBox.Show(MsgName);
            }

            System.Windows.Forms.MessageBox.Show("xxx");   
             //string[] AttStringChglist;
            //AttStringChglist = ObjForm1.column2Array;
            //AttStringChglist = ObjForm1.column2Array;
            }//End list test &lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I think should be see the array members in that foreach member box in mycommands but that is not the case&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is the solution to this?.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Image of form1 is showen&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/470583iFCB922605F8DAF13/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Mar 2018 13:04:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-a-copy-jig-for-an-entity-array/m-p/7825614#M27037</guid>
      <dc:creator>muckmailer</dc:creator>
      <dc:date>2018-03-04T13:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a Copy Jig for an Entity Array</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-a-copy-jig-for-an-entity-array/m-p/7825732#M27038</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Out of respect for those to whom you are asking for help, you should show a readable code, cleaned of any unnecessary lines commented on, but which contains all the information that might be useful.&lt;BR /&gt;By the way, always out of respect, you could make a feedback when someone tried to help you.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Mar 2018 15:37:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-a-copy-jig-for-an-entity-array/m-p/7825732#M27038</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-03-04T15:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a Copy Jig for an Entity Array</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-a-copy-jig-for-an-entity-array/m-p/7825790#M27039</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/545222"&gt;@muckmailer&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;I am able to populate&amp;nbsp;dataGridView1&amp;nbsp; with an attribute list.&lt;/P&gt;&lt;P&gt;I am attempting to pass that from the column 3 of&amp;nbsp;&lt;SPAN&gt;dataGridView1&amp;nbsp; back to mycommands class without luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Code attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I think should be see the array members in that foreach member box in mycommands but that is not the case&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is the solution to this?.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My suggestion would be to visit the &lt;A href="https://www.microsoft.com/net/learn/get-started/windows" target="_blank"&gt;learning resources&lt;/A&gt; Microsoft has on the web, to learn how to properly use a DataGridView, because you're not doing it correctly and that's what making your problem even more difficult.&amp;nbsp;&lt;/SPAN&gt;You also seem to be lacking a basic understanding of what classes and instances of classes are, and that is also&amp;nbsp;making things more difficult.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Mar 2018 16:25:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-a-copy-jig-for-an-entity-array/m-p/7825790#M27039</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-03-04T16:25:16Z</dc:date>
    </item>
  </channel>
</rss>

