Quick Question: Removing Occurrence number on all Parts and Assemblies

Quick Question: Removing Occurrence number on all Parts and Assemblies

Anonymous
Not applicable
734 Views
5 Replies
Message 1 of 6

Quick Question: Removing Occurrence number on all Parts and Assemblies

Anonymous
Not applicable

As the title says I am trying to remove the occurrence number that displays in the assembly hierarchy without having to go to each part/assembly and removing them manually in the Properties - Occurrence and changing the name.  Is there an option I can toggle off or any other way I can remove this?

Capture.PNG

 

0 Likes
Accepted solutions (1)
735 Views
5 Replies
Replies (5)
Message 2 of 6

swalton
Mentor
Mentor
Accepted solution

I don't think that there is an out-of-the-box setting for removing the occurrence number in an assembly.

 

I'd look at a custom iLogic rule to remove it.

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
Message 3 of 6

Anonymous
Not applicable

I looked everywhere and noticed the same thing.  Thank you for the quick reply

0 Likes
Message 4 of 6

machiel.veldkamp
Collaborator
Collaborator

Just curious though... why would you want that?

 

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

___________________________
0 Likes
Message 5 of 6

Anonymous
Not applicable

It is something the clients wants. I am updated models of PLETS, PLEMS, ILS, etc. with a new hierarchy and names of valves, pipes, etc to match the clients database. I am sending them a STEP file from Inventor where they will load it up in Max. For the database to match the models, they wanted the :1, :2, :3, etc removed in order for the models to match exactly what their database shows. The whole purpose is all these models are going into a new program where you are able to see an entire subsea field with fully rendered 3D models where you can go and identify different components, reroute lines, etc.

0 Likes
Message 6 of 6

machiel.veldkamp
Collaborator
Collaborator

I think you are in bad luck sir, I think the occurrences need to be unique.

 

Sub main()
	' set a reference to the assembly component definintion.
	' This assumes an assembly document is open.
	Dim oAsmCompDef As AssemblyComponentDefinition
	oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition

	'Iterate through all of the occurrences
	Dim oOccurrence As ComponentOccurrence
	For Each oOccurrence In oAsmCompDef.Occurrences
		
		oName = oOccurrence.Name
		oNameArray = Split(oName, ":")
		oName = oNameArray(0)
		Try
			oOccurrence.Name = oName
		Catch
		End Try
	Next
End Sub

I tried this on a smaller assembly and it will remove all comments  ": xx" from the name as long as they are unique.

As soon as the occurence already occurs it will catch an exeption and move on to the next one.

 

So if your model contains ONLY unique files. GREAT! This code will solve your problem.

At least 1 double file and well....

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

___________________________