<?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: Filters Numbering Schema List in Inventor in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/filters-numbering-schema-list-in-inventor/m-p/7671761#M6683</link>
    <description>&lt;P&gt;Hi Joerg,&lt;/P&gt;
&lt;P&gt;happy new year!&lt;/P&gt;
&lt;P&gt;For your first objective the default configuration already delivers it: if a numbering scheme matching the category name exists, this scheme was set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quickstart replaced the setting with a filtered one. You just need to uncomment the original code in InitializeWindow:&lt;/P&gt;
&lt;PRE&gt;if (-not $Prop["_SaveCopyAsMode"].Value)
		{
			#region Quickstart comment out default
				#$Prop["_Category"].add_PropertyChanged({
				#	if ($_.PropertyName -eq "Value")
				#	{
				#		$Prop["_NumSchm"].Value = $Prop["_Category"].Value
				#	}	
				#})
				#$Prop["_Category"].Value = $UIString["CAT1"] # quickstart activates different categories for Inventor models, drawings and AutoCAD drawings
			#endregion
        }&lt;/PRE&gt;
&lt;P&gt;Also, you need to remove the filter in GetNumSchms. Comment the line shown below; we filter the default numbering scheme:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$_temp = $numSchems | Where { $_.IsDflt -eq $true}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your final objective requires to dynamically filter the numbering schemes. One approach (of several possible) is adding a Category selection event handler.&lt;/P&gt;
&lt;P&gt;1) Turn off the default mapping in the Inventor.XAML file; remove the line&amp;nbsp;ItemsSource="{Binding PsList[GetNumSchms], Mode=OneTime}" from the combo box definition; the result looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;ComboBox x:Name="NumSchms" Grid.Column="3"
        		SelectedIndex="0"
        		DisplayMemberPath="Name"
        		SelectedValuePath="Name"
        		SelectedValue="{Binding Prop[_NumSchm].Value}"
        		
        		IsEnabled="{Binding HasItems, RelativeSource={RelativeSource Self}}"
        		Visibility="{Binding NotEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" BorderThickness="0,1,1,0" /&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;2) Establish the event handler selecting a category replacing the static mapping; any selection will read the available numbering schemes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$dsWindow.FindName("Categories").add_SelectionChanged({
						GetNumSchms
					})

					#$mCatName = GetCategories | Where {$_.Name -eq $UIString["MSDCE_CAT02"]}
					#IF ($mCatName) { $Prop["_Category"].Value = $UIString["MSDCE_CAT02"]}
					#	# in case the current vault is not quickstart, but a plain MFG default configuration
					#Else {
					#	$mCatName = GetCategories | Where {$_.Name -eq $UIString["CAT1"]} #"Engineering"
					#	IF ($mCatName) { $Prop["_Category"].Value = $UIString["CAT1"]}
					#}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) Extend the function GetNumSchms like this:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;[System.Collections.ArrayList]$numSchems = @($vault.DocumentService.GetNumberingSchemesByType('Activated'))
            if ($numSchems.Count -gt 1 -and !($Prop["_SaveCopyAsMode"].Value -eq $true)) #second condition added by Quickstart
			{
				#Filter numbering according current category
				$_FilteredNumSchems = @()
				If ($Prop["_Category"].Value -eq "&lt;SPAN&gt;Categorie A&lt;/SPAN&gt;")
				{
					$_FilteredNumSchems += $numSchems | Where { $_.Name -eq "A" -or $_.Name -eq "B"}
				}
				If ($Prop["_Category"].Value -eq "Category C")
				{
					$_FilteredNumSchems += $numSchems | Where { $_.Name -eq "C"}
				}
				$dsWindow.FindName("NumSchms").ItemsSource = $_FilteredNumSchems
				$dsWindow.FindName("NumSchms").SelectedIndex = 0
			}&lt;/PRE&gt;
&lt;P&gt;For your convenience, I attached the Quickstart configuration modified accordingly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jan 2018 12:45:48 GMT</pubDate>
    <dc:creator>Markus.Koechl</dc:creator>
    <dc:date>2018-01-08T12:45:48Z</dc:date>
    <item>
      <title>Filters Numbering Schema List in Inventor</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/filters-numbering-schema-list-in-inventor/m-p/7658117#M6682</link>
      <description>&lt;P&gt;Hallo everybody,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;first of all, Happy new year.&lt;/P&gt;
&lt;P&gt;I hope you all have a good start in 2018&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the last days i search for a&amp;nbsp;possibility to set a List with numschema that i use in Vault.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Momently I have in Inventor only the default NumSchema that is marked in Vault.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I want to have some NumSchemas, like "Daten", "Normteile", Fremdteile",&amp;nbsp;independently from the chosen&amp;nbsp;catagorie&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The high end of my idea is the for a catagorie one or two numschema in the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Categorie A have the NumSchemas A - B - C&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Categorie B&amp;nbsp;have the NumSchemas A - D&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Categorie C&amp;nbsp;have the NumSchemas B&amp;nbsp;- D&amp;nbsp;-&amp;nbsp;E&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But this is an other question.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;By the way, I use the DS Quickstart 2018.1 form Markus that is very&amp;nbsp;good.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for reading and all a good day&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 09:42:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/filters-numbering-schema-list-in-inventor/m-p/7658117#M6682</guid>
      <dc:creator>j_weber</dc:creator>
      <dc:date>2018-01-02T09:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Filters Numbering Schema List in Inventor</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/filters-numbering-schema-list-in-inventor/m-p/7671761#M6683</link>
      <description>&lt;P&gt;Hi Joerg,&lt;/P&gt;
&lt;P&gt;happy new year!&lt;/P&gt;
&lt;P&gt;For your first objective the default configuration already delivers it: if a numbering scheme matching the category name exists, this scheme was set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quickstart replaced the setting with a filtered one. You just need to uncomment the original code in InitializeWindow:&lt;/P&gt;
&lt;PRE&gt;if (-not $Prop["_SaveCopyAsMode"].Value)
		{
			#region Quickstart comment out default
				#$Prop["_Category"].add_PropertyChanged({
				#	if ($_.PropertyName -eq "Value")
				#	{
				#		$Prop["_NumSchm"].Value = $Prop["_Category"].Value
				#	}	
				#})
				#$Prop["_Category"].Value = $UIString["CAT1"] # quickstart activates different categories for Inventor models, drawings and AutoCAD drawings
			#endregion
        }&lt;/PRE&gt;
&lt;P&gt;Also, you need to remove the filter in GetNumSchms. Comment the line shown below; we filter the default numbering scheme:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$_temp = $numSchems | Where { $_.IsDflt -eq $true}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your final objective requires to dynamically filter the numbering schemes. One approach (of several possible) is adding a Category selection event handler.&lt;/P&gt;
&lt;P&gt;1) Turn off the default mapping in the Inventor.XAML file; remove the line&amp;nbsp;ItemsSource="{Binding PsList[GetNumSchms], Mode=OneTime}" from the combo box definition; the result looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;ComboBox x:Name="NumSchms" Grid.Column="3"
        		SelectedIndex="0"
        		DisplayMemberPath="Name"
        		SelectedValuePath="Name"
        		SelectedValue="{Binding Prop[_NumSchm].Value}"
        		
        		IsEnabled="{Binding HasItems, RelativeSource={RelativeSource Self}}"
        		Visibility="{Binding NotEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" BorderThickness="0,1,1,0" /&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;2) Establish the event handler selecting a category replacing the static mapping; any selection will read the available numbering schemes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$dsWindow.FindName("Categories").add_SelectionChanged({
						GetNumSchms
					})

					#$mCatName = GetCategories | Where {$_.Name -eq $UIString["MSDCE_CAT02"]}
					#IF ($mCatName) { $Prop["_Category"].Value = $UIString["MSDCE_CAT02"]}
					#	# in case the current vault is not quickstart, but a plain MFG default configuration
					#Else {
					#	$mCatName = GetCategories | Where {$_.Name -eq $UIString["CAT1"]} #"Engineering"
					#	IF ($mCatName) { $Prop["_Category"].Value = $UIString["CAT1"]}
					#}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) Extend the function GetNumSchms like this:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;[System.Collections.ArrayList]$numSchems = @($vault.DocumentService.GetNumberingSchemesByType('Activated'))
            if ($numSchems.Count -gt 1 -and !($Prop["_SaveCopyAsMode"].Value -eq $true)) #second condition added by Quickstart
			{
				#Filter numbering according current category
				$_FilteredNumSchems = @()
				If ($Prop["_Category"].Value -eq "&lt;SPAN&gt;Categorie A&lt;/SPAN&gt;")
				{
					$_FilteredNumSchems += $numSchems | Where { $_.Name -eq "A" -or $_.Name -eq "B"}
				}
				If ($Prop["_Category"].Value -eq "Category C")
				{
					$_FilteredNumSchems += $numSchems | Where { $_.Name -eq "C"}
				}
				$dsWindow.FindName("NumSchms").ItemsSource = $_FilteredNumSchems
				$dsWindow.FindName("NumSchms").SelectedIndex = 0
			}&lt;/PRE&gt;
&lt;P&gt;For your convenience, I attached the Quickstart configuration modified accordingly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 12:45:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/filters-numbering-schema-list-in-inventor/m-p/7671761#M6683</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2018-01-08T12:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filters Numbering Schema List in Inventor</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/filters-numbering-schema-list-in-inventor/m-p/7675584#M6684</link>
      <description>&lt;P&gt;Hi Markus,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;happy new year to u 2.&lt;/P&gt;
&lt;P&gt;I hope and wish you a good year&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your answer and the file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will try it out,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks and by&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jörg&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 15:28:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/filters-numbering-schema-list-in-inventor/m-p/7675584#M6684</guid>
      <dc:creator>j_weber</dc:creator>
      <dc:date>2018-01-09T15:28:52Z</dc:date>
    </item>
  </channel>
</rss>

