iLogic, iProperties, Tube and Pipe and Vault

iLogic, iProperties, Tube and Pipe and Vault

swalton
Mentor Mentor
286 Views
5 Replies
Message 1 of 6

iLogic, iProperties, Tube and Pipe and Vault

swalton
Mentor
Mentor

I'd like to control various iProperties in my flexible conduit route parts using iLogic.  My main goal is to set the description iprop to "Material" x "length".   I'm not able to use iProp formulas because of our Vault iProp mapping. 

 

Is it possible to add iLogic to each 3d swept part template or do I need to add the code to the piping runs.iam?  I believe the swept part geometry is controlled by the Content Center family and I'm not sure if I can include iLogic in those parts.

Steve Walton
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Inventor 2025
Vault Professional 2025
0 Likes
287 Views
5 Replies
Replies (5)
Message 2 of 6

A.Acheson
Mentor
Mentor

Hi @swalton 

As far as I'm aware the templates for T&P runs come from internal templates not accessible to us. Any iprop changes will need to be run externally at the end of your modelling. 

The only one that is accessible is the master T&P assembly where you would load in the route styles to use. I personally prefer having no code in the templates as it becomes an issue if you decide to change the process and you have legacy code every where. 

 

Can you share where you currently pick up this info in the part file and if you need to  specifically identify this part type? 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 6

marcin_otręba
Advisor
Advisor

hi,

 

what do you mean by:  I'm not able to use iProp formulas because of our Vault iProp mapping. ?

i normally use formulas and vault together without issues.

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 4 of 6

swalton
Mentor
Mentor

We are looking to concatenate Material, Stock Number, and the parameter/iprop into the Description iprop for any liquidtight conduit runs.  We need a different set of data for our hydraulic hose routes.  I could see adding a recursive rule to the piping runs.iam for either type of run, but I'm not sure if I need different template .iam files or if the rule has to branch depending on the run type.

 

An other choice would be external rules that the modeler has to link to the different types of runs to generate the required iprops.

 

Any best practices or recommendations for the way forward?

 

 

Steve Walton
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Inventor 2025
Vault Professional 2025
0 Likes
Message 5 of 6

swalton
Mentor
Mentor

We set up the Vault Iprop mapping for Description to be 2-way.  I can edit the value in Inventor or Vault and the last one wins. 

 

It's been a few releases since we tested the workflow, but it used to be that Vault read the iprop text, not the formula.  It was fine when a part was checked in.  Copy-Designed or iProp edited parts would preserve the text string and silently erase the iprop formula.  If we included a plate thickness value in a part description it would be static and not vary as the actual part thickness changed.

Steve Walton
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Inventor 2025
Vault Professional 2025
0 Likes
Message 6 of 6

A.Acheson
Mentor
Mentor

Hi @swalton 

Many avenues to take, my personal one with what you describe is to filter the occurrences based on your criteria and customize the iproperties as you need. This rule identifies the runs and renames them. You can comment in or out out this as you need. I turned it off for now but you can see the structure needed. Any help needed just ask. 

Sub Main()

	Dim asmDef As AssemblyComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition
	For Each occ As ComponentOccurrence In asmDef.Occurrences.AllReferencedOccurrences(asmDef)  
		
		Dim occDoc As Document = occ.Definition.Document
		
		Dim bIsRunDocument As Boolean = occDoc.DocumentInterests.HasInterest("Piping Runs Environment")
	
		If bIsRunDocument = False Then Continue For
		'Logger.Info(occDoc.FullFileName)
		RenameRun (occDoc)
	Next
	
End Sub	
				
'Rename the T&P Runs when passing in the Main Tube and Pipe Run Assembly Document
Private Sub RenameRun (occDoc)

	'[ create list of runs
	Dim asmDef As AssemblyComponentDefinition = occDoc.ComponentDefinition
	Dim runList As New List(Of String)
	Dim runOccs As New List(Of ComponentOccurrence)
	
	For Each occ As ComponentOccurrence In asmDef.Occurrences.AllReferencedOccurrences(asmDef)  
		
		occDoc = occ.Definition.Document
		
		Dim bIsRunDocument As Boolean = occDoc.DocumentInterests.HasInterest("Piping Run Environment")
		If bIsRunDocument = False Then Continue For
		'If occ.Name = "Assembly Fittings" Or occ.Name.Contains("STD")Then Continue For
		runOccs.Add(occ)
		runList.Add(occ.Name)	
	Next
	runList.Sort	
	d0 = InputListBox("Prompt", runList, d0, Title := "Title", ListName := "List")

	For Each occ As ComponentOccurrence In runOccs
		
		occDoc = occ.Definition.Document
		
		'[Renaming occurrences
'		Dim index As Integer = occ.Name.LastIndexOf(":")
'		If Not index = -1 Then
'			multiSpoolName = Left(occ.Name, index)
'		Else
'			multiSpoolName = occ.Name
'		End If
']
			Dim oDTP As PropertySet = occDoc.PropertySets.Item("Design Tracking Properties")
			Dim oSP As PropertySet = occDoc.PropertySets.Item("Inventor Document Summary Information")
'			oDTP.Item("Part Number").Value = multiSpoolName
'			oDTP.Item("Description").Value = multiSpoolName
'			oSP.Item("Category").Value = "SPOOL"
		
		Dim multiOccs As ComponentOccurrencesEnumerator = asmDef.Occurrences.AllReferencedOccurrences(occ.Definition.Document)
		If multiOccs.Count > 1 Then
				
			For Each occ1 In multiOccs
				
				'If occ1.Name.Contains("SP") Or occ1.Name.Contains("VP")Then Continue For
				If Not occ1 Is multiOccs.Item(1) Then
					'Logger.Info(occ.Name)
					If occ1.Name.Contains("Run") Then
						occ1.Name = multiOccs.Item(1).Name & ":" & multiOccs.Count
					End If
				End If
			Next
		Else
			'[Renaming occurrences
'			If occ.Name.Contains("Run") Then
'				occ.Name = Replace(occ.Name,"Run ","SP")
'			End If
']
		End If
		'runList.Add(occNewName)	
Next

End Sub

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes