<?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: Unable to obtain Transparent objects of a DesignViewRepresentation. in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544227#M93553</link>
    <description>&lt;P&gt;Here's a script that does what I described. In my basic test it was pretty snappy (at least faster than if you didn't turn screen updating off). It also rolls all of the view rep changes into a single undo transaction and then aborts it. So rather than leaving an undo entry for every design view switch, it leaves no undo entries at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still not ideal, but will hopefully work for you. I'm as curious as you if there's a way to query the view reps directly without activating them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oAssyDoc As AssemblyDocument = ThisDoc.Document
Dim oCompDef As AssemblyComponentDefinition = oAssyDoc.ComponentDefinition
Dim oRepMan As RepresentationsManager = oCompDef.RepresentationsManager

Dim oCurView As DesignViewRepresentation = oRepMan.ActiveDesignViewRepresentation

Dim oList As New List(Of String)

ThisApplication.ScreenUpdating = False
Dim oTransaction As Transaction = ThisApplication.TransactionManager.StartTransaction(oAssyDoc,"Check View Rep Transparency")
For Each oView As DesignViewRepresentation In oRepMan.DesignViewRepresentations
	oView.Activate
	
	For Each oOcc As ComponentOccurrence In oCompDef.Occurrences
		If oOcc.Transparent Then
			If Not oList.Contains("View: " &amp;amp; oView.Name) Then oList.Add("View: " &amp;amp; oView.Name)
			oList.Add(vbTab &amp;amp; oOcc.Name)
		End If
	Next
Next
oCurView.Activate
oTransaction.Abort
ThisApplication.ScreenUpdating = True

MessageBox.Show(String.Join(vbCrLf,oList))&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Jan 2019 18:40:01 GMT</pubDate>
    <dc:creator>DRoam</dc:creator>
    <dc:date>2019-01-23T18:40:01Z</dc:date>
    <item>
      <title>Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8542148#M93512</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inventor 2017\2019 Professional&lt;/P&gt;
&lt;P&gt;C#&lt;/P&gt;
&lt;P&gt;Windows 10&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the Inventor API to iterate through an Assembly's design view representations and print out (debug print) all hidden parts and transparent parts. Obtaining the hidden parts is not a problem, however there is no way I could obtain the transparent parts as I do not see any API method\property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: The design view does not have to be active.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;-Thilak Rao&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 03:31:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8542148#M93512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-23T03:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8543354#M93535</link>
      <description>&lt;P&gt;According to the API help page for &lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-DE229A99-9860-4501-AF4C-C671D120A2DB" target="_blank" rel="noopener"&gt;ComponentOccurrence&lt;/A&gt;, there's a &lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-A75548FB-022F-4BA0-95AF-61EA7F3BD3C3" target="_blank" rel="noopener"&gt;ComponentOccurrence.Transparent&lt;/A&gt; property, which was introduced in Inventor 2017. So you should be able to iterate through the assembly's occurrences and check the Transparent property.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 14:38:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8543354#M93535</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-23T14:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8543970#M93546</link>
      <description>&lt;P&gt;Thank you for attempting to help.&lt;/P&gt;
&lt;P&gt;As I mentioned earluier, I am iterating the design view representation and would like to obtain this information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you say is true, if I had to set the design view representation as active and then iterate the assembly, which I do not want to do so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;-Thilak Rao&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 17:35:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8543970#M93546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-23T17:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544074#M93549</link>
      <description>&lt;P&gt;Sorry, you said, "The design view does not have to be active", not, "I don't want to set the design view as active".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want to activate the design view then I'm not sure. Interestingly, there's a "DesignViewInfo" property that returns an XML of the design view's properties, and oddly enough it contains information about which occurrences are set not-visible, but not which occurrences are set transparent. So that's strange.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think activating the view and iterating through occurrences may be the only way. You could try setting ThisApplication.ScreenUpdating to False before iterating through views, to see if that speeds it up any. Just remember to set it back to True after your code ends.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question, how are you getting the visible components without activating the design view? I don't even see a way to do that...&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 18:02:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544074#M93549</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-23T18:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544227#M93553</link>
      <description>&lt;P&gt;Here's a script that does what I described. In my basic test it was pretty snappy (at least faster than if you didn't turn screen updating off). It also rolls all of the view rep changes into a single undo transaction and then aborts it. So rather than leaving an undo entry for every design view switch, it leaves no undo entries at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still not ideal, but will hopefully work for you. I'm as curious as you if there's a way to query the view reps directly without activating them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oAssyDoc As AssemblyDocument = ThisDoc.Document
Dim oCompDef As AssemblyComponentDefinition = oAssyDoc.ComponentDefinition
Dim oRepMan As RepresentationsManager = oCompDef.RepresentationsManager

Dim oCurView As DesignViewRepresentation = oRepMan.ActiveDesignViewRepresentation

Dim oList As New List(Of String)

ThisApplication.ScreenUpdating = False
Dim oTransaction As Transaction = ThisApplication.TransactionManager.StartTransaction(oAssyDoc,"Check View Rep Transparency")
For Each oView As DesignViewRepresentation In oRepMan.DesignViewRepresentations
	oView.Activate
	
	For Each oOcc As ComponentOccurrence In oCompDef.Occurrences
		If oOcc.Transparent Then
			If Not oList.Contains("View: " &amp;amp; oView.Name) Then oList.Add("View: " &amp;amp; oView.Name)
			oList.Add(vbTab &amp;amp; oOcc.Name)
		End If
	Next
Next
oCurView.Activate
oTransaction.Abort
ThisApplication.ScreenUpdating = True

MessageBox.Show(String.Join(vbCrLf,oList))&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jan 2019 18:40:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544227#M93553</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-23T18:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544232#M93554</link>
      <description>&lt;P&gt;Thanks again.&lt;/P&gt;
&lt;P&gt;The DesignViewInfo has been this way for many releases. Inventor does definitely know as to which are Transparent but does not carry that information in DesignViewInfo.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You answered your own question :-).&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;Question, how are you getting the visible components without activating the design view?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Answer &amp;gt;&amp;gt;Interestingly, there's a "DesignViewInfo" property that returns an XML of the design view's properties, and oddly enough it contains information about which occurrences are set not-visible.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-Thilak Rao&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 18:38:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544232#M93554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-23T18:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544287#M93556</link>
      <description>&lt;P&gt;Haha, I wondered if maybe you were using that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you use dedicated XML methods to query that data? If so, would you be willing to share the code you use to do so? I've been meaning to start experimenting with querying/writing to XML via VB, this would be a good example.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 18:53:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544287#M93556</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2019-01-23T18:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544989#M93563</link>
      <description>&lt;P&gt;Attached is the class file that you can use. Remember to deserialize the input string using XmlSerializer and cast it to DesignViewInfo object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Thilak Rao&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 23:45:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8544989#M93563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-23T23:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8554649#M93711</link>
      <description>&lt;P&gt;I thought DevTech was active here and expected a quick response.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 15:54:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8554649#M93711</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-28T15:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8554705#M93714</link>
      <description>&lt;P&gt;If you are a member of the ADN (paid member), then the forums get an extra button, that you can push stating need answer.&amp;nbsp; That button opens a help ticket that gets the attention of Autodesk Development. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise there are a few Autodesk employee's that monitor these posts for answers that are not getting a response or proper solution, but they are generally on a 'volunteer' to respond basis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 16:06:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8554705#M93714</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-01-28T16:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to obtain Transparent objects of a DesignViewRepresentation.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8554810#M93718</link>
      <description>&lt;P&gt;Adam nagy or ChandraShekar&lt;/P&gt;
&lt;P&gt;Could you'll please have a look at this and confirm if there is a decent solution rather than iterate all views, set them active and iterate the entire assembly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;-Thilak Rao&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 16:44:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/unable-to-obtain-transparent-objects-of-a/m-p/8554810#M93718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-28T16:44:21Z</dc:date>
    </item>
  </channel>
</rss>

