<?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: Change of dimension type on a drawing  - arc length, diameter, radius... in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/8029416#M84759</link>
    <description>&lt;P&gt;Sorry for late response, you can add a check in the VBA code to exit the sub if user cancels the selection:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oCurveSeg As DrawingCurveSegment
    Set oCurveSeg = ThisApplication.CommandManager.Pick(kDrawingCurveSegmentFilter, "Select an arc drawing curve")
    
    If oCurveSeg Is Nothing Then
        Exit Sub
    End If&lt;/PRE&gt;</description>
    <pubDate>Mon, 28 May 2018 04:21:26 GMT</pubDate>
    <dc:creator>YuhanZhang</dc:creator>
    <dc:date>2018-05-28T04:21:26Z</dc:date>
    <item>
      <title>Change of dimension type on a drawing  - arc length, diameter, radius...</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/7957985#M83673</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;In my job common situation is when I need to make arc length dimension on a drawing. (type "D" -&amp;gt;click on a line-&amp;gt; right click-&amp;gt; dimesnion type -&amp;gt; arc length).&lt;/P&gt;&lt;P&gt;I was wondering if there is an option to do macro or something to make this steps faster. Maybe there is an option to make custom button or short key that will instantly choose dimension type of arc length.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 10:05:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/7957985#M83673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-25T10:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Change of dimension type on a drawing  - arc length, diameter, radius...</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/7961227#M83739</link>
      <description>&lt;P&gt;You can follow below steps to create a button with the&amp;nbsp;sample macro for you to create arc length dimension:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Copy below macro to a VBA module(in the ApplicationProject).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub ArcLengthDim()
    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    Set oSheet = oDoc.ActiveSheet
    
    Dim oCurveSeg As DrawingCurveSegment
    Set oCurveSeg = ThisApplication.CommandManager.Pick(kDrawingCurveSegmentFilter, "Select an arc drawing curve")
    
    Dim oCurve As DrawingCurve
    Set oCurve = oCurveSeg.Parent
    
    If oCurve.CurveType &amp;lt;&amp;gt; kCircularArcCurve Then
        MsgBox "The selected drawing curve is not an arc curve!"
        Exit Sub
    End If
    
    Dim dPosX As Double, dPosY As Double
    If oCurve.MidPoint.X &amp;lt;= oCurve.CenterPoint.X Then
        dPosX = oCurve.MidPoint.X * 3 / 2 - oCurve.CenterPoint.X / 2
    Else
        dPosX = oCurve.MidPoint.X / 2 + oCurve.CenterPoint.X / 2
    End If
    If oCurve.MidPoint.Y &amp;lt;= oCurve.CenterPoint.Y Then
        dPosY = oCurve.MidPoint.Y * 3 / 2 - oCurve.CenterPoint.Y / 2
    Else
        dPosY = oCurve.MidPoint.Y / 2 + oCurve.CenterPoint.Y / 2
    End If
    
    Dim oPos As Point2d
    Set oPos = ThisApplication.TransientGeometry.CreatePoint2d(dPosX, dPosY)
    
    Dim oIntent As GeometryIntent
    Set oIntent = oSheet.CreateGeometryIntent(oCurve)
    
    Dim oArcLenDim As LinearGeneralDimension
    Set oArcLenDim = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPos, oIntent, , kArcLengthDimensionType)
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. In Inventor ribbon, right click and choose "Customize User Commands...".&lt;/P&gt;
&lt;P&gt;3. In the Ribbon tab, select "ArcLengthDim" macro in the commands, and send it to the "Drawing | Annotate" tab:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArcLenCommand1.png" style="width: 836px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/493565i0755F09A9AE62EA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="ArcLenCommand1.png" alt="ArcLenCommand1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArcLenCommand2.png" style="width: 836px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/493566i61425357F06805E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="ArcLenCommand2.png" alt="ArcLenCommand2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Now in the drawing, activate the Annotate tab, and find the macro command:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArcLenCommand3.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/493567i62797E161A2B59BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="ArcLenCommand3.png" alt="ArcLenCommand3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5. Click it and select an arc curve to see the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a sample for you to get starting on this. Hope it helps.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 09:28:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/7961227#M83739</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2018-04-26T09:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Change of dimension type on a drawing  - arc length, diameter, radius...</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/7961475#M83744</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;STRONG&gt;&lt;U&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/532715" target="_self"&gt;yuhanzhang&lt;/A&gt;,&amp;nbsp;&lt;/U&gt;&lt;/STRONG&gt;it works perfect!&lt;/P&gt;&lt;P&gt;Maybe, do You can help me with this... when I want to stop the program ArcLengthDim and press "Esc" this window appear:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArcError.JPG" style="width: 389px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/493612iF7EC0B7DB14B6240/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArcError.JPG" alt="ArcError.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want skip this window. I guess it is a matter of one line code to stop by pressing "Esc"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 11:12:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/7961475#M83744</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-26T11:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Change of dimension type on a drawing  - arc length, diameter, radius...</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/8029416#M84759</link>
      <description>&lt;P&gt;Sorry for late response, you can add a check in the VBA code to exit the sub if user cancels the selection:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oCurveSeg As DrawingCurveSegment
    Set oCurveSeg = ThisApplication.CommandManager.Pick(kDrawingCurveSegmentFilter, "Select an arc drawing curve")
    
    If oCurveSeg Is Nothing Then
        Exit Sub
    End If&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 May 2018 04:21:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-of-dimension-type-on-a-drawing-arc-length-diameter-radius/m-p/8029416#M84759</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2018-05-28T04:21:26Z</dc:date>
    </item>
  </channel>
</rss>

