Thursday, 6 April 2017

Break all cross-part sketch projections

Short and sweet: How to Break Link on cross-part projections for all occurrences in an assembly.




I have mine disabled and I don't create cross-part references. that will slow inventor to a halt, especially on large assemblies.

When you change to Modeling View inside assembly you can select and delete more than one links at a time but only if they are part of the same sketch

Here is the ilogic code used to break adaptivity. Please run this code from an Assembly, internal or external rule

----------------------------------
Dim oAsmDoc As Document 
oAsmDoc = ThisApplication.ActiveDocument

If oAsmDoc.DocumentType <> kAssemblyDocumentObject Then
    MessageBox.Show("Run this rule from an assembly!", "iLogic")
    Return
End If

i=0

For Each oDoc As Document In oAsmDoc.AllReferencedDocuments
 Try 
  If oDoc.ModelingSettings.AdaptivelyUsedInAssembly = True Then
   oDoc.ModelingSettings.AdaptivelyUsedInAssembly = False
   i += 1
  End If
 Catch
 End Try
Next

MessageBox.Show("Turned off adaptivity for " & i & " documents!", "iLogic")
----------------------------------
Please see the screencast example here:
Thanks.
ADS


photo credit: Chatsy POP.H chain (license)