<?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 Add ModelSurfaceTextureSymbols in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7907069#M82922</link>
    <description>&lt;P&gt;Thanks For your support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i am trying to add the ModelCompositeAnnotation, I Can do that&lt;/P&gt;</description>
    <pubDate>Wed, 04 Apr 2018 10:19:37 GMT</pubDate>
    <dc:creator>SachinRane</dc:creator>
    <dc:date>2018-04-04T10:19:37Z</dc:date>
    <item>
      <title>how to Add ModelSurfaceTextureSymbols</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7887065#M82603</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am Trying to add the Model Annotation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Model annotation I am trying to Add the ModelSurfaceTextureSymbols&amp;nbsp;and LeaderNoteText How to do Create the Defination for the same.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 10:17:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7887065#M82603</guid>
      <dc:creator>SachinRane</dc:creator>
      <dc:date>2018-03-27T10:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add ModelSurfaceTextureSymbols</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7890264#M82664</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/875812"&gt;@SachinRane&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the below VBA code to add ModelSurfaceTextureSymbols and ModelLeaderNote.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()

    Dim doc As PartDocument
    Set doc = ThisApplication.ActiveDocument
    
    Dim oDef As PartComponentDefinition
    Set oDef = doc.ComponentDefinition
    
    Dim oFace As Face
    Set oFace = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Select a face to add leader point")
    
    Dim oAnnotationPlaneDef As AnnotationPlaneDefinition
    Set oAnnotationPlaneDef = oDef.ModelAnnotations.CreateAnnotationPlaneDefinitionUsingPlane(oFace)
    
    ' Set a reference to the TransientGeometry object.
    Dim oTG As TransientGeometry
    Set oTG = ThisApplication.TransientGeometry

    Dim oSurfacePoints As ObjectCollection
    Set oSurfacePoints = ThisApplication.TransientObjects.CreateObjectCollection

    ' Create a few leader points.
    Call oSurfacePoints.Add(oTG.CreatePoint(10, 15, 0))
    
    Dim oIntent As GeometryIntent
    Set oIntent = oDef.CreateGeometryIntent(oFace)
    
    Call oSurfacePoints.Add(oIntent)
    
    Dim oSurfaceTexDef As ModelSurfaceTextureSymbolDefinition
    Set oSurfaceTexDef = oDef.ModelAnnotations.ModelSurfaceTextureSymbols.CreateDefinition(oSurfacePoints, oAnnotationPlaneDef)
    
    Dim oSurfaceTexture As ModelSurfaceTextureSymbol
    Set oSurfaceTexture = oDef.ModelAnnotations.ModelSurfaceTextureSymbols.Add(oSurfaceTexDef)
    
    Dim oLeaderPoints As ObjectCollection
    Set oLeaderPoints = ThisApplication.TransientObjects.CreateObjectCollection

    ' Create a few leader points.
    Call oLeaderPoints.Add(oTG.CreatePoint(5, 10, 0))
    
    Dim oLeaderIntent As GeometryIntent
    Set oLeaderIntent = oDef.CreateGeometryIntent(oFace)
    
    Call oLeaderPoints.Add(oLeaderIntent)
    
    Dim oLeaderDef As ModelLeaderNoteDefinition
    Set oLeaderDef = oDef.ModelAnnotations.ModelLeaderNotes.CreateDefinition(oLeaderPoints, "Sample", oAnnotationPlaneDef)
    
    Dim oLeader As ModelLeaderNote
    Set oLeader = oDef.ModelAnnotations.ModelLeaderNotes.Add(oLeaderDef)
    
End Sub

&lt;/PRE&gt;
&lt;P&gt;On running above code, it prompts for selection of face as shown below.&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="Face_Selection.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/481484i6C326AC74C80BBA0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Face_Selection.png" alt="Face_Selection.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After selection of face, sample ModelSurfaceTextureSymbol and ModelLeaderNote are added at different location as shown below.&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="Result.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/481485iF056E9146A4CF0B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Result.png" alt="Result.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please feel free to contact if there is any queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 10:01:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7890264#M82664</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-03-28T10:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add ModelSurfaceTextureSymbols</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7892887#M82683</link>
      <description>&lt;P&gt;Thanks for your help in Adding ModelSurfaceTextureSymbols, I am trying to add the tolerence Feature using the ModelCompositeAnnotation or the trying to add the ModelFeatureFrame but its giving the Error. Can you Help me out&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 03:55:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7892887#M82683</guid>
      <dc:creator>SachinRane</dc:creator>
      <dc:date>2018-03-29T03:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add ModelSurfaceTextureSymbols</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7896135#M82766</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/875812"&gt;@SachinRane&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below VBA code to add ModelFeatureControlFrame. There must be at least one row in ModelFeatureControlFrame while adding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()

    Dim doc As PartDocument
    Set doc = ThisApplication.ActiveDocument
    
    Dim oDef As PartComponentDefinition
    Set oDef = doc.ComponentDefinition
    
    Dim oFace As Face
    Set oFace = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Select a face to add Model feature control frame")
    
    Dim oAnnotationPlaneDef As AnnotationPlaneDefinition
    Set oAnnotationPlaneDef = oDef.ModelAnnotations.CreateAnnotationPlaneDefinitionUsingPlane(oFace)
    
    ' Set a reference to the TransientGeometry object.
    Dim oTG As TransientGeometry
    Set oTG = ThisApplication.TransientGeometry
    
    Dim oIntent As GeometryIntent
    Set oIntent = oDef.CreateGeometryIntent(oFace)
        
    Dim oPt As Point
    Set oPt = oTG.CreatePoint(12, 15, 0)
    
    Dim oMFCFDef As ModelFeatureControlFrameDefinition
    Set oMFCFDef = oDef.ModelAnnotations.ModelFeatureControlFrames.CreateDefinition(oIntent, oAnnotationPlaneDef, oPt)

    Dim oMFCFRow As ModelFeatureControlFrameRow
    Set oMFCFRow = oMFCFDef.FeatureControlFrameRows.Add(kFlatness, 0.02)
    
    Dim oMFCF As ModelFeatureControlFrame
    Set oMFCF = oDef.ModelAnnotations.ModelFeatureControlFrames.Add(oMFCFDef)
    
    
End Sub
&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 05:46:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7896135#M82766</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-03-30T05:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add ModelSurfaceTextureSymbols</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7907069#M82922</link>
      <description>&lt;P&gt;Thanks For your support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i am trying to add the ModelCompositeAnnotation, I Can do that&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 10:19:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7907069#M82922</guid>
      <dc:creator>SachinRane</dc:creator>
      <dc:date>2018-04-04T10:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add ModelSurfaceTextureSymbols</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7907191#M82923</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/875812"&gt;@SachinRane&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, You can use same ModelFeatureControlFrame to add a ModelCompositeAnnotation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 10:58:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7907191#M82923</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-04-04T10:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add ModelSurfaceTextureSymbols</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7913658#M83022</link>
      <description>&lt;P&gt;I am Trying to Set the Standerd for the ModelSurfaceTexture via API, it is possible in Drafting but how to do the Same for the ModelSurfaceTextureSymbols. Figure 2 is the Required result and Figure 3 is API Result. How I can achive the Same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Figure 1 is need to Set the STD. I want to set the ANSI Std for ModelSurfaceTextureSymbols&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 11:32:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/7913658#M83022</guid>
      <dc:creator>SachinRane</dc:creator>
      <dc:date>2018-04-06T11:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add ModelSurfaceTextureSymbols</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/8250298#M88474</link>
      <description>&lt;P&gt;This has been a very good teaching tool for me.&amp;nbsp; I'm having a particular issue where Inventor will crash when running this method, if a non-planar face is selected.&amp;nbsp; If, say, a cylindrical face is selected&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;oAnnoPlaneDef = oDoc.ModelAnnotations.CreateAnnotationPlaneDefinitionUsingPlane(oFace)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fails&lt;/P&gt;&lt;P&gt;and Inventor crashes.&lt;/P&gt;&lt;P&gt;I have tried instead using&amp;nbsp;kAllPlanarEntities instead, but that similarly failed.&lt;BR /&gt;&lt;BR /&gt;What would be the best route to constrain the user to selecting only valid planar faces, or being able to handle a nonplanar face selection?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;IMPORTANT EDIT&lt;BR /&gt;I'm working in an assembly environment, rather than part.&amp;nbsp; Trying to add ModelLeaderNotes&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 15:47:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-modelsurfacetexturesymbols/m-p/8250298#M88474</guid>
      <dc:creator>josh.nieman</dc:creator>
      <dc:date>2018-09-06T15:47:42Z</dc:date>
    </item>
  </channel>
</rss>

