<?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: Is COM API still working and usable? in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13338717#M355</link>
    <description>&lt;P&gt;Well, you just one step/click short of seeing the COM object's properties/methods in the ObjectBrowser: they are exposed as IAeccXXXXX interface:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="normanyuan_0-1740493012004.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1470925i3111512CFC11D28E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="normanyuan_0-1740493012004.png" alt="normanyuan_0-1740493012004.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Also, the video clip below shows the intelli-sense works as expected, as long as the COM interop assemblies are referenced:&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6369300047112w1242h418r296" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6369300047112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6369300047112w1242h418r296');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6369300047112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Feb 2025 14:31:04 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2025-02-25T14:31:04Z</dc:date>
    <item>
      <title>Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13336066#M350</link>
      <description>&lt;P&gt;I've trouble to get the COM API here &lt;A href="https://help.autodesk.com/view/CIV3D/2025/ENU/?guid=GUID-35EF1185-4BBB-422A-A86F-529DF05E2AC5" target="_blank" rel="noopener"&gt;working&lt;/A&gt;. In fact I'm not entirely sure whether the code snippet below still works ( I'm coming from C# background but the code is in VB.Net), and if it does, what are the references that are needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Dim oAcadApp As AcadApplication
Set oAcadApp = ThisDrawing.Application
' Specify the COM name of the object we want to access.
' Note that this always accesses the most recent version
' of Autodesk Civil 3D installed.
Const sCivilAppName = "AeccXUiLand.AeccApplication.6.0"
Dim oCivilApp As AeccApplication
Set oCivilApp = oAcadApp.GetInterfaceObject(sCivilAppName)
 
' Now we can use the AeccApplication object.
' Get the AeccDocument representing the currently
' active drawing.
Dim oDocument As AeccDocument
Set oDocument = oCivilApp.ActiveDocument
' Set the viewport of the current drawing so that all
' drawing elements are visible.
oCivilApp.ZoomExtents&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone can shed some light on this issue, and how I can go by investigating this?&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>Mon, 24 Feb 2025 11:05:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13336066#M350</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2025-02-24T11:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13336482#M351</link>
      <description>&lt;P&gt;Yes, C3D's COM APIs still work. As matter of fact, sometimes, you have to use it because there are no equivalent .NET API counterparts for particular C3D features after all these years of .NET APIs emerged (well, some .NET API features also have no COM API counterparts, of course). So the 2 sets of APIs are complimentary to each other. The most common practice with C3D programming is to always use .NET APIs and only turn to COM API for whatever the .NET APIs lacks (however, it is not to suggest .NET + COM APIs combined would cover most, if not all, C3D features; no, they are from from it).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the custom C3D uses .NET API, the code would generally "C3D version" independent (except where C3D version breaks its compatibilities), so ideally, when COM APIs are user here and there for the .NET API-missing features, it is recommended to use late binding (VB.NET)/dynamic (C#).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to take advantage of VS' intelli-sense of coding and choose early binding, you can add C3D's COM references. C3D installation comes with COM Interop assemblies installed, just as AutoCAD's COM interop assemblies. Go to C3D install folder and looking for DLLs named like "Autodesk.AECC.Interop.XXXXX.dll"s.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A quick critique of the code you posted:&lt;/P&gt;
&lt;PRE class="lia-code-sample line-numbers language-csharp" tabindex="0"&gt;&lt;CODE&gt;Const sCivilAppName = "AeccXUiLand.AeccApplication.6.0"
Dim oCivilApp As AeccApplication
Set oCivilApp = oAcadApp.GetInterfaceObject(sCivilAppName)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the code, "AeccXUiLandxxxxxxxx.6.0" is for very, very old C3D version. You must make sure the C3D version correct. For example, for C3D 2024, it is 13.6, or C3D 2025, it is 13.7. A hint: you can go to "C:\Program Files\Common Files\Autodesk Shared" folder, and look for folder "Civil Engineering 13X" where X is meant for "13.X". C3D has been in its "13.X" version for quite a well, and may stay that way for quite near future. It seems to me Autodesk does not have much interest to improve existing C3D API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another tip when using COM API is needed: most .NET API C3D class has a AcadObject property, which can be used to access the COM object countrerpart, which would save from go through the whole COM API object model to access particular COM API objects (so avoided the call to GetInterfaceObject([COM CLASS ID_NAME]) in many cases. For example, if you want to get ParcelSegment's details, the .NET API's ParcelSegment provides nothing, so you can:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var netParcelSeg=(ParcelSegment)tran.GetObject(....);&lt;/P&gt;
&lt;P&gt;dynamic comPacelSeg = netPacelSeg.AcadObject;&lt;/P&gt;
&lt;P&gt;int elementCount = comParcelSeg.Count&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&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;</description>
      <pubDate>Mon, 24 Feb 2025 14:45:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13336482#M351</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2025-02-24T14:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13337503#M352</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your insightful post! It contains a lot of critical details that the original documentation is missing ( and it makes me shudder to think that &lt;A href="https://forums.autodesk.com/t5/community-announcements/update-on-archiving-idea-boards-and-forums/m-p/13277283#M1129" target="_blank" rel="noopener"&gt;Autodesk want to "archive" AKA delete old forum posts&lt;/A&gt; including gems such as yours here, for whatever reasons; take note &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6082570"&gt;@Tiana_Y&lt;/a&gt;&amp;nbsp;, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3199863"&gt;@Tarek_K&lt;/a&gt;&amp;nbsp;, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/93239"&gt;@ChrisMitchell01&lt;/a&gt;&amp;nbsp; and all).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One comment I have regarding your code example ( which I think is super critical with regards to the discoverability of the API)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var netParcelSeg=(ParcelSegment)tran.GetObject(....);

dynamic comPacelSeg = netPacelSeg.AcadObject;

int elementCount = comParcelSeg.Count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that you are using dynamic keyword, which presupposes that we already know about the methods, fields and properties of the COM object. But exactly how we are supposed to know? There is no intellisense to help&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 01:11:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13337503#M352</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2025-02-25T01:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13337574#M353</link>
      <description>&lt;P&gt;You need to be familiar to the Aecc COM object model, as you do (or if you do) with plain AutoCAD COM object model. For those who haven't do anything with AutoCAD/Aecc COM API coding, you can add COM interop assembly references to the .NET project (thus, early binding), so that you can use Object Browser to explore COM API's interfaces/classes, and you get intelli-sense while coding in VS. Of course the mixed API project should work as long as the COM interop references are correct version (that is, for COM early binding, the code is version dependent). late binding/dynamic is recommended, not mandatory, for better version compatibilities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 02:16:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13337574#M353</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2025-02-25T02:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13338144#M354</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You said that we can use Object Browser to view the classes for the COM, but that's not my experience, see the two screenshots below for Object Browser and Assembly Explorer-- there is no properties or methods or fields that I can get from them.&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="OBject browser.png" style="width: 494px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1470742i6DFEC16B33B230B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="OBject browser.png" alt="OBject browser.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;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="assemblyexplorer.png" style="width: 474px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1470743i2569205257E7C233/image-size/large?v=v2&amp;amp;px=999" role="button" title="assemblyexplorer.png" alt="assemblyexplorer.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no intellisense in VS 2022 also, as shown below-- everything is ComObject, which is quite useless.&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="combject.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1470745i07A1353BDFBF2687/image-size/large?v=v2&amp;amp;px=999" role="button" title="combject.png" alt="combject.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT, I do find another angle of attack, I can see that when debugging, in the Watch Window, there are objects like ActiveDocument, Application, and so on, and therefore I can based on what I see in the Watch Window debugger, and use reflection to just call out the correct members. So it should work right? Alas it doesn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my simple code snippet:&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;       [CommandMethod(nameof(SectionViewBandData))]

       public void SectionViewBandData()
       {
           
           
           var oAcadApp = (AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
           var sCivilAppName = "AeccXUiLand.AeccApplication.13.7";

           var oCivilApp =oAcadApp.GetInterfaceObject(sCivilAppName);
           var activeDocument= oCivilApp.GetType().InvokeMember("ActiveDocument", 
               BindingFlags.InvokeMethod, null, oCivilApp, null);  //here it throws exception

       }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An exception will be thrown when I InvokeMember this way.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 09:57:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13338144#M354</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2025-02-25T09:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13338717#M355</link>
      <description>&lt;P&gt;Well, you just one step/click short of seeing the COM object's properties/methods in the ObjectBrowser: they are exposed as IAeccXXXXX interface:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="normanyuan_0-1740493012004.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1470925i3111512CFC11D28E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="normanyuan_0-1740493012004.png" alt="normanyuan_0-1740493012004.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Also, the video clip below shows the intelli-sense works as expected, as long as the COM interop assemblies are referenced:&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6369300047112w1242h418r682" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6369300047112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6369300047112w1242h418r682');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6369300047112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 14:31:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13338717#M355</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2025-02-25T14:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13339718#M356</link>
      <description>&lt;P&gt;I can verify both points that you raise ( the Object Browser contains members, and some Interop classes have intellisense). But still, for the code snippet below,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[CommandMethod(nameof(SectionViewBandData))]

       public void SectionViewBandData()
       {
           
           
           var oAcadApp = (AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
           var sCivilAppName = "AeccXUiLand.AeccApplication.13.7";

           var oCivilApp =oAcadApp.GetInterfaceObject(sCivilAppName);
           var activeDocument= oCivilApp.GetType().InvokeMember("ActiveDocument", 
               BindingFlags.InvokeMethod, null, oCivilApp, null);  //here it throws exception

       }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a bit unsure how to proceed ( because neither Object Browser nor intellisense gives any hints), you can shed lights?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 01:14:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13339718#M356</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2025-02-26T01:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13339868#M357</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7472042"&gt;@soonhui&lt;/a&gt;&amp;nbsp;&amp;nbsp;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;var activeDocument= oCivilApp.ActiveDocument&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Note that ActiveDocument is a Property, not a Method.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 03:47:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13339868#M357</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2025-02-26T03:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13339931#M358</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt;&amp;nbsp;, thank you for your tips. Though your code can't compile but it gives me hints to figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turns out that to access COM object, you will need to use dynamic keywords. This provided that you know the properties of the COM object, which you can get by either looking at Object Browser, or use the VS debugger and the watch window, like what I mention above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code that I can get to work via the strategy outlined above:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;    [CommandMethod(nameof(SectionViewBandData))]
    public void SectionViewBandData()
    {


        var oAcadApp = (AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
        var sCivilAppName = "AeccXUiLand.AeccApplication.13.7";

        dynamic oCivilApp = oAcadApp.GetInterfaceObject(sCivilAppName);
        dynamic activeDocument = oCivilApp.ActiveDocument;
        dynamic generalCurve = activeDocument.GeneralCurveLabelStyles;
        int count = generalCurve.Count;
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 05:10:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13339931#M358</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2025-02-26T05:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13340857#M359</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;QUOTE&amp;gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;It turns out that to access COM object, you will need to use dynamic keywords.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/QUOTE&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, using "dynamic" is not NEEDED, it is an option between using early binding and late binding. The code you showed in your previous reply:&lt;/P&gt;
&lt;PRE class="lia-code-sample line-numbers language-csharp" tabindex="0"&gt;&lt;CODE&gt;           var oCivilApp =oAcadApp.GetInterfaceObject(sCivilAppName);
           var activeDocument= oCivilApp.GetType().InvokeMember("ActiveDocument", 
               BindingFlags.InvokeMethod, null, oCivilApp, null);  //here it throws exception&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is the old-fashion late binding with C# before "dynamic" keyword is introduced (I recall it was C# 4.0, .NET Framework 3.x?). In the regard of late binding, VB.NET coding was much easier then. Again, coding with late binding, one do not get intelli-sense help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are sure your app is C3D version specific, using early binding makes your coding much easier. But, hey, who wants his/her C3D app only work for single C3D version? That is why late binding is recommended whenever possible, because .NET app itself is rather version-independent mostly, so why mix it with version dependent COM API early binding, just because one can code with intelli-sense help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For COM API beginner, you can added references to COM interops (thus early binding) during the development stage, so you can use the COM objects correctly. When the development is done, or almost is done, and all the COM API calls are tested, you can change the type declaration to "dynamic", remove the COM Interop references, to make an one-time change, so that the COM API calls become late binding. Again, this is only for the COM API beginners to code easier, to learn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 13:09:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13340857#M359</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2025-02-26T13:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13340956#M360</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7472042"&gt;@soonhui&lt;/a&gt;&amp;nbsp;in addition to what&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;is saying, to work with COM and Intellisense you must have the references to the COM Interops in the project. For years I used the following code to initiate the AeccApplication, AeccDocument, and AeccDatabase which does not require to be updated for every release...only the Interop references need be updated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;   /// &amp;lt;summary&amp;gt;
    /// Utility class for accessing Civil-3D COM.
    /// &amp;lt;/summary&amp;gt;
    public sealed class AeccAppConnection
    {
        private AeccApplication aeccApp = null;

        public AeccAppConnection() { }

        public AeccApplication AeccApp
        {
            get
            {
                if (aeccApp == null)
                {
                    aeccApp = new AeccApplication();
                    aeccApp.Init((AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication);
                }
                return aeccApp;
            }
        }

        public AeccDocument AeccDoc
        {
            get
            {
                return (AeccDocument)AeccApp.ActiveDocument;
            }
        }

        public AeccDatabase AeccDb
        {
            get
            {
                return (AeccDatabase)AeccApp.ActiveDocument.Database;
            }
        }
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, once you get the hang of what methods/properties are available you will find that moving to the use of dynamic and removing the Interops makes maintaining the code much easier.&lt;/P&gt;
&lt;P&gt;These are the references you will want to add to the project:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="C3D Interops.png" style="width: 338px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1471623iBBA2F7460B50CA29/image-dimensions/338x261?v=v2" width="338" height="261" role="button" title="C3D Interops.png" alt="C3D Interops.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 13:58:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13340956#M360</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2025-02-26T13:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13342802#M361</link>
      <description>&lt;P&gt;Based on the discussion with&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;as well as my own testing, I've written a full post &lt;A href="https://civilwhiz.com/docs/how-to-get-autocad-com-interop-api-working/" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully it would be of use to everyone.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 10:20:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13342802#M361</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2025-02-27T10:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is COM API still working and usable?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13343567#M362</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7472042"&gt;@soonhui&lt;/a&gt;&amp;nbsp;There are a few other Interops that users should know about when working with Pipes (Gravity) and Corridors (Roadway). There is no COM API for PressurePipes. Those 2 Interops were not in the image I posted previously as that was from a project dealing with only survey and description key objects.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="C3D Interops.png" style="width: 306px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1472136i0DFCACA91FBD6561/image-dimensions/306x211?v=v2" width="306" height="211" role="button" title="C3D Interops.png" alt="C3D Interops.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 17:20:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/is-com-api-still-working-and-usable/m-p/13343567#M362</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2025-02-27T17:20:17Z</dc:date>
    </item>
  </channel>
</rss>

