<?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 For Brian (or other knowledgeable person): Component Occurence in Drawing View to Hidden Line style? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611292#M145166</link>
    <description>Can this be done? I want to go through the DrawingView Object&lt;BR /&gt;
to get at a subcomponent of an assembly and either set that&lt;BR /&gt;
component to have hidden lines (where needed) or no hidden&lt;BR /&gt;
lines. An example would be nice.&lt;BR /&gt;
&lt;BR /&gt;
Bob</description>
    <pubDate>Tue, 05 Jan 2010 19:16:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-05T19:16:22Z</dc:date>
    <item>
      <title>For Brian (or other knowledgeable person): Component Occurence in Drawing View to Hidden Line style?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611292#M145166</link>
      <description>Can this be done? I want to go through the DrawingView Object&lt;BR /&gt;
to get at a subcomponent of an assembly and either set that&lt;BR /&gt;
component to have hidden lines (where needed) or no hidden&lt;BR /&gt;
lines. An example would be nice.&lt;BR /&gt;
&lt;BR /&gt;
Bob</description>
      <pubDate>Tue, 05 Jan 2010 19:16:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611292#M145166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T19:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: For Brian (or other knowledgeable person): Component Occurence in  Drawing View to Hidden Line style?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611293#M145167</link>
      <description>Here's some example code that will change the appearance of an occurrence. &lt;BR /&gt;
This uses a top-level occurrence in an assembly, but it could be at any &lt;BR /&gt;
level of the assembly.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub SetOccurrenceStyleInDrawing()&lt;BR /&gt;
    Dim drawDoc As DrawingDocument&lt;BR /&gt;
    Set drawDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim drawView As DrawingView&lt;BR /&gt;
    Set drawView = drawDoc.ActiveSheet.DrawingViews.Item(1)&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the assembly shown in the view&lt;BR /&gt;
    Dim asmDoc As AssemblyDocument&lt;BR /&gt;
    Set asmDoc = drawView.ReferencedDocumentDescriptor.ReferencedDocument&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the desired occurrence.  This just gets the 3rd one in the tree.&lt;BR /&gt;
    Dim occ As ComponentOccurrence&lt;BR /&gt;
    Set occ = asmDoc.ComponentDefinition.Occurrences.Item(3)&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the drawing curves that represent the occurrence.&lt;BR /&gt;
    Dim drawCurves As DrawingCurvesEnumerator&lt;BR /&gt;
    Set drawCurves = drawView.DrawingCurves(occ)&lt;BR /&gt;
&lt;BR /&gt;
    ' Change the style of the curves.&lt;BR /&gt;
    Dim curve As DrawingCurve&lt;BR /&gt;
    For Each curve In drawCurves&lt;BR /&gt;
        curve.LineType = kDashedLineType&lt;BR /&gt;
    Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Inventor API Product Designer&lt;BR /&gt;
http://blogs.autodesk.com/modthemachine</description>
      <pubDate>Thu, 07 Jan 2010 16:01:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611293#M145167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T16:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: For Brian (or other knowledgeable person): Component Occurence in  Drawing View to Hidden Line style?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611294#M145168</link>
      <description>Brian,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the example! Though looking at this, doesn't this just&lt;BR /&gt;
change ALL the curves for the occurence to dashed lines? What I&lt;BR /&gt;
wanted to do is either turn on or off the display of hidden edges,&lt;BR /&gt;
like an edgewise hole. Similar to RMB on a selected occurence in&lt;BR /&gt;
the drawing view and toggling Hidden Lines on or off.&lt;BR /&gt;
&lt;BR /&gt;
Bob&lt;BR /&gt;
&lt;BR /&gt;
Brian Ekins (Autodesk) wrote:&lt;BR /&gt;
&amp;gt; Here's some example code that will change the appearance of an occurrence. &lt;BR /&gt;
&amp;gt; This uses a top-level occurrence in an assembly, but it could be at any &lt;BR /&gt;
&amp;gt; level of the assembly.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Public Sub SetOccurrenceStyleInDrawing()&lt;BR /&gt;
&amp;gt;     Dim drawDoc As DrawingDocument&lt;BR /&gt;
&amp;gt;     Set drawDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;     Dim drawView As DrawingView&lt;BR /&gt;
&amp;gt;     Set drawView = drawDoc.ActiveSheet.DrawingViews.Item(1)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;     ' Get the assembly shown in the view&lt;BR /&gt;
&amp;gt;     Dim asmDoc As AssemblyDocument&lt;BR /&gt;
&amp;gt;     Set asmDoc = drawView.ReferencedDocumentDescriptor.ReferencedDocument&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;     ' Get the desired occurrence.  This just gets the 3rd one in the tree.&lt;BR /&gt;
&amp;gt;     Dim occ As ComponentOccurrence&lt;BR /&gt;
&amp;gt;     Set occ = asmDoc.ComponentDefinition.Occurrences.Item(3)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;     ' Get the drawing curves that represent the occurrence.&lt;BR /&gt;
&amp;gt;     Dim drawCurves As DrawingCurvesEnumerator&lt;BR /&gt;
&amp;gt;     Set drawCurves = drawView.DrawingCurves(occ)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;     ' Change the style of the curves.&lt;BR /&gt;
&amp;gt;     Dim curve As DrawingCurve&lt;BR /&gt;
&amp;gt;     For Each curve In drawCurves&lt;BR /&gt;
&amp;gt;         curve.LineType = kDashedLineType&lt;BR /&gt;
&amp;gt;     Next&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;</description>
      <pubDate>Thu, 07 Jan 2010 16:14:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611294#M145168</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T16:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: For Brian (or other knowledgeable person): Component Occurence in  Drawing View to Hidden Line style?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611295#M145169</link>
      <description>I misunderstood.  What you want to do isn't supported by the API.  I thought &lt;BR /&gt;
I had a workaround to be able to use the command, the same way you do &lt;BR /&gt;
through the user-interface, but I'm having trouble getting it to work.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Inventor API Product Designer&lt;BR /&gt;
http://blogs.autodesk.com/modthemachine</description>
      <pubDate>Thu, 07 Jan 2010 18:04:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2611295#M145169</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T18:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: For Brian (or other knowledgeable person): Component Occurence in  Drawing V</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2742173#M145170</link>
      <description>&lt;P&gt;Was this issue fixed in 2011? If not, where you able to come up with a workaround?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2010 14:54:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/2742173#M145170</guid>
      <dc:creator>herrwolf1</dc:creator>
      <dc:date>2010-08-11T14:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: For Brian (or other knowledgeable person): Component Occurence in  Drawing V</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/3155442#M145171</link>
      <description>&lt;P&gt;I need a similar solution.. Any success?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 11:14:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/3155442#M145171</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-13T11:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: For Brian (or other knowledgeable person): Component Occurence in  Drawing V</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/3155610#M145172</link>
      <description>&lt;P&gt;Can you reach it via the BrowserNodes?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 13:22:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/3155610#M145172</guid>
      <dc:creator>PACDrafting</dc:creator>
      <dc:date>2011-09-13T13:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: For Brian (or other knowledgeable person): Component Occurence in  Drawing V</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/3155662#M145173</link>
      <description>&lt;P&gt;obrow.NativeObject.ViewStyle = kHiddenLineRemovedDrawingViewStyle or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;obrow.NativeObject.ViewStyle&amp;nbsp;= kHiddenLineDrawingViewStyle&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 13:45:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/3155662#M145173</guid>
      <dc:creator>PACDrafting</dc:creator>
      <dc:date>2011-09-13T13:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: For Brian (or other knowledgeable person): Component Occurence in  Drawing V</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/3155682#M145174</link>
      <description>&lt;P&gt;My mistake. Can only get to the assembly not occurrences.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2011 13:52:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/for-brian-or-other-knowledgeable-person-component-occurence-in/m-p/3155682#M145174</guid>
      <dc:creator>PACDrafting</dc:creator>
      <dc:date>2011-09-13T13:52:38Z</dc:date>
    </item>
  </channel>
</rss>

