<?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: eTransmit does not bind xRefs in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12801264#M3839</link>
    <description>&lt;P&gt;Thank you for your answer,&amp;nbsp;I just want to replicate that function&amp;nbsp;in the picture;I wonder how autocad is implemented , use eTransmit and Bind Dwg Files&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="94776762-FB10-468a-B935-C5FD9D88E60A.png" style="width: 840px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1368061i4566AD4FF7D2F04F/image-size/large?v=v2&amp;amp;px=999" role="button" title="94776762-FB10-468a-B935-C5FD9D88E60A.png" alt="94776762-FB10-468a-B935-C5FD9D88E60A.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2024 06:11:34 GMT</pubDate>
    <dc:creator>阿黄狗</dc:creator>
    <dc:date>2024-05-28T06:11:34Z</dc:date>
    <item>
      <title>eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12794483#M3833</link>
      <description>&lt;P&gt;&lt;SPAN&gt;With the following code,&amp;nbsp;can not bind xrefs，I don't know why?&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[CommandMethod("TESTETRANSMIT2022")]
public static void ETransmitDwg2022()
{
    TransmittalOperation tro = new TransmittalOperation();
    TransmittalInfo ti = tro.getTransmittalInfoInterface();
    ti.BindType = BindType.eBind;
    ti.depathXrefs = 1;
    ti.destinationRoot = "D:\\TransmittalSet\\";
    ti.saveVersion = SaveDwgFormat.eNoConversion;
    ti.visualFidelity = 1;

    ti.purgeDatabase = 1;
    ti.resetPlotter = 1;

    ti.includeDataLinkFile = 0;
    ti.includeDGNUnderlay = 0;
    ti.includeDWFUnderlay = 0;
    ti.includeFontFile = 0;
    ti.includeImageFile = 0;
    ti.includeMaterialTextureFile = 0;
    ti.includeNestedOverlayXrefDwg = 0;
    ti.includePDFUnderlay = 1;
    ti.includePhotometricWebFile = 0;
    ti.includePlotFile = 0;
    ti.includeUnloadedReferences = 0;
    ti.includeUnloadedXrefDwg = 0;
    ti.includeXrefDwg = 0;

    TransmittalFile tf = null;
    string dwgFile = @"D:\新建文件夹\Drawing2.dwg";
    AddFileReturnVal val = tro.addDrawingFile(dwgFile, out tf);
    tro.createTransmittalPackage();
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="56F00DDE-3A94-412a-889D-79B8373A0922.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1366784i3BD08F8DE25CA0BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="56F00DDE-3A94-412a-889D-79B8373A0922.png" alt="56F00DDE-3A94-412a-889D-79B8373A0922.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 04:00:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12794483#M3833</guid>
      <dc:creator>阿黄狗</dc:creator>
      <dc:date>2024-05-24T04:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12797370#M3834</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;according to&amp;nbsp;&lt;A href="https://help.autodesk.com/view/OARX/2022/ENU/?guid=GUID-F2451270-5CF0-4027-B7EC-D4C00BF27F88" target="_blank" rel="noopener"&gt;IncludeXrefDwg Property (ActiveX/ATO)&lt;/A&gt;&amp;nbsp;Autocad Documents maybe you need to change this line:&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;    ti.includeXrefDwg = 0;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to&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;    ti.includeXrefDwg = 1;&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;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 25 May 2024 14:09:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12797370#M3834</guid>
      <dc:creator>ehsan_bahrani</dc:creator>
      <dc:date>2024-05-25T14:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12799351#M3835</link>
      <description>&lt;P&gt;change the line " ti.includeXrefDwg = 1;"&amp;nbsp; also&amp;nbsp; didn't work ;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="9C37B574-F184-4b34-A3C8-D7B78E7E9C6A.png" style="width: 913px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1367656i71B80E0E63F6CB70/image-size/large?v=v2&amp;amp;px=999" role="button" title="9C37B574-F184-4b34-A3C8-D7B78E7E9C6A.png" alt="9C37B574-F184-4b34-A3C8-D7B78E7E9C6A.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 06:40:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12799351#M3835</guid>
      <dc:creator>阿黄狗</dc:creator>
      <dc:date>2024-05-27T06:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12799971#M3836</link>
      <description>&lt;P&gt;sorry maybe i misunderstand what you want to do.&lt;/P&gt;&lt;P&gt;binding a xRef is complitly different from eTransmit, in other word you have to do this tasks seperately, maybe you need first bind xRef and after that try to eTransmit.&lt;/P&gt;&lt;P&gt;for binding you can use this &lt;A href="https://help.autodesk.com/view/OARX/2022/ENU/?guid=GUID-640D3814-6258-4DCF-8407-FE58B5DB5D9C" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 12:57:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12799971#M3836</guid>
      <dc:creator>ehsan_bahrani</dc:creator>
      <dc:date>2024-05-27T12:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12800944#M3837</link>
      <description>&lt;P&gt;you can use TransmittalAddFileNotificationHandler, or another Transmittal event &amp;nbsp;to preprocess &amp;nbsp;stuff.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 01:20:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12800944#M3837</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2024-05-28T01:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12801239#M3838</link>
      <description>&lt;P&gt;I try it like this,but also not work; the database can not change;&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 AcETransmit;
using AutoCAD;
using Autodesk.AutoCAD.Runtime;

namespace ETransmitDwg2022
{
    internal class MyTransFileNotifier : TransmittalAddFileNotificationHandler
    {
        public void addFileNotificationHandler(TransmittalFile pFile, TransmittalOperation pTransmit)
        {
            if (pFile.database != null)
            {
                AcadDatabase acDb = pFile.database;
                if (acDb != null)
                {
                    foreach (AcadBlock block in acDb.Blocks)
                    {
                        if (block.IsXRef)
                        {
                            block.Bind(true);
                        }
                    }
                }        
            }
        }

        public void beginFilesGraphCreation(TransmittalOperation pTransmit) { }
        public void endFilesGraphCreation(TransmittalOperation pTransmit) { }
    }


    internal class datahandle : TransmittalDatabaseNotificationHandler
    {
        public int preDatabaseProcessing(object pDatabase, TransmittalFile pFile, TransmittalOperation pTransmit)
        {
            if (pDatabase != null)
            {
                AcadDatabase acDb = (AcadDatabase)pDatabase;
                if (acDb != null)
                {
                    foreach (AcadBlock block in acDb.Blocks)
                    {
                        if (block.IsXRef)
                        {
                            block.Bind(true);
                        }
                    }
                }
            }
            return 1;
        }

        public int postDatabaseProcessing(object pDatabase, TransmittalFile pFile, TransmittalOperation pTransmit)
        {
            if (pDatabase != null)
            {
                AcadDatabase acDb = (AcadDatabase)pDatabase;
                if (acDb != null)
                {
                    foreach (AcadBlock block in acDb.Blocks)
                    {
                        if (block.IsXRef)
                        {
                            block.Bind(true);
                        }
                    }
                }
            }
            return 1;
        }

        public int convertDatabase(object pDatabase, TransmittalFile pFile, TransmittalOperation pTransmit)
        {
            if (pDatabase != null)
            {
                AcadDatabase acDb = (AcadDatabase)pDatabase;
                if (acDb != null)
                {
                    foreach (AcadBlock block in acDb.Blocks)
                    {
                        if (block.IsXRef)
                        {
                            block.Bind(true);
                        }
                    }
                }
            }
            return 1;
        }
    }

    public class Class1
    {
        private static MyTransFileNotifier myTransFileNotifier = new MyTransFileNotifier();
        private static datahandle datah = new datahandle();

        [CommandMethod("TESTETRANSMIT2022")]
        public static void ETransmitDwg2022()
        {
            TransmittalOperation tro = new TransmittalOperation();

            tro.subscribeToAddFileNotification(myTransFileNotifier);
            tro.subscribeDatabaseNotification(datah);

            TransmittalInfo ti = tro.getTransmittalInfoInterface();
            ti.BindType = BindType.eBind;
            ti.depathXrefs = 1;
            ti.destinationRoot = "D:\\TransmittalSet\\";
            ti.saveVersion = SaveDwgFormat.eNoConversion;
            ti.visualFidelity = 1;

            ti.purgeDatabase = 1;
            ti.resetPlotter = 1;

            ti.includeDataLinkFile = 0;
            ti.includeDGNUnderlay = 0;
            ti.includeDWFUnderlay = 0;
            ti.includeFontFile = 0;
            ti.includeImageFile = 0;
            ti.includeMaterialTextureFile = 0;
            ti.includeNestedOverlayXrefDwg = 0;
            ti.includePDFUnderlay = 1;
            ti.includePhotometricWebFile = 0;
            ti.includePlotFile = 0;
            ti.includeUnloadedReferences = 0;
            ti.includeUnloadedXrefDwg = 0;
            ti.includeXrefDwg = 1;

            TransmittalFile tf = null;
            string dwgFile = @"D:\00\Drawing2.dwg";
            AddFileReturnVal val = tro.addDrawingFile(dwgFile, out tf);
            tro.createTransmittalPackage();
        }
    }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 May 2024 05:58:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12801239#M3838</guid>
      <dc:creator>阿黄狗</dc:creator>
      <dc:date>2024-05-28T05:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12801264#M3839</link>
      <description>&lt;P&gt;Thank you for your answer,&amp;nbsp;I just want to replicate that function&amp;nbsp;in the picture;I wonder how autocad is implemented , use eTransmit and Bind Dwg Files&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="94776762-FB10-468a-B935-C5FD9D88E60A.png" style="width: 840px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1368061i4566AD4FF7D2F04F/image-size/large?v=v2&amp;amp;px=999" role="button" title="94776762-FB10-468a-B935-C5FD9D88E60A.png" alt="94776762-FB10-468a-B935-C5FD9D88E60A.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 06:11:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12801264#M3839</guid>
      <dc:creator>阿黄狗</dc:creator>
      <dc:date>2024-05-28T06:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12803580#M3840</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, that’s a bummer, wondering if you need to save the drawing so etransmit sees the changes&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 01:06:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12803580#M3840</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2024-05-29T01:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12803762#M3841</link>
      <description>&lt;P&gt;but the&amp;nbsp;&lt;SPAN&gt;NotificationHandler can only get database, the AcadDatabase can not save, only AcadDocument can save; so use database(AcadDatabase ) can not&amp;nbsp;save the drawing;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1313AF37-025B-42cb-B319-D92F29278F55.png" style="width: 910px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1368664i5FD951A8E1679C3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="1313AF37-025B-42cb-B319-D92F29278F55.png" alt="1313AF37-025B-42cb-B319-D92F29278F55.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="E4BDA31B-91D3-4bb2-A2B3-5C869AD94987.png" style="width: 891px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1368665iDADE0FA66FA51092/image-size/large?v=v2&amp;amp;px=999" role="button" title="E4BDA31B-91D3-4bb2-A2B3-5C869AD94987.png" alt="E4BDA31B-91D3-4bb2-A2B3-5C869AD94987.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 03:19:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12803762#M3841</guid>
      <dc:creator>阿黄狗</dc:creator>
      <dc:date>2024-05-29T03:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: eTransmit does not bind xRefs</title>
      <link>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12803872#M3842</link>
      <description>&lt;P&gt;So, somehow you need to get the .NET version of the database, which does have a saveas method.&lt;/P&gt;&lt;P&gt;ARX has a global function acdbActiveDatabaseArray, I don’t know if there’s a .NET equivalent.&lt;/P&gt;&lt;P&gt;Or maybe there’s a way to get a .net instance of the database from COM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 04:43:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/etransmit-does-not-bind-xrefs/m-p/12803872#M3842</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2024-05-29T04:43:49Z</dc:date>
    </item>
  </channel>
</rss>

