Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

An option to re-enable all disabled parts

An option to re-enable all disabled parts

I love the ability to toggle between "Enabled" and "Disabled" when working in assemblies. It's much easier than just toggling visibility, but a huge frustration is that I have to search through the model browser and re-enable all of them one by one. I would love to see a "Re-Enable All disabled Parts" option. There already is something similar in place for isolated parts.

2 Comments
brandont3LGPE
Observer

Please add this! It's insanely frustrating trying to find a few un-enabled parts in a browser with hundreds, if not 1000+ parts/assemblies. Sometimes i just need to be able to see behind and select behind a component. Transparent only allows seeing, i can't select and measure through.

Unchecking "enabled" allows me to do my work, but then I must search the browser tree to find the parts. 

"RE-Enable ALL disabled parts" or being able to CTRL+Select or SHIFT+ Select would help tremendously. 

nbonnett-murphy
Advocate

Here's an iLogic rule that I cobbled together that will reenable all disabled components and parts in an assembly.

 

Sub main()
Dim asmDoc As AssemblyDocument = ThisApplication.ActiveDocument

' Call the function that traverses the assembly and sets the visibility.
Call reEnable(asmDoc.ComponentDefinition.Occurrences)

End Sub

Private Sub reEnable(Occurrences As ComponentOccurrences)
	' Iterate through each of the occurrences in the collection provided.
	Dim occ As ComponentOccurrence
	For Each occ In Occurrences
		If (occ.Enabled <> True) Then 'check if disabled
			Logger.Info("{0} is disabled, toggling.", occ.Name)
			occ.Enabled = True 'reenable
			'occ.Enabled = Not occ.Enabled 'Optional toggle for whatever reason. 
		End If

		' If this occurrence is a subassembly, recursively call this
		' function to traverse through the subassembly.
		If occ.DefinitionDocumentType = kAssemblyDocumentObject Then
			Call reEnable(occ.SubOccurrences)
		End If
	Next
End Sub

 

Thanks to @ekinsb here for the self referencing sub that iterates through assembly trees.

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

Submit Idea  

Autodesk Design & Make Report