Hi @chandra.shekar.g,
your code for checking all holes is really a time saver. The axis are very good to see the alignment. If the holes are in red or green and with a number with the clientgraphis this would improve the process to find it.
Public Sub SetFaceColor()
Dim partDoc As PartDocument
Set partDoc = ThisApplication.ActiveDocument
' Check to see if the client graphics already exist and delete them if they do.
On Error Resume Next
Dim graphics As ClientGraphics
Set graphics = partDoc.ComponentDefinition.ClientGraphicsCollection.Item("ColorTest")
If Err.Number = 0 Then
graphics.Delete
ThisApplication.ActiveView.Update
Exit Sub
End If
On Error GoTo 0
Dim selectedFace As face
Set selectedFace = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Select a face")
' They don't exist so create them.
Set graphics = partDoc.ComponentDefinition.ClientGraphicsCollection.Add("ColorTest")
Dim node As GraphicsNode
Set node = graphics.AddNode(1)
' Create surface graphics using the selected face.
Dim surfGraphics As SurfaceGraphics
Set surfGraphics = node.AddSurfaceGraphics(selectedFace)
' Set the priority so that it will display on top of the real face.
surfGraphics.DepthPriority = 3
' Define the color using rgb values.
surfGraphics.Color = ThisApplication.TransientObjects.CreateColor(255, 10, 10, 1)
' Refresh the view.
ThisApplication.ActiveView.Update
End Sub
http://modthemachine.typepad.com/my_weblog/2012/03/clientgraphics-text-on-each-planar-face.html
http://modthemachine.typepad.com/my_weblog/2012/03/surfacegraphics-select-primitives.html

At the end there should be a table with all aligned holes. Is it possible to find holes which are not alignet in a radius from 1mm to other holes?
The table could be a text-file or ClientGraphicsText.
Public Sub ClientGraphicsText()
' Set a reference to the document. This will work with
' either a part or assembly document.
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
' Set a reference to the component definition.
Dim oCompDef As ComponentDefinition
Set oCompDef = oDoc.ComponentDefinition
' Attempt to get the existing client graphics object. If it exists
' delete it so the rest of the code can continue as if it never existed.
Dim oClientGraphics As ClientGraphics
On Error Resume Next
Set oClientGraphics = oCompDef.ClientGraphicsCollection.Item("Text Test")
If Err.Number = 0 Then
oClientGraphics.Delete
End If
On Error GoTo 0
ThisApplication.ActiveView.Update
' Create a new ClientGraphics object.
Set oClientGraphics = oCompDef.ClientGraphicsCollection.Add("Text Test")
' Create a graphics node.
Dim oNode As GraphicsNode
Set oNode = oClientGraphics.AddNode(1)
' Create text graphics.
Dim oTextGraphics As TextGraphics
Set oTextGraphics = oNode.AddTextGraphics
' Set the properties of the text.
oTextGraphics.Text = "This is the sample text. 123"
oTextGraphics.Anchor = ThisApplication.TransientGeometry.CreatePoint(0, 0, 0)
oTextGraphics.Bold = True
oTextGraphics.Font = "Arial"
oTextGraphics.FontSize = 40
oTextGraphics.HorizontalAlignment = kAlignTextLeft
oTextGraphics.Italic = True
Call oTextGraphics.PutTextColor(0, 255, 0)
oTextGraphics.VerticalAlignment = kAlignTextMiddle
' Update the view to see the text.
ThisApplication.ActiveView.Update
End Sub
If System.IO.File.Exists("c:\Temp\Bohrungen.txt") Then
System.IO.File.Delete("c:\Temp\Bohrungen.txt")
End If
Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem.OpenTextFileWriter("c:\Temp\Bohrungen.txt", True)
..........................
..........................
If Math.Round(dia1, 4) = Math.Round(dia2, 4) Then
Debug.Print("Hole diameter of plate 1 = " & dia1 & " compared with Hole diameter of plate 2 = " & dia2 & " => OK - Default")
file.WriteLine("Hole diameter of plate 1 = " & "Ø" & dia1 & " - " & oHoleFeature1.ExtendedName & " compared with Hole diameter of plate 2 = " & "Ø" & dia2 & " - " & oHoleFeature2.ExtendedName & " => OK - Default")
ElseIf Math.Round(dia1, 4) >= Math.Round(dia2, 4) And Math.Round(dia1, 4) <= Math.Round(dia2, 4) + 0.5 Then
Debug.Print("Hole diameter of plate 1 = " & dia1 & " compared with Hole diameter of plate 2 = " & dia2 & " => OK - Special Type")
file.WriteLine("Hole diameter of plate 1 = " & "Ø" & dia1 & " - " & oHoleFeature1.ExtendedName & " compared with Hole diameter of plate 2 = " & "Ø" & dia2 & " - " & oHoleFeature2.ExtendedName & " => OK - Special Type")
Else
Debug.Print("Hole diameter of plate 1 = " & dia1 & " compared with Hole diameter of plate 2 = " & dia2 & " => Not OK")
file.WriteLine("Hole diameter of plate 1 = " & "Ø" & dia1 & " - " & oHoleFeature1.ExtendedName & " compared with Hole diameter of plate 2 = " & "Ø" & dia2 & " - " & oHoleFeature2.ExtendedName & " => Not OK")
End If
m_Inventor.StatusBarText = "Ausgabe in c:\Temp\Bohrungen.txt"
file.Close()
Process.Start("c:\Temp\Bohrungen.txt"
To check all the hole variations is very complex. How could I check if there is any srew or pin etc. in the hole and get the name? Do I need to use the AnalyzeInterference or is there any other possibility?
https://forums.autodesk.com/t5/inventor-customization/collision-tapped-holes-and-srews/m-p/6493440#M...
Georg