Hi All,
using Tube and Pipe part of VDS code we have problem assigning right Part Number for Run Components.
Code that we are using is:
function mInitializeTPContext {
$mRunAssys = @()
$mRunAssys = $dsWindow.DataContext.RunAssemblies
$mRunAssys | ForEach-Object {
$mRunAssyProps = $_.Properties.Properties
$mTitleProp = $mRunAssyProps | Where-Object { $_.Name -eq "Title"}
$mTitleProp.Value = $UIString["LBL41"]
$mPartNumProp = $mRunAssyProps | Where-Object { $_.Name -eq "Part Number"}
$mPartNumProp.Value = "" #delete the value to get the new number
$mProp = $mRunAssyProps | Where-Object { $_.Name -eq "Description"}
$mProp.Value = $UIString["MSDCE_BOMType_01"] + " " + $UIString["MSDCE_TubePipe_01"]
}
$mRouteParts = @()
$mRouteParts = $dsWindow.DataContext.RouteParts
$mRouteParts | ForEach-Object {
$mRouteProps = $_.Properties.Properties
$mTitleProp = $mRouteProps | Where-Object { $_.Name -eq "Title"}
$mTitleProp.Value = $UIString["LBL42"]
$mPartNumProp = $mRouteProps | Where-Object { $_.Name -eq "Part Number"}
$mPartNumProp.Value = "" #delete the value to get the new number
$mProp = $mRouteProps | Where-Object { $_.Name -eq "Description"}
$mProp.Value = $UIString["MSDCE_BOMType_00"] + " " + $UIString["LBL42"]
}
$mRunComponents = @()
$mRunComponents = $dsWindow.DataContext.RunComponents
$mRunComponents | ForEach-Object {
$mRunCompProps = $_.Properties.Properties
$mTitleProp = $mRunCompProps | Where-Object { $_.Name -eq "Title"}
$m_StockProp = $mRunCompProps | Where-Object { $_.Name -eq "Stock Number"}
$mTitleProp.Value = $UIString["LBL43"]
}
}
We are using:
Inventor 2022.3
Vault Professional 2022.3
VDS 2022.3 with our modifications
I have recorded video how Tube and Pipe module interact with VDS and the only problem is wrong Part Number for routing parts:
Thnx,
Goran
Solved! Go to Solution.
Hi All,
using Tube and Pipe part of VDS code we have problem assigning right Part Number for Run Components.
Code that we are using is:
function mInitializeTPContext {
$mRunAssys = @()
$mRunAssys = $dsWindow.DataContext.RunAssemblies
$mRunAssys | ForEach-Object {
$mRunAssyProps = $_.Properties.Properties
$mTitleProp = $mRunAssyProps | Where-Object { $_.Name -eq "Title"}
$mTitleProp.Value = $UIString["LBL41"]
$mPartNumProp = $mRunAssyProps | Where-Object { $_.Name -eq "Part Number"}
$mPartNumProp.Value = "" #delete the value to get the new number
$mProp = $mRunAssyProps | Where-Object { $_.Name -eq "Description"}
$mProp.Value = $UIString["MSDCE_BOMType_01"] + " " + $UIString["MSDCE_TubePipe_01"]
}
$mRouteParts = @()
$mRouteParts = $dsWindow.DataContext.RouteParts
$mRouteParts | ForEach-Object {
$mRouteProps = $_.Properties.Properties
$mTitleProp = $mRouteProps | Where-Object { $_.Name -eq "Title"}
$mTitleProp.Value = $UIString["LBL42"]
$mPartNumProp = $mRouteProps | Where-Object { $_.Name -eq "Part Number"}
$mPartNumProp.Value = "" #delete the value to get the new number
$mProp = $mRouteProps | Where-Object { $_.Name -eq "Description"}
$mProp.Value = $UIString["MSDCE_BOMType_00"] + " " + $UIString["LBL42"]
}
$mRunComponents = @()
$mRunComponents = $dsWindow.DataContext.RunComponents
$mRunComponents | ForEach-Object {
$mRunCompProps = $_.Properties.Properties
$mTitleProp = $mRunCompProps | Where-Object { $_.Name -eq "Title"}
$m_StockProp = $mRunCompProps | Where-Object { $_.Name -eq "Stock Number"}
$mTitleProp.Value = $UIString["LBL43"]
}
}
We are using:
Inventor 2022.3
Vault Professional 2022.3
VDS 2022.3 with our modifications
I have recorded video how Tube and Pipe module interact with VDS and the only problem is wrong Part Number for routing parts:
Thnx,
Goran
Solved! Go to Solution.
Solved by Markus.Koechl. Go to Solution.
Hi Goran,
Reviewing the code (I know the author of it :)), I think that you simply miss the line to drive the Part Number also for run components. My newer sample code below adds the part number but also the pipe length; you could remove if not needed:
$mRunComponents | ForEach-Object {
$mRunCompProps = $_.Properties.Properties
$mTitleProp = $mRunCompProps | Where-Object-Object { $_.Name -eq "Title" }
$m_StockProp = $mRunCompProps | Where-Object-Object { $_.Name -eq "Stock Number" }
$mTitleProp.Value = $UIString["LBL43"]
$mPartNumProp = $mRunCompProps | Where-Object-Object { $_.Name -eq "Part Number" }
$m_PL = $mRunCompProps | Where-Object-Object { $_.Name -eq "PL" }
$mPartNumProp.Value = $m_StockProp.Value + " - " + $m_PL.Value
}
Reviewing the video, I see another issue. Your setup pulls Vault numbers on file creation (T&P setting) and again on Save (VDS). I recommend turning off pulling file numbers before saving. If you have good reasons for doing it upfront then the VDS configuration should be changed to apply a "None" scheme for all T&P files.
Hi Goran,
Reviewing the code (I know the author of it :)), I think that you simply miss the line to drive the Part Number also for run components. My newer sample code below adds the part number but also the pipe length; you could remove if not needed:
$mRunComponents | ForEach-Object {
$mRunCompProps = $_.Properties.Properties
$mTitleProp = $mRunCompProps | Where-Object-Object { $_.Name -eq "Title" }
$m_StockProp = $mRunCompProps | Where-Object-Object { $_.Name -eq "Stock Number" }
$mTitleProp.Value = $UIString["LBL43"]
$mPartNumProp = $mRunCompProps | Where-Object-Object { $_.Name -eq "Part Number" }
$m_PL = $mRunCompProps | Where-Object-Object { $_.Name -eq "PL" }
$mPartNumProp.Value = $m_StockProp.Value + " - " + $m_PL.Value
}
Reviewing the video, I see another issue. Your setup pulls Vault numbers on file creation (T&P setting) and again on Save (VDS). I recommend turning off pulling file numbers before saving. If you have good reasons for doing it upfront then the VDS configuration should be changed to apply a "None" scheme for all T&P files.
Reviewing the code (I know the author of it :)),
😁
Yes, I know that this is original part of the code for T&P but this doesn't suit for us because we use "Stock Number" field as manufacturer Catalog Number from our own Content Center database and this is important because it is automatically transferred from Vault to ERP...and also Part Number...
Part Number is, basically, our Numbering scheme.
Part Number is everything for us. Our ERP is also driven on Vault Numbering Scheme.
So, the only way that we get Part Number field as we use file name numbering scheme which we enable T&P settings...but, as you can see, there another problem from it.
When i "clear" Part Number from code we get empty Part Number field. I have try every possible solution that i get on my mind 😕
Thnx,
Goran
Reviewing the code (I know the author of it :)),
😁
Yes, I know that this is original part of the code for T&P but this doesn't suit for us because we use "Stock Number" field as manufacturer Catalog Number from our own Content Center database and this is important because it is automatically transferred from Vault to ERP...and also Part Number...
Part Number is, basically, our Numbering scheme.
Part Number is everything for us. Our ERP is also driven on Vault Numbering Scheme.
So, the only way that we get Part Number field as we use file name numbering scheme which we enable T&P settings...but, as you can see, there another problem from it.
When i "clear" Part Number from code we get empty Part Number field. I have try every possible solution that i get on my mind 😕
Thnx,
Goran
OK, I got the point why it makes sense to have the file number for the run component. But you misunderstood that you could use my code 1:1. I had intended to demonstrate filling the Part Number. So, the rule for your objective could look like this:
$mRunComponents | ForEach-Object {
$mRunCompProps = $_.Properties.Properties
$mTitleProp = $mRunCompProps | Where-Object { $_.Name -eq "Title" }
#$m_StockProp = $mRunCompProps | Where-Object { $_.Name -eq "Stock Number" }
$mTitleProp.Value = $UIString["LBL43"]
$mPartNumProp = $mRunCompProps | Where-Object { $_.Name -eq "Part Number" }
$mDocNumProp = $mRunCompProps | Where-Object { $_.Name -eq "DocNumber" }
#$m_PL = $mRunCompProps | Where-Object { $_.Name -eq "PL" }
$mPartNumProp.Value = ($mDocNumProp.Value).Replace(".ipt", "")
}
For the video below, I also pre-set the numbering to "None"; two changes are required for it: within the GetNumSchems function:
If ($dsWindow.Name -eq "InventorPipingWindow") {
return $_FilteredNumSchems
#return $_Default
}
And within the TubeAndPipe.xaml file, change the Selected Index from 0 to 1:
<ComboBox x:Name="NumSchms" DisplayMemberPath="Name" SelectedIndex="1"
....
OK, I got the point why it makes sense to have the file number for the run component. But you misunderstood that you could use my code 1:1. I had intended to demonstrate filling the Part Number. So, the rule for your objective could look like this:
$mRunComponents | ForEach-Object {
$mRunCompProps = $_.Properties.Properties
$mTitleProp = $mRunCompProps | Where-Object { $_.Name -eq "Title" }
#$m_StockProp = $mRunCompProps | Where-Object { $_.Name -eq "Stock Number" }
$mTitleProp.Value = $UIString["LBL43"]
$mPartNumProp = $mRunCompProps | Where-Object { $_.Name -eq "Part Number" }
$mDocNumProp = $mRunCompProps | Where-Object { $_.Name -eq "DocNumber" }
#$m_PL = $mRunCompProps | Where-Object { $_.Name -eq "PL" }
$mPartNumProp.Value = ($mDocNumProp.Value).Replace(".ipt", "")
}
For the video below, I also pre-set the numbering to "None"; two changes are required for it: within the GetNumSchems function:
If ($dsWindow.Name -eq "InventorPipingWindow") {
return $_FilteredNumSchems
#return $_Default
}
And within the TubeAndPipe.xaml file, change the Selected Index from 0 to 1:
<ComboBox x:Name="NumSchms" DisplayMemberPath="Name" SelectedIndex="1"
....
yes, yes, yes, that's complete solution. I have tried with "reusing" DocNumber as Part Number but I have missed those 3 next steps.
Thnx @Markus.Koechl as always 😊
Goran
yes, yes, yes, that's complete solution. I have tried with "reusing" DocNumber as Part Number but I have missed those 3 next steps.
Thnx @Markus.Koechl as always 😊
Goran
Hi @Markus.Koechl,
did something changed in Vault 2022.4 because after we upgraded Vault clients to 2022.4 (and Inventor to 2022.4) "Generate File Numbers" window doesnt apeare anymore for all users when using Inventors Tube and Pipe and also on Frame Generator.
If i disable VDS than it is apearing, enable VDS and doesnt apeare anymore.
Thank you,
Goran
Hi @Markus.Koechl,
did something changed in Vault 2022.4 because after we upgraded Vault clients to 2022.4 (and Inventor to 2022.4) "Generate File Numbers" window doesnt apeare anymore for all users when using Inventors Tube and Pipe and also on Frame Generator.
If i disable VDS than it is apearing, enable VDS and doesnt apeare anymore.
Thank you,
Goran
Hi @Markus.Koechl ,
basically, it is not new topic because this topic configuration stop working after we upgrade to 2022.4. It is also escalated to FG function so that is for new topic.
I have installed on cleaned windows fresh installation of Vault and Inventor 2022.4 with out-of-box VDS and it has same behaviour.
VDS enabled - no Vault Part number window,
VDS disabled - Vault Part Number window working.
I have recorded with this topic configuration to show behaviour, but i can also record with fresh installation of Inventor/Vault/VDS 2022.4 that has same behaviour.
Not on my pc, on all pcs in company (over 60)
We must have Part Number dialog because we use Part Numbers generated from Vault to be master of overall ERP-PDM integration. It is work for 8 months perfectly as it is programmed, but now it doesn’t anymore 😕
Do you have any clue what is happened here?
I have attached video to see it.
Thank you.
Goran
Hi @Markus.Koechl ,
basically, it is not new topic because this topic configuration stop working after we upgrade to 2022.4. It is also escalated to FG function so that is for new topic.
I have installed on cleaned windows fresh installation of Vault and Inventor 2022.4 with out-of-box VDS and it has same behaviour.
VDS enabled - no Vault Part number window,
VDS disabled - Vault Part Number window working.
I have recorded with this topic configuration to show behaviour, but i can also record with fresh installation of Inventor/Vault/VDS 2022.4 that has same behaviour.
Not on my pc, on all pcs in company (over 60)
We must have Part Number dialog because we use Part Numbers generated from Vault to be master of overall ERP-PDM integration. It is work for 8 months perfectly as it is programmed, but now it doesn’t anymore 😕
Do you have any clue what is happened here?
I have attached video to see it.
Thank you.
Goran
Can't find what you're looking for? Ask the community or share your knowledge.