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")
End If


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

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

photo credit: Chatsy POP.H chain (license)

No comments:

Post a Comment