<?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 Issue with Drawing Weld Symbol Creation in Inventor 2024 in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/issue-with-drawing-weld-symbol-creation-in-inventor-2024/m-p/12323445#M159329</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to create a Drawing weld symbol of Surfacing weld symbol type in Inventor 2024. I was getting this error&lt;STRONG&gt; (The remote procedure call failed. (Exception from HRESULT: 0x800706BE)) and Inventor is terminated&amp;nbsp;&lt;/STRONG&gt;only&amp;nbsp;for the&amp;nbsp;Surfacing weld&amp;nbsp;symbol type Enum (WeldSymbolTypeEnum.kSurfacingOrCladdingWeldSymbolType). All other types are working fine. Below is the code I am using and attached are the cad files I am using for testing purpose.&lt;BR /&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=WeldSymbolTypeEnum" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=WeldSymbolTypeEnum&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Any help is appreciated.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Threading.Tasks;&lt;BR /&gt;using System.Windows.Forms;&lt;BR /&gt;using Inventor;&lt;BR /&gt;using System.Runtime.InteropServices;&lt;/P&gt;&lt;P&gt;namespace Testcase_Inv2024_WeldSymbol_Creation&lt;BR /&gt;{&lt;BR /&gt;static class Program&lt;BR /&gt;{&lt;BR /&gt;static void Main()&lt;BR /&gt;{&lt;BR /&gt;Inventor.Application oApp = Marshal.GetActiveObject("Inventor.Application") as Inventor.Application;&lt;/P&gt;&lt;P&gt;DrawingDocument drawingDocument = oApp.ActiveDocument as DrawingDocument;&lt;/P&gt;&lt;P&gt;Sheet oActiveSheet = drawingDocument.ActiveSheet;&lt;/P&gt;&lt;P&gt;// Set a reference to the drawing curve segment.&lt;BR /&gt;// Please select a linear drawing curve.&lt;BR /&gt;DrawingCurveSegment oDrawingCurveSegment =&lt;BR /&gt;oApp.CommandManager.Pick(&lt;BR /&gt;SelectionFilterEnum.kDrawingCurveSegmentFilter,&lt;BR /&gt;"Select a linear curve") as DrawingCurveSegment;&lt;/P&gt;&lt;P&gt;// Set a reference to the drawing curve.&lt;BR /&gt;DrawingCurve oDrawingCurve = oDrawingCurveSegment.Parent;&lt;/P&gt;&lt;P&gt;// Get the mid-point of the selected curve&lt;BR /&gt;// assuming that the selection curve is linear.&lt;BR /&gt;Point2d oMidPoint = oDrawingCurve.MidPoint;&lt;/P&gt;&lt;P&gt;// Set a reference to the TransientGeometry object.&lt;BR /&gt;TransientGeometry oTG = oApp.TransientGeometry;&lt;/P&gt;&lt;P&gt;// Create an ObjectCollection for leader points.&lt;BR /&gt;ObjectCollection oLeaderPoints = oApp.TransientObjects.CreateObjectCollection();&lt;/P&gt;&lt;P&gt;// Create a few leader points.&lt;BR /&gt;oLeaderPoints.Add(oTG.CreatePoint2d(oMidPoint.X + 1, oMidPoint.Y + 1));&lt;/P&gt;&lt;P&gt;// Create an intent and add it to the leader points collection.&lt;BR /&gt;// This is the geometry that the symbol will attach to.&lt;BR /&gt;GeometryIntent oGeometryIntent = oActiveSheet.CreateGeometryIntent(oDrawingCurve, oMidPoint);&lt;/P&gt;&lt;P&gt;//oLeaderPoints.Add(oMidPoint);&lt;/P&gt;&lt;P&gt;oLeaderPoints.Add(oGeometryIntent);&lt;/P&gt;&lt;P&gt;// Set a reference to the DrawingWeldingSymbolDefinitions.&lt;BR /&gt;DrawingWeldingSymbolDefinitions oWeldingSymDefs = oActiveSheet.WeldingSymbols.CreateDefinitions();&lt;/P&gt;&lt;P&gt;// Add a welding symbol definition.&lt;BR /&gt;DrawingWeldingSymbolDefinition oWeldingSymDef = oWeldingSymDefs.Add(1);&lt;/P&gt;&lt;P&gt;// Specify the weld symbol type (WeldSymbolTypeEnum/BackingSymbolTypeEnum).&lt;BR /&gt;//oWeldingSymDef.WeldSymbolOne.WeldSymbolType = (int)WeldSymbolTypeEnum.kFilletWeldSymbolType;&lt;BR /&gt;oWeldingSymDef.WeldSymbolOne.WeldSymbolType = (int)WeldSymbolTypeEnum.kSurfacingOrCladdingWeldSymbolType;&lt;/P&gt;&lt;P&gt;oWeldingSymDef.WeldSymbolTwo.WeldSymbolType = (int)WeldSymbolTypeEnum.kNoneWeldSymbolType;&lt;BR /&gt;oWeldingSymDef.ClosedNoteTail = true;&lt;BR /&gt;oWeldingSymDef.TailNote = "2X";&lt;BR /&gt;oWeldingSymDef.AllAroundSymbol = true;&lt;BR /&gt;oWeldingSymDef.FieldWeldingSymbol = true;&lt;/P&gt;&lt;P&gt;// Create the symbol with a leader.&lt;BR /&gt;DrawingWeldingSymbol oSymbol = oActiveSheet.WeldingSymbols.Add(oLeaderPoints, oWeldingSymDefs);&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Mon, 23 Oct 2023 03:24:26 GMT</pubDate>
    <dc:creator>gopinadh7XTGG</dc:creator>
    <dc:date>2023-10-23T03:24:26Z</dc:date>
    <item>
      <title>Issue with Drawing Weld Symbol Creation in Inventor 2024</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/issue-with-drawing-weld-symbol-creation-in-inventor-2024/m-p/12323445#M159329</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to create a Drawing weld symbol of Surfacing weld symbol type in Inventor 2024. I was getting this error&lt;STRONG&gt; (The remote procedure call failed. (Exception from HRESULT: 0x800706BE)) and Inventor is terminated&amp;nbsp;&lt;/STRONG&gt;only&amp;nbsp;for the&amp;nbsp;Surfacing weld&amp;nbsp;symbol type Enum (WeldSymbolTypeEnum.kSurfacingOrCladdingWeldSymbolType). All other types are working fine. Below is the code I am using and attached are the cad files I am using for testing purpose.&lt;BR /&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=WeldSymbolTypeEnum" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=WeldSymbolTypeEnum&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Any help is appreciated.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Threading.Tasks;&lt;BR /&gt;using System.Windows.Forms;&lt;BR /&gt;using Inventor;&lt;BR /&gt;using System.Runtime.InteropServices;&lt;/P&gt;&lt;P&gt;namespace Testcase_Inv2024_WeldSymbol_Creation&lt;BR /&gt;{&lt;BR /&gt;static class Program&lt;BR /&gt;{&lt;BR /&gt;static void Main()&lt;BR /&gt;{&lt;BR /&gt;Inventor.Application oApp = Marshal.GetActiveObject("Inventor.Application") as Inventor.Application;&lt;/P&gt;&lt;P&gt;DrawingDocument drawingDocument = oApp.ActiveDocument as DrawingDocument;&lt;/P&gt;&lt;P&gt;Sheet oActiveSheet = drawingDocument.ActiveSheet;&lt;/P&gt;&lt;P&gt;// Set a reference to the drawing curve segment.&lt;BR /&gt;// Please select a linear drawing curve.&lt;BR /&gt;DrawingCurveSegment oDrawingCurveSegment =&lt;BR /&gt;oApp.CommandManager.Pick(&lt;BR /&gt;SelectionFilterEnum.kDrawingCurveSegmentFilter,&lt;BR /&gt;"Select a linear curve") as DrawingCurveSegment;&lt;/P&gt;&lt;P&gt;// Set a reference to the drawing curve.&lt;BR /&gt;DrawingCurve oDrawingCurve = oDrawingCurveSegment.Parent;&lt;/P&gt;&lt;P&gt;// Get the mid-point of the selected curve&lt;BR /&gt;// assuming that the selection curve is linear.&lt;BR /&gt;Point2d oMidPoint = oDrawingCurve.MidPoint;&lt;/P&gt;&lt;P&gt;// Set a reference to the TransientGeometry object.&lt;BR /&gt;TransientGeometry oTG = oApp.TransientGeometry;&lt;/P&gt;&lt;P&gt;// Create an ObjectCollection for leader points.&lt;BR /&gt;ObjectCollection oLeaderPoints = oApp.TransientObjects.CreateObjectCollection();&lt;/P&gt;&lt;P&gt;// Create a few leader points.&lt;BR /&gt;oLeaderPoints.Add(oTG.CreatePoint2d(oMidPoint.X + 1, oMidPoint.Y + 1));&lt;/P&gt;&lt;P&gt;// Create an intent and add it to the leader points collection.&lt;BR /&gt;// This is the geometry that the symbol will attach to.&lt;BR /&gt;GeometryIntent oGeometryIntent = oActiveSheet.CreateGeometryIntent(oDrawingCurve, oMidPoint);&lt;/P&gt;&lt;P&gt;//oLeaderPoints.Add(oMidPoint);&lt;/P&gt;&lt;P&gt;oLeaderPoints.Add(oGeometryIntent);&lt;/P&gt;&lt;P&gt;// Set a reference to the DrawingWeldingSymbolDefinitions.&lt;BR /&gt;DrawingWeldingSymbolDefinitions oWeldingSymDefs = oActiveSheet.WeldingSymbols.CreateDefinitions();&lt;/P&gt;&lt;P&gt;// Add a welding symbol definition.&lt;BR /&gt;DrawingWeldingSymbolDefinition oWeldingSymDef = oWeldingSymDefs.Add(1);&lt;/P&gt;&lt;P&gt;// Specify the weld symbol type (WeldSymbolTypeEnum/BackingSymbolTypeEnum).&lt;BR /&gt;//oWeldingSymDef.WeldSymbolOne.WeldSymbolType = (int)WeldSymbolTypeEnum.kFilletWeldSymbolType;&lt;BR /&gt;oWeldingSymDef.WeldSymbolOne.WeldSymbolType = (int)WeldSymbolTypeEnum.kSurfacingOrCladdingWeldSymbolType;&lt;/P&gt;&lt;P&gt;oWeldingSymDef.WeldSymbolTwo.WeldSymbolType = (int)WeldSymbolTypeEnum.kNoneWeldSymbolType;&lt;BR /&gt;oWeldingSymDef.ClosedNoteTail = true;&lt;BR /&gt;oWeldingSymDef.TailNote = "2X";&lt;BR /&gt;oWeldingSymDef.AllAroundSymbol = true;&lt;BR /&gt;oWeldingSymDef.FieldWeldingSymbol = true;&lt;/P&gt;&lt;P&gt;// Create the symbol with a leader.&lt;BR /&gt;DrawingWeldingSymbol oSymbol = oActiveSheet.WeldingSymbols.Add(oLeaderPoints, oWeldingSymDefs);&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 03:24:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/issue-with-drawing-weld-symbol-creation-in-inventor-2024/m-p/12323445#M159329</guid>
      <dc:creator>gopinadh7XTGG</dc:creator>
      <dc:date>2023-10-23T03:24:26Z</dc:date>
    </item>
  </channel>
</rss>

