Hi @DIMCWPDR. Thanks for posting the files to test with. Things got busy where I work, so I had to do some other things for a while, before working on this challenge. But I think I have an iLogic rule that will work OK for you. The biggest challenge here is that we had to use different strategies for different views. The 'Front' view we were able to just use the 'Auto' tools on. But the 'Side' / Projected view, we had to do things the hard way, to only add a centerline to the one main cylinder, without adding them to all the other holes. The code for creating that one centerline may look a little complicated, but it seems to be working in my tests.
However, some preparation was needed in the model document first. The part file already had two named entities in it, so I deleted those two, then assigned just one name to the outermost cylinder face of the whole part, and named it "Outside Cylinder Face". I avoided naming any of the others, because the others may come and go with variations of the part, and simply do not need to be named to make this work. You can name that face in your template part, then it should perpetuate to new parts made from it. And other existing parts that you want to use this code on their drawings, just name that same face with the same name, then save that model file, before using this code on their drawings.
Dim oACS As AutomatedCenterlineSettings = ThisDrawing.Document.DrawingSettings.AutomatedCenterlineSettings
oACS.ApplyToCircularPatterns = True
oACS.ApplyToCylinders = True
oACS.ApplyToHoles = True
oACS.ApplyToRevolutions = True
oACS.ProjectionNormalAxis = True
oACS.ProjectionParallelAxis = True
Dim oSheet As Sheet = ActiveSheet.Sheet
For Each oView As DrawingView In oSheet.DrawingViews
If oView.ViewType = DrawingViewTypeEnum.kProjectedDrawingViewType Then
'its a projected view (like side view), so only create one centerline using iLogic
'get model document being referenced by this view
Dim oViewDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument
'get named face from model
Dim oNamedFace As Face = iLogicVb.Automation.GetNamedEntities(oViewDoc).TryGetEntity("Outside Cylinder Face")
If oNamedFace Is Nothing Then Continue For
'get geometry of named face that is in this view
Dim oViewGeomForNamedFace As DrawingCurvesEnumerator
Try : oViewGeomForNamedFace = oView.DrawingCurves(oNamedFace) : Catch : End Try
If oViewGeomForNamedFace Is Nothing OrElse oViewGeomForNamedFace.Count <> 4 Then Continue For
Dim oGeomInt1, oGeomInt2 As GeometryIntent
oGeomInt1 = oSheet.CreateGeometryIntent(oViewGeomForNamedFace.Item(3))
oGeomInt2 = oSheet.CreateGeometryIntent(oViewGeomForNamedFace.Item(4))
ActiveSheet.Centerlines.AddBisector("Outside Cylinder Centerline", oGeomInt1, oGeomInt2)
Else 'it is base view, so create all centermarks & centerlines using 'auto' tools
Dim oObjs As ObjectsEnumerator = oView.SetAutomatedCenterlineSettings(oACS)
End If
Next
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)