Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HELP!How to change color that the "Interference Analyze" tool identifies with

1 REPLY 1
Reply
Message 1 of 2
Anonymous
466 Views, 1 Reply

HELP!How to change color that the "Interference Analyze" tool identifies with

Hi all,

 

I was wondering if someone knows how to change the color that the "Interference Analyze" tool identifies with??

 

I recently converted from 2010 to Inventor 2011 Pro. 2010 had a Dark Translucent Red which was extremely helpful. 2011 has a Light Translucent Red which is extremely difficult to make out ( I have a massive assembly). Identifying these fouls/interferences is vital to my job.

 

I tried Styles Editor, View Styles, Application/Document Settings, and even part manipulation! (bah!)

 

You have know Idea how much I would appreciate the help.

 

Please let me know if you have questions.

 

Thanks in advance!

 

OJ

HII-NNS

1 REPLY 1
Message 2 of 2
jdkriek
in reply to: Anonymous

The following iLogic code from Curtis Waguespack is what I like to use

 

Sub Main
Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument

Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = oAsmDoc.ComponentDefinition

' Add each occurrence in the assembly to the object collection.
Dim oCheckSet As ObjectCollection
oCheckSet= ThisApplication.TransientObjects.CreateObjectCollection
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmCompDef.Occurrences
oCheckSet.Add (oOcc)
Next

' Call the AnalyzeInterference method, passing in a single
' collection. This will cause it to compare everything against
' everything else.
Dim oResults As InterferenceResults
oResults = oAsmCompDef.AnalyzeInterference(oCheckSet)

' Display the results of the interference.
MessageBox.Show(oResults.Count & " Interferences found ","iLogic")

Dim oResult As InterferenceResult
Dim iCount As Integer
iCount = 0
For Each oResult In oResults
iCount = iCount + 1
Component.Color(FullOccurrenceName(oResult.OccurrenceOne)) = "Yellow"
Component.Color(FullOccurrenceName(oResult.OccurrenceTwo)) = "Magenta"
MessageBox.Show("     " & FullOccurrenceName(oResult.OccurrenceOne) & "      (colored yellow)" _
& vbLf & "interferes with " _
& vbLf & "     " & FullOccurrenceName(oResult.OccurrenceTwo) & "      (colored magenta)" _
& vbLf & "" _
& vbLf & "Volume: " & Round(oResult.Volume,5) & " cm^3", _
" Interference "& iCount)
Component.Color(FullOccurrenceName(oResult.OccurrenceOne)) = "As Material"
Component.Color(FullOccurrenceName(oResult.OccurrenceTwo)) = "As Material"

Next

End Sub

' Used to display the full path of an occurrence. This is the path of the
' occurrence within the assembly structure.
Private Function FullOccurrenceName(Occ As ComponentOccurrence) As String
Dim i As Integer
For i = 1 To Occ.OccurrencePath.Count
FullOccurrenceName = Occ.OccurrencePath.Item(i).Name
Next
End Function

 

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


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

Post to forums  

Autodesk Design & Make Report