<?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: Embossed text with iLogic in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5516386#M120180</link>
    <description>&lt;P&gt;Hallo Rossano,&lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;From this point to the end I have almost already done.&lt;BR /&gt;My problem is to automatically create embossed text on a specific part plan with iLogic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I&lt;STRONG&gt;dentify the plan of a part&amp;nbsp;(By Picking with one Dialog)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2) &lt;STRONG&gt;On this plan&amp;nbsp;automatically create embossed text&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3) From here to the end it´s almost already made.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and have a nice time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ragards,&lt;/P&gt;&lt;P&gt;Claudio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Feb 2015 07:39:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-02-23T07:39:26Z</dc:date>
    <item>
      <title>Embossed text with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5511400#M120178</link>
      <description>&lt;P&gt;Hello everybody,&lt;BR /&gt;I would like to place an embossed text on a part&amp;nbsp;plane&amp;nbsp;with iLogic.&lt;BR /&gt;The text should be in the middle of the size of the sheet, and scalable depending of the sheet´s size .&lt;BR /&gt;I want to export the plan development&amp;nbsp;as dxf (and I've already made with iLogic). In the appendix two photos of help.&lt;BR /&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Have a nice time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Claudio&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 16:07:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5511400#M120178</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T16:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Embossed text with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5515617#M120179</link>
      <description>&lt;P&gt;Hi, the attached .ipt is a good start for your request, I&amp;nbsp;suggest you to create a template like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bregs&lt;/P&gt;&lt;P&gt;Rossano Praderi&lt;/P&gt;</description>
      <pubDate>Sat, 21 Feb 2015 16:29:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5515617#M120179</guid>
      <dc:creator>rossano_praderi</dc:creator>
      <dc:date>2015-02-21T16:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Embossed text with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5516386#M120180</link>
      <description>&lt;P&gt;Hallo Rossano,&lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;From this point to the end I have almost already done.&lt;BR /&gt;My problem is to automatically create embossed text on a specific part plan with iLogic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I&lt;STRONG&gt;dentify the plan of a part&amp;nbsp;(By Picking with one Dialog)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2) &lt;STRONG&gt;On this plan&amp;nbsp;automatically create embossed text&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3) From here to the end it´s almost already made.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and have a nice time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ragards,&lt;/P&gt;&lt;P&gt;Claudio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 07:39:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5516386#M120180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-23T07:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Embossed text with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5520670#M120181</link>
      <description>&lt;P&gt;Hi Claudio,&lt;/P&gt;&lt;P&gt;the follow VBA code is a mixture of examples from the Inventor API help, has to be personalized and improved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Copy/paste this code whitin a module&lt;/P&gt;&lt;PRE&gt;Option Explicit

Public Sub EmbossedText()
    ' Create a new clsSelect object.
    Dim oSelect As New clsSelect
    
    ' Set a reference to the part component definition.
    ' This assumes that a part document is active.
    Dim oCompDef As PartComponentDefinition
    Set oCompDef = ThisApplication.ActiveDocument.ComponentDefinition

    ' Call the pick method of the clsSelect object and set
    ' the filter to pick any face.
    Dim oFace As Face
    Set oFace = oSelect.Pick(kPartFaceFilter)
    
    ' Check to make sure an object was selected.
    If Not oFace Is Nothing Then
        Dim oSketch As PlanarSketch
        Set oSketch = oCompDef.Sketches.Add(oFace, True)
        oSketch.Name = "Embossed text"
        
    ' Create text with simple string as input.  Since this doesn't use
    ' any text overrides, it will default to the active text style.
    Dim sText As String
    Dim oTextBox As TextBox
    Dim oTG As TransientGeometry
    Set oTG = ThisApplication.TransientGeometry
    
    ' Simple single line text.
    sText = "Here is the last and final line of text."
    Set oTextBox = oSketch.TextBoxes.AddFitted(oTG.CreatePoint2d(oSketch.OriginPointGeometry.X, _
                                                oSketch.OriginPointGeometry.Y), sText)
    With oTextBox
        .VerticalJustification = kAlignTextMiddle
        .HorizontalJustification = kAlignTextCenter
    End With
    
    ' Add the text box to an object collection
    Dim oPaths As ObjectCollection
    Set oPaths = ThisApplication.TransientObjects.CreateObjectCollection
    oPaths.Add oTextBox
    
    ' Create a profile. Calling the AddForSolid method without any
    ' arguments will result in a profile containing all possible
    ' paths in the sketch. By passing in the text box, the profile
    ' is restricted to the input text path.
    Dim oProfile As Profile
    Set oProfile = oSketch.Profiles.AddForSolid(False, oPaths)

    ' Extrude the text.
    Dim oExtrudeDef As ExtrudeDefinition
    Set oExtrudeDef = oCompDef.Features.ExtrudeFeatures.CreateExtrudeDefinition(oProfile, kCutOperation)
    Call oExtrudeDef.SetDistanceExtent(0.25, kNegativeExtentDirection)
    Dim oExtrude As ExtrudeFeature
    Set oExtrude = oCompDef.Features.ExtrudeFeatures.Add(oExtrudeDef)
