<?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: Get / read out extrude feature of an existing structure in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8908297#M13867</link>
    <description>&lt;P&gt;ok, thanks for this information and help again! My mistake.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice Sunday.&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jul 2019 13:24:05 GMT</pubDate>
    <dc:creator>holzblattDesign</dc:creator>
    <dc:date>2019-07-14T13:24:05Z</dc:date>
    <item>
      <title>Get / read out extrude feature of an existing structure</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8903881#M13863</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just new in programming with the api of Fusion 360. I am looking for a possibility to read out the distance of an extrusion of an existing component/body. So I don't want to create a new one or append it somewhere, just read out an existing structure like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Component 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; - Component 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Body 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a lot of samples how to create a new extrusion, but nothing about reading out this specific property. At the moment I iterate through my object tree and check if there is an extrusion:&lt;/P&gt;&lt;PRE&gt;for occ in occurrences:
        if occ.isVisible:        
            if occ.component.features.extrudeFeatures.count &amp;gt; 0:
                 occ.component.features.extrudeFeatures[0].
     &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For sure, a simple thing, but I didn't fount anything here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 14:21:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8903881#M13863</guid>
      <dc:creator>holzblattDesign</dc:creator>
      <dc:date>2019-07-11T14:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get / read out extrude feature of an existing structure</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8907440#M13864</link>
      <description>&lt;P&gt;May be you can use below scripts to get the distance of an existing extrude feature. In my design I was having only one feature that is why used 0 index but you can search only features which are of extrudeFeature type&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;features = comp.features&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;extrude = features[0]&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;extentOne = extrude.extentOne&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;type(extentOne)&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;lt;class 'adsk.fusion.DistanceExtentDefinition'&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;distanceDef = adsk.fusion.DistanceExtentDefinition.cast(extentOne)&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;distanceDef.distance.value&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 08:29:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8907440#M13864</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2019-07-13T08:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get / read out extrude feature of an existing structure</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8908284#M13865</link>
      <description>&lt;P&gt;Hello goyals,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for your fast response and help. That works for me somehow. I go directly to the extrudeFeatures as you mentioned (features.extrudeFeatures) and take there the first index. The two lines before the cast are not really clear for me (type(extentOne) and the class string)? Also it was marked as an error I tried it without and it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 12:54:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8908284#M13865</guid>
      <dc:creator>holzblattDesign</dc:creator>
      <dc:date>2019-07-14T12:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get / read out extrude feature of an existing structure</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8908288#M13866</link>
      <description>&lt;P&gt;I am glad that it works for you. Following two lines should not be part of script. I just added them to showh &amp;nbsp;that what is type of extentOne obj. In first line I am using type method and second line is just the output of it. I copied them mistakenly in my previous post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;type(extentOne)&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;lt;class 'adsk.fusion.DistanceExtentDefinition'&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 13:05:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8908288#M13866</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2019-07-14T13:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get / read out extrude feature of an existing structure</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8908297#M13867</link>
      <description>&lt;P&gt;ok, thanks for this information and help again! My mistake.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice Sunday.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 13:24:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/get-read-out-extrude-feature-of-an-existing-structure/m-p/8908297#M13867</guid>
      <dc:creator>holzblattDesign</dc:creator>
      <dc:date>2019-07-14T13:24:05Z</dc:date>
    </item>
  </channel>
</rss>

