<?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: Detect if selected part was created as as Custom Content Center in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/detect-if-selected-part-was-created-as-as-custom-content-center/m-p/13000365#M171416</link>
    <description>&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;p&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;pps&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN&gt;p&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"ContentCenter"&lt;/SPAN&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;pp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Property&lt;/SPAN&gt; = &lt;SPAN&gt;pps&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"IsCustomPart"&lt;/SPAN&gt;)

&lt;SPAN&gt;MsgBox&lt;/SPAN&gt; (&lt;SPAN&gt;pp&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;)&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Sep 2024 13:41:27 GMT</pubDate>
    <dc:creator>bradeneuropeArthur</dc:creator>
    <dc:date>2024-09-04T13:41:27Z</dc:date>
    <item>
      <title>Detect if selected part was created as as Custom Content Center</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/detect-if-selected-part-was-created-as-as-custom-content-center/m-p/12999657#M171403</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp; macro below successfully detects if the current selected part is a content center part, but not if it was created with Content Center (As Custom). Example: a tube with the "Change Size" option enabled, saved as Custom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't find any way to detect if it has the "Change Size" option enabled on the part. Any idea how to fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;On Error Resume Next

Dim oDoc As Document = ThisApplication.ActiveDocument
Dim oCount As Integer = oDoc.SelectSet.Count
Dim oPane As BrowserPane = oDoc.BrowserPanes.ActivePane

If oDoc.DocumentType &amp;lt;&amp;gt; kAssemblyDocumentObject Or oCount = 0 Then Exit Sub
	
'If oDoc.SelectSet.Item(1).PropertySets.Item("ContentCenter").Item("IsCustomPart").Value = 1 then msgbox ("SIM")

If oCount &amp;gt; 1 Then 
	ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyReplaceCmd").Execute2(True)
	Exit Sub
End If

If oDoc.SelectSet.Item(1).IsiPartMember Or oDoc.SelectSet.Item(1).IsiAssemblyMember Then
	Dim oNode As BrowserNode = oPane.GetBrowserNodeFromObject(oDoc.SelectSet.Item(1))
		oNode.Expanded = True
	Dim oTableNode As BrowserNode = oNode.BrowserNodes.Item(1)
		oDoc.SelectSet.Clear
		oTableNode.DoSelect
	ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyChangeComponentCmd").Execute
	Exit Sub
End If

If oDoc.SelectSet.Item(1).DefinitionDocumentType &amp;lt;&amp;gt; kAssemblyDocumentObject Then
	If oDoc.SelectSet.Item(1).Definition.IsContentMember Then 
		ThisApplication.CommandManager.ControlDefinitions.Item("CCV2ChangeSizeButton").Execute2(True)
		Exit Sub
	End If
End If

ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyReplaceCmd").Execute2(True)
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 07:10:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/detect-if-selected-part-was-created-as-as-custom-content-center/m-p/12999657#M171403</guid>
      <dc:creator>AMCr2</dc:creator>
      <dc:date>2024-09-04T07:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Detect if selected part was created as as Custom Content Center</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/detect-if-selected-part-was-created-as-as-custom-content-center/m-p/13000365#M171416</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;p&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;pps&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN&gt;p&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"ContentCenter"&lt;/SPAN&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;pp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Property&lt;/SPAN&gt; = &lt;SPAN&gt;pps&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"IsCustomPart"&lt;/SPAN&gt;)

&lt;SPAN&gt;MsgBox&lt;/SPAN&gt; (&lt;SPAN&gt;pp&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;)&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2024 13:41:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/detect-if-selected-part-was-created-as-as-custom-content-center/m-p/13000365#M171416</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2024-09-04T13:41:27Z</dc:date>
    </item>
  </channel>
</rss>

