<?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 the command &amp;quot;-etransmit&amp;quot; in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4776131#M45795</link>
    <description>&lt;P&gt;gasty, your solution need interop. it is annoying to do this. I have many PC and system. (XP, Seven 64b).&lt;/P&gt;&lt;P&gt;so it is much better to add FILEDIA in the SendString.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But you have to check if the dwg is saved and not modified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works fine now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank to you 2.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2014 11:25:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-27T11:25:56Z</dc:date>
    <item>
      <title>How to use the command "-etransmit"</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4769597#M45792</link>
      <description>&lt;P&gt;HI.&lt;/P&gt;&lt;P&gt;i want to save my drawing with the xref so i want to launch "-etransmit" here my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  Application.SetSystemVariable("FILEDIA", 0)
                                doc.SendStringToExecute("-etransmit" &amp;amp; vbCr &amp;amp; _
                                                        "CH" &amp;amp; vbCr &amp;amp; _
                                                        "archivage" &amp;amp; vbCr &amp;amp; _
                                                        "C" &amp;amp; vbCr &amp;amp; _
                                                         "" &amp;amp; Txt &amp;amp; "" &amp;amp; vbCr, True, False, True)&lt;/PRE&gt;&lt;P&gt;So the TXT contain my path+filename (.zip)&lt;/P&gt;&lt;P&gt;"archivage" is the config for etransmit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to set to 0 the FILEDIA for force my path+name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it work fine but how i can set to 1 the var ? FILEDIA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the SendStringToExecute is execute after the end of my prog so i cant add the code after this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need to use event ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tryed to use this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'***********************************************************************
    '**  Fonction Lancement d'une commande Synchrone sur la ligne         **
    '**   de commande d'Autocad                                           **
    '***********************************************************************
    '** ENTREE (exemple)                                                  **
    '**   Tracé une ligne :
    '**     CommandeSync("_.line", New Point3d(10.0, 20.0, 0.0), New Point3d(80.0, 50.0, 0.0), "")
    '**   Freeze du calque 0                                              
    '**     CommandeSync("_.vplayer", "_freeze", "0", "_select", "\", "", "")
    '**
    '** Note:
    '**   - an empty string ("") means a validation (Enter)
    '**   - an anti-slash ("\" with VB or "\\" with C#) means a pause for user input.
    '**
    '**   - Texte : Le texte à afficher                                   **
    '***********************************************************************
    '** with A2013, replace "acad.exe" with "accore.dll" in the DllImport attribute arguments.
    '*******************************************************************************************
    &amp;lt;System.Security.SuppressUnmanagedCodeSecurity()&amp;gt; _
        &amp;lt;System.Runtime.InteropServices.DllImport("acad.exe", _
              EntryPoint:="acedCmd", _
              CharSet:=System.Runtime.InteropServices.CharSet.Unicode, _
              CallingConvention:=System.Runtime.InteropServices.CallingConvention.Cdecl)&amp;gt; _
    Private Function acedCmd(ByVal resbuf As IntPtr) As Integer
    End Function

    '''&amp;lt;summary&amp;gt;
    ''' Call an AutoCAD command (runs synchronously).
    ''' &amp;lt;/summary&amp;gt;
    ''' &amp;lt;param name="args"&amp;gt;The command name followed by command inputs.&amp;lt;/param&amp;gt;
    ''' 
    Public Sub LigneCommandeImmediate(ByVal ParamArray args As Object())
        Dim resbuf As New ResultBuffer()
        For Each obj As Object In args
            Select Case obj.GetType().Name
                Case "String"
                    resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.Text), obj))
                    Exit Select
                Case "Int16"
                    resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.Int16), obj))
                    Exit Select
                Case "Int32"
                    resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.Int32), obj))
                    Exit Select
                Case "Double"
                    resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.[Double]), obj))
                    Exit Select
                Case "Point2d"
                    resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.Point2d), obj))
                    Exit Select
                Case "Point3d"
                    resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.Point3d), obj))
                    Exit Select
                Case "ObjectId"
                    resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.ObjectId), obj))
                    Exit Select
                Case "ObjectId[]"
                    For Each id As ObjectId In DirectCast(obj, ObjectId())
                        resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.ObjectId), id))
                    Next
                    Exit Select
                Case "ObjectIdCollection"
                    For Each id As ObjectId In DirectCast(obj, ObjectIdCollection)
                        resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.ObjectId), id))
                    Next
                    Exit Select
                Case "SelectionSetDelayMarshalled", "SelectionSetFullyMarshalled"
                    resbuf.Add(New TypedValue(CInt(Autodesk.AutoCAD.Runtime.LispDataType.SelectionSet), obj))
                    Exit Select
                Case Else
                    Throw New InvalidOperationException("Unsupported type in Command() method")
            End Select
        Next

        acedCmd(resbuf.UnmanagedObject)
    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;but not wotking. i need to execute de etransmit immediately and after set to 1 the FILEDIA. How i can do ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2014 11:37:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4769597#M45792</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-23T11:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the command "-etransmit"</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4773017#M45793</link>
      <description>It wouldn't be my idea of creating a zipped folder containing all referenced data, but maybe you could add filedia to you're command line&lt;BR /&gt;doc.SendStringToExecute("FILEDIA 0 -etransmit" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;"CH" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;"archivage" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;"C" &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;"" &amp;amp; Txt &amp;amp; "" &amp;amp; vbCr &amp;amp; "FILEDIA 1" &amp;amp; vbCr, True, False, True)</description>
      <pubDate>Fri, 24 Jan 2014 17:35:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4773017#M45793</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2014-01-24T17:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the command "-etransmit"</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4773099#M45794</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you see this: &lt;A target="_self" href="http://adndevblog.typepad.com/autocad/2012/06/using-e-transmit-api-in-net-to-find-external-references-in-a-drawing.html"&gt;etransmit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gaston Nunez&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 18:08:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4773099#M45794</guid>
      <dc:creator>hgasty1001</dc:creator>
      <dc:date>2014-01-24T18:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the command "-etransmit"</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4776131#M45795</link>
      <description>&lt;P&gt;gasty, your solution need interop. it is annoying to do this. I have many PC and system. (XP, Seven 64b).&lt;/P&gt;&lt;P&gt;so it is much better to add FILEDIA in the SendString.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But you have to check if the dwg is saved and not modified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works fine now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank to you 2.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2014 11:25:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/4776131#M45795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-27T11:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the command "-etransmit"</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/10308034#M45796</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;That's what exactly I am looking for. But could you please translate this in C#</description>
      <pubDate>Wed, 12 May 2021 12:22:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/10308034#M45796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-12T12:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the command "-etransmit"</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/10309068#M45797</link>
      <description>&lt;P&gt;The other way to solve the issue of original post (i.e. reset "FILEDIA" back to 1 after SendStringToExecute()) is to simply add handler to Document.CommandEnded right before calling "etransmit", something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;private&amp;nbsp;bool doETrans=true; // declare a class level variable as flag, indicating the "etrans" command is from your code&lt;/P&gt;
&lt;P&gt;... ...&lt;/P&gt;
&lt;P&gt;... ...&lt;/P&gt;
&lt;P&gt;Application.SerSystemVariable("FILEDIA", 0);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;doc.CommandEnded+=Handle_EtransCommandEnded;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;doc.SendStringToExecute("-etransmit ", ... ...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;... ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;private void Handle_EtransCommandEnded(object sender, CommandArgs e)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if (e.GlobalCommandName.ToUpper().Contains("ETRANSMIT") &amp;amp;&amp;amp; doETrans)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Application.SerSystemVariable("FILEDIA", 1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; doc.CommandEnded-=Handle_EtransCommandEnded;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 19:03:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/10309068#M45797</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2021-05-12T19:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the command "-etransmit"</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/10309979#M45798</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your response. I want, on the execution of my command "ETRANSMIT" command should be invoked, but should always show the dialog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;using&amp;nbsp;AcAp&amp;nbsp;=&amp;nbsp;Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;AcAp.SetSystemVariable("FILEDIA",&amp;nbsp;1);&lt;BR /&gt;AcAp.DocumentManager.MdiActiveDocument.SendStringToExecute("-ETRANSMIT",&amp;nbsp;false,&amp;nbsp;false,&amp;nbsp;true);&lt;/P&gt;&lt;P&gt;This is the code I am using.... is something wrong happening here. Because whenever I execute this piece of code, I am getting not getting the dialog (shown in attachment)&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="ETRANSMIT.JPG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/918293i7E63633D841C5B58/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ETRANSMIT.JPG" alt="ETRANSMIT.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please help me with this.&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;BR /&gt;Sameer Rathoud&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 07:05:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-the-command-quot-etransmit-quot/m-p/10309979#M45798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-13T07:05:19Z</dc:date>
    </item>
  </channel>
</rss>

