'Rebuild All' through all subassemblies to correct branches (Tube and Pipe)

'Rebuild All' through all subassemblies to correct branches (Tube and Pipe)

gcoombridge
Advisor Advisor
820 Views
1 Reply
Message 1 of 2

'Rebuild All' through all subassemblies to correct branches (Tube and Pipe)

gcoombridge
Advisor
Advisor

Hi All,

 

(Inventor Professional 2017.4.2)

 

I'm having a persistent problem with tube and pipe branch fittings not updating when equipment is moved in the top level assembly. Runs/Routes adapt but the branch fittings attached to them remain in position. This is occurring for a variety of branch types from ones I have authored to CC standard sockolets etc... They can be prompted to move by opening the offending run and clicking 'rebuild all' but this has to be done in each run subassembly. The same result can be obtained by setting the connection of the branch fitting to user defined '0' but this takes longer as each connection has to be adjusted.

 

Needless to say this is annoying and not very parametric behavior!

 

Adrian Salariu covered this type of issue in this idea station:

https://forums.autodesk.com/t5/inventor-ideas/tube-amp-pipe-050-move-fittings-with-equipment/idi-p/7...

 

What I'm interested in (unless the problem is about to be resolved by Autodesk) is an Ilogic method of rebuilding all runs from the top level tube and pipe assembly so each run does not have to be individually updated. The standard rebuild all command does not seem to penetrate these sub-assemblies.

 

Thanks in advance...

 

Glenn

 

Use iLogic Copy? Please consider voting for this long overdue idea (not mine):https://forums.autodesk.com/t5/inventor-ideas/string-replace-for-ilogic-design-copy/idi-p/3821399
0 Likes
821 Views
1 Reply
Reply (1)
Message 2 of 2

Jon.Balgley
Alumni
Alumni

I'm not an expert on Tube & Pipe, but maybe you can utilize the following sample.  Make it a rule in the top-level assembly.  When you run it, it will find all the subassemblies, and sub-subassemblies, etc., until it gets to the lowest-level assembly.  Then it will execute the code at the end of the "doit".  When it's finished with that, it returns "up" the next-lowest assembly, and finishes the "doit" execution there.  I.e., it is a depth-first "walk" through the entire assembly structure.  Note that if you have multiple occurrences of the same IAM file, it will re-execute on each occurrence.  

 

Hope this helps.  

 

  

 

SyntaxEditor Code Snippet

Sub Main
	Dim aDoc As AssemblyDocument = ThisDoc.Document 
	doit(aDoc)
End Sub

Sub doit (aDoc As AssemblyDocument)

	Dim acd = aDoc.ComponentDefinition

	For Each occ As ComponentOccurrence In acd.Occurrences
		If occ.DefinitionDocumentType = kAssemblyDocumentObject Then
			doit(occ.Definition.Document)
		End If
	Next occ 
	
	MessageBox.Show(aDoc.FullDocumentName)
	'Not sure if this is sufficient.
	InventorVb.DocumentUpdate(False)

End Sub

 


Jon Balgley
0 Likes