VDS - Numbering Schemes

VDS - Numbering Schemes

m.hermannAHZF8
Enthusiast Enthusiast
62 Views
4 Replies
Message 1 of 5

VDS - Numbering Schemes

m.hermannAHZF8
Enthusiast
Enthusiast

Hi,

I wanted to display all active number schemes, displaying the default first. That works. But I don't get the 'None' displayed.
My code:

$_FilteredNumSchems = @()
$_Default = $numSchems | Where-Object { $_.IsDflt -eq $true }
$_FilteredNumSchems += ($_Default) | Sort-Object
if ($Prop["_NumSchm"].Value) { $Prop["_NumSchm"].Value = $_FilteredNumSchems[0].Name } #note - functional dialogs don't have the property _NumSchm, therefore we conditionally set the value
$dsWindow.FindName("NumSchms").IsEnabled = $true
$dsWindow.FindName("NumSchms").SelectedValue = $_Default.Name
#add the "None" scheme to allow user interactive file name input
$noneNumSchm = New-Object 'Autodesk.Connectivity.WebServices.NumSchm'
$noneNumSchm.Name = $UIString["LBL77"] # None 
$Prop["_NumSchm"].Value = $_default.Name
return $numSchems

I found a few posts but can't find the solution.
Can someone help me without completely rebuilding the CodeBlock?
0 Likes
Accepted solutions (1)
63 Views
4 Replies
Replies (4)
Message 2 of 5

Markus.Koechl
Autodesk
Autodesk

Hi @m.hermannAHZF8 : you must add the $noneNumSchm to the list of numbering schemes before return it; compare the full code sample here: VDS-Sample-Configurations-2026/VDS-MFG-Sample/CAD.Custom/addins/ADSK.QS.Default.ps1 at master · koec...

I hope this helps.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 5

m.hermannAHZF8
Enthusiast
Enthusiast

Hi Markus,

i had used like this.

But when I use the code in this way, only the default numbering scheme is displayed and 'None'.
All others activated in Vault are missing.

0 Likes
Message 4 of 5

Markus.Koechl
Autodesk
Autodesk
Accepted solution

Hi Michael, @m.hermannAHZF8 : that's the intent of the list $_FilteredNumSchems. You could skip filtering and add the "None" scheme to the full list like this:

$numSchems += $noneNumSchm
return $numSchems

Don't forget to return the unfiltered list of schemes instead of the filtered ones. My code returns the filtered only.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 5 of 5

m.hermannAHZF8
Enthusiast
Enthusiast

That is exactly the solution.
Thank you very much.

0 Likes