Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data Standard 2022 and Inventor Tube and Pipe Part Numbers

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Goran.Kis.
664 Views, 8 Replies

Data Standard 2022 and Inventor Tube and Pipe Part Numbers

Goran.Kis.
Enthusiast
Enthusiast

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

0 Likes

Data Standard 2022 and Inventor Tube and Pipe Part Numbers

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

Labels (3)
8 REPLIES 8
Message 2 of 9
Markus.Koechl
in reply to: Goran.Kis.

Markus.Koechl
Autodesk
Autodesk

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.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes

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.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 3 of 9
Goran.Kis.
in reply to: Markus.Koechl

Goran.Kis.
Enthusiast
Enthusiast

Hi @Markus.Koechl 

 


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

0 Likes

Hi @Markus.Koechl 

 


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

Message 4 of 9
Markus.Koechl
in reply to: Goran.Kis.

Markus.Koechl
Autodesk
Autodesk
Accepted solution

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"
....

 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe

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"
....

 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 5 of 9
Goran.Kis.
in reply to: Markus.Koechl

Goran.Kis.
Enthusiast
Enthusiast

Hi @Markus.Koechl 

 

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

0 Likes

Hi @Markus.Koechl 

 

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

Message 6 of 9
Goran.Kis.
in reply to: Goran.Kis.

Goran.Kis.
Enthusiast
Enthusiast

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

0 Likes

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

Message 7 of 9
Markus.Koechl
in reply to: Goran.Kis.

Markus.Koechl
Autodesk
Autodesk
Hi Goran, your latest question looks like a new topic, right?
Anyway - I tested 2022.4 and see that the default numbering dialog on the new file event appears in any case. With VDS active, this dialog should be suppressed to avoid multiple numbers consumed on each part. So, yes, I fear we have a regression, but I am not sure we see the same behavior.


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes

Hi Goran, your latest question looks like a new topic, right?
Anyway - I tested 2022.4 and see that the default numbering dialog on the new file event appears in any case. With VDS active, this dialog should be suppressed to avoid multiple numbers consumed on each part. So, yes, I fear we have a regression, but I am not sure we see the same behavior.


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 8 of 9
Goran.Kis.
in reply to: Markus.Koechl

Goran.Kis.
Enthusiast
Enthusiast

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

 

0 Likes

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

 

Message 9 of 9
Markus.Koechl
in reply to: Goran.Kis.

Markus.Koechl
Autodesk
Autodesk
As stated before: I confirm that we have a regression regarding numbering in 2022.4. Your workflow is customized, and we need to elaborate offline on the specific customization to be included in a fix. I sent a private message about how to proceed.


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes

As stated before: I confirm that we have a regression regarding numbering in 2022.4. Your workflow is customized, and we need to elaborate offline on the specific customization to be included in a fix. I sent a private message about how to proceed.


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report