<?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: Automated Centerlines (API) in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106842#M72469</link>
    <description>&lt;P&gt;I just created a small assembly that included a content center washer, created a drawing and ran my little test script and it still worked as expected.&amp;nbsp;Not sure what's going on in your case.&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2017 19:33:42 GMT</pubDate>
    <dc:creator>ekinsb</dc:creator>
    <dc:date>2017-05-24T19:33:42Z</dc:date>
    <item>
      <title>Automated Centerlines (API)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106393#M72459</link>
      <description>&lt;P&gt;I'm using the following code to apply automated Centerlines to what is basically a simple drawing of a washer. The washer is created by extruding the area between two circles, so there is not a hole feature. On the drawings, the topview is looking at the flat sides of the washer (OD, and ID) and the section is looking at a midplane cut (Thickness).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;        protected void applyAutomatedCenterlines()
        {
            AutomatedCenterlineSettings settings = DrawingDocument.DrawingSettings.AutomatedCenterlineSettings;
            settings.ApplyToCircularPatterns = true;
            settings.ApplyToCylinders = true;
            settings.ApplyToHoles = true;
            settings.ProjectionNormalAxis = true;
            settings.ProjectionParallelAxis = true;
            _topView.SetAutomatedCenterlineSettings(settings);
            _sectionView.SetAutomatedCenterlineSettings(settings);
        }&lt;/PRE&gt;
&lt;P&gt;The result is that the centermark on the top of the washer is created, but the&amp;nbsp;centerline on the section view is not.&lt;/P&gt;
&lt;P&gt;If I select the section view afterwards and apply automated centerlines the settings I used above persit, and when applied, achieve the desired result.&lt;/P&gt;
&lt;P&gt;I have confirmed that the _sectionView object is populated correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts why the automated version of this is not working using the same settings?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a picture of the items I'm working with (desired center lines shown)&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="5-24-2017 1-58-04 PM.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/359759iC36A296D02D0BDB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="5-24-2017 1-58-04 PM.jpg" alt="5-24-2017 1-58-04 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks for any help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 18:03:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106393#M72459</guid>
      <dc:creator>NSBowser</dc:creator>
      <dc:date>2017-05-24T18:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Automated Centerlines (API)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106623#M72464</link>
      <description>&lt;P&gt;I just created the same model and it's working fine for me.&amp;nbsp; I'm using Inventor 2017.&amp;nbsp; I converted your code to VBA because it's a little easier to prototype and debug but they're both calling the same API so I wouldn't expect that to make any difference.&amp;nbsp; Here's my code that you can test on your drawing.&amp;nbsp; I narrowed it down to the two settings you can see below&amp;nbsp;to get the desired result, but having the other setting didn't cause any problems either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Public Sub CenterLineTest()
    Dim drawDoc As DrawingDocument
    Set drawDoc = ThisApplication.ActiveDocument
    
    Dim topView As DrawingView
    Dim sectionView As DrawingView
    Set topView = drawDoc.ActiveSheet.DrawingViews.Item(1)
    Set sectionView = drawDoc.ActiveSheet.DrawingViews.Item(2)
    
    Dim settings As AutomatedCenterlineSettings
    Set settings = drawDoc.DrawingSettings.AutomatedCenterlineSettings
    
    settings.ApplyToCylinders = True
    settings.ProjectionParallelAxis = True
    Call topView.SetAutomatedCenterlineSettings(settings)
    Call sectionView.SetAutomatedCenterlineSettings(settings)
End Sub&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 May 2017 18:45:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106623#M72464</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2017-05-24T18:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Automated Centerlines (API)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106680#M72466</link>
      <description>&lt;P&gt;Brian,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The part is coming from content center (we're adding them dynamically to the content center tables, and then building assemblies and models and drawings of them automatically.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran into an issue trying to get the assembly section view to behave (section participation and content center parts don't get along with the API), but I didn't have any such issue creating the section on the individual content center part. I can't help but think it is somehow related.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again for your thoughts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 18:57:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106680#M72466</guid>
      <dc:creator>NSBowser</dc:creator>
      <dc:date>2017-05-24T18:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Automated Centerlines (API)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106842#M72469</link>
      <description>&lt;P&gt;I just created a small assembly that included a content center washer, created a drawing and ran my little test script and it still worked as expected.&amp;nbsp;Not sure what's going on in your case.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 19:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106842#M72469</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2017-05-24T19:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Automated Centerlines (API)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106937#M72471</link>
      <description>&lt;P&gt;I performed a similar test, running an iLogic rule (based on your VBA) and the center line shows up correctly... Obviously there is something amiss, but it escapes me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time!&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 19:53:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7106937#M72471</guid>
      <dc:creator>NSBowser</dc:creator>
      <dc:date>2017-05-24T19:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Automated Centerlines (API)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7414749#M75335</link>
      <description>&lt;P&gt;You can apply this to holes, punches, and cylinders but is there syntax to show centerlines&amp;nbsp;"Revolve Features"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 20:57:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/7414749#M75335</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-27T20:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Automated Centerlines (API)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/9724674#M115455</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Did you solve your problem?&amp;nbsp; I have the same situation.&lt;/P&gt;&lt;P&gt;When I&amp;nbsp;call the native command from the context menu I see my presettings, and I need only press OK button for proper result. But I cant do this in auto mode..&lt;/P&gt;&lt;P&gt;oDrawView.SetAutomatedCenterlineSettings(oACenterLines); - It looks like if that command line dont work..&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 06:52:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/automated-centerlines-api/m-p/9724674#M115455</guid>
      <dc:creator>wmgshurik</dc:creator>
      <dc:date>2020-09-02T06:52:26Z</dc:date>
    </item>
  </channel>
</rss>

