<?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>Thema "Betreff: Casting System.__ComObject" in Inventor - Deutsches Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13249264#M421</link>
    <description>Danke das wars!</description>
    <pubDate>Wed, 08 Jan 2025 09:10:34 GMT</pubDate>
    <dc:creator>georg_troska</dc:creator>
    <dc:date>2025-01-08T09:10:34Z</dc:date>
    <item>
      <title>Casting System.__ComObject</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13245528#M419</link>
      <description>&lt;P&gt;Hallo, ich versuche einen BRep-Zylinder in VB.Net zu erzeugen:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Private Sub CreateCylinder(Pnt1 As Point, Pnt2 As Point, diameter As Double)
        Dim oTBRep = invApp.TransientBRep
        Dim oCylinder As SurfaceBodies
        oCylinder = oTBRep.CreateSolidCylinderCone(Pnt1, Pnt2, diameter, diameter, diameter)
        Dim oBaseFeature As NonParametricBaseFeature
        oBaseFeature = partDef.Features.NonParametricBaseFeature.Add(oCylinder)
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Leider bekomme ich folgenden Lautzeitfehler&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Exception thrown: 'System.InvalidCastException' in WindowsApp4Inventor.exe&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;An exception of type 'System.InvalidCastException' occurred in WindowsApp4Inventor.exe but was not handled in user code&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Das COM-Objekt des Typs "System.__ComObject" kann nicht in den Schnittstellentyp "Inventor.SurfaceBodies" umgewandelt werden. Dieser Vorgang konnte nicht durchgeführt werden, da der QueryInterface-Aufruf an die COM-Komponente für die Schnittstelle mit der IID "{5DF860AE-6B16-11D3-B794-0060B0F159EF}" aufgrund des folgenden Fehlers nicht durchgeführt werden konnte: Schnittstelle nicht unterstützt (Ausnahme von HRESULT: 0x80004002 (E_NOINTERFACE)).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;invApp und parfDef sind folgendermaßen definiert:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim invApp As Inventor.Application
invApp = GetObject(, "Inventor.Application")
Dim partDoc As PartDocument = invApp.ActiveDocument&lt;/LI-CODE&gt;&lt;P&gt;Ich vermute das &lt;A href="https://www.autodesk.com/de/support/technical/article/caas/sfdcarticles/sfdcarticles/DEU/iLogic-Error-Unable-to-cast-COM-object-of-type-System-ComObject-to-interface-type-Inventor-PartDocument.html" target="_blank" rel="noopener"&gt;hier&lt;/A&gt; hilft mir für VB.NET auch nicht weiter, oder?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Vielleicht hatte jemand sowas schonmal?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 15:42:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13245528#M419</guid>
      <dc:creator>georg_troska</dc:creator>
      <dc:date>2025-01-06T15:42:09Z</dc:date>
    </item>
    <item>
      <title>Betreff: Casting System.__ComObject</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13246847#M420</link>
      <description>&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;ich denke du hast dich bei der Deklaration verhauen,&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Das COM-Objekt des Typs "System.__ComObject" kann nicht in den Schnittstellentyp "Inventor.SurfaceBodies" umgewandelt werden&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oCylinder As SurfaceBodies&lt;/LI-CODE&gt;&lt;P&gt;SurfaceBodies ist eine ObjectCollection.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;CreateSolidCylinder&lt;/LI-CODE&gt;&lt;P&gt;gibt einen SurfaceBody zurück.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jeremygoenen_0-1736234084379.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1451788iBB756166B65D86F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jeremygoenen_0-1736234084379.png" alt="jeremygoenen_0-1736234084379.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;die Deklaration muss also so sein&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oCylinder As SurfaceBody&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 07:15:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13246847#M420</guid>
      <dc:creator>jeremy.goenen</dc:creator>
      <dc:date>2025-01-07T07:15:51Z</dc:date>
    </item>
    <item>
      <title>Betreff: Casting System.__ComObject</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13249264#M421</link>
      <description>Danke das wars!</description>
      <pubDate>Wed, 08 Jan 2025 09:10:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13249264#M421</guid>
      <dc:creator>georg_troska</dc:creator>
      <dc:date>2025-01-08T09:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Betreff: Casting System.__ComObject</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13267446#M422</link>
      <description>&lt;P&gt;Hi Georg!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Danke für dein Update und das Markieren der Lösung! Freut uns sehr, dass Jeremy helfen konnte!&lt;BR /&gt;&lt;BR /&gt;Beste Grüße,&lt;BR /&gt;Sara&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ihr fandet einen Beitrag hilfreich? Dann vergebt dafür &lt;STRONG&gt;Likes&lt;/STRONG&gt;!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eure Anfrage wurde erfolgreich gelöst? Dann einfach auf den &lt;STRONG&gt;'Als Lösung akzeptieren&lt;/STRONG&gt;'-Button klicken!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&lt;STRONG&gt;Sara Elsayed&lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&lt;STRONG&gt;Community Manager&lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 14:34:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13267446#M422</guid>
      <dc:creator>sara_elsayed15</dc:creator>
      <dc:date>2025-01-17T14:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Betreff: Casting System.__ComObject</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13267450#M423</link>
      <description>&lt;P&gt;Hi Jeremy,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;vielen Dank fürs Teilen des Lösungsweg!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gruß,&lt;/P&gt;
&lt;P&gt;Sara&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ihr fandet einen Beitrag hilfreich? Dann vergebt dafür &lt;STRONG&gt;Likes&lt;/STRONG&gt;!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eure Anfrage wurde erfolgreich gelöst? Dann einfach auf den &lt;STRONG&gt;'Als Lösung akzeptieren&lt;/STRONG&gt;'-Button klicken!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&lt;STRONG&gt;Sara Elsayed&lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&lt;STRONG&gt;Community Manager&lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 14:35:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/casting-system-comobject/m-p/13267450#M423</guid>
      <dc:creator>sara_elsayed15</dc:creator>
      <dc:date>2025-01-17T14:35:39Z</dc:date>
    </item>
  </channel>
</rss>