End If
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Copy/paste this code in a class named "clsSelect" (Inventor API help)&lt;/P&gt;&lt;PRE&gt;Option Explicit

' Declare the event objects
Private WithEvents oInteractEvents As InteractionEvents
Private WithEvents oSelectEvents As SelectEvents

' Declare a flag that's used to determine when selection stops.
Private bStillSelecting As Boolean

Public Function Pick(filter As SelectionFilterEnum) As Object
    ' Initialize flag.
    bStillSelecting = True

    ' Create an InteractionEvents object.
    Set oInteractEvents = ThisApplication.CommandManager.CreateInteractionEvents

    ' Ensure interaction is enabled.
    oInteractEvents.InteractionDisabled = False

    ' Set a reference to the select events.
    Set oSelectEvents = oInteractEvents.SelectEvents

    ' Set the filter using the value passed in.
    oSelectEvents.AddSelectionFilter filter

    ' Start the InteractionEvents object.
    oInteractEvents.Start

    ' Loop until a selection is made.
    Do While bStillSelecting
        ThisApplication.UserInterfaceManager.DoEvents
    Loop

    ' Get the selected item. If more than one thing was selected,
    ' just get the first item and ignore the rest.
    Dim oSelectedEnts As ObjectsEnumerator
    Set oSelectedEnts = oSelectEvents.SelectedEntities
    If oSelectedEnts.Count &amp;gt; 0 Then
        Set Pick = oSelectedEnts.Item(1)
    Else
        Set Pick = Nothing
    End If

    ' Stop the InteractionEvents object.
    oInteractEvents.Stop

    ' Clean up.
    Set oSelectEvents = Nothing
    Set oInteractEvents = Nothing
End Function

Private Sub oInteractEvents_OnTerminate()
    ' Set the flag to indicate we're done.
    bStillSelecting = False
End Sub

Private Sub oSelectEvents_OnSelect(ByVal JustSelectedEntities As ObjectsEnumerator, ByVal SelectionDevice As SelectionDeviceEnum, ByVal ModelPosition As Point, ByVal ViewPosition As Point2d, ByVal View As View)
    ' Set the flag to indicate we're done.
    bStillSelecting = False
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to run the macro and then select the plan, that's all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've used VBA because you need of an event trigger for select the plan, alternatively you have to use the .NET.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bregs&lt;/P&gt;&lt;P&gt;Rossano Praderi&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 23:36:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5520670#M120181</guid>
      <dc:creator>rossano_praderi</dc:creator>
      <dc:date>2015-02-25T23:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Embossed text with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5520952#M120182</link>
      <description>&lt;P&gt;Hallo Rossano,&lt;/P&gt;&lt;P&gt;Thanks you very much.&amp;nbsp;&lt;BR /&gt;Your example has helped me a lot. I think I will be able to arrive at the end.&lt;/P&gt;&lt;P&gt;All the best.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Claudio&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 08:17:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/embossed-text-with-ilogic/m-p/5520952#M120182</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-26T08:17:57Z</dc:date>
    </item>
  </channel>
</rss>

