Hello @WCrihfield
My I ask for your assistance in placing 3D leader annotations to a specific feature? I have a number of features and each require an annotation to better differentiate. The code I have placed below works only if you have a command manager that prompts the face of where the leader should be. I want to set the code up that it points to Revolved feature 1 or 2 or 3, you get the idea.
Would you be able to assist me considering you have managed this already?
Dim oDoc As Inventor.PartDocument = ThisDoc.Document
Dim oDef As Inventor.PartComponentDefinition = oDoc.ComponentDefinition
Dim oTG As Inventor.TransientGeometry = ThisApplication.TransientGeometry
Dim oRepMan As Inventor.RepresentationsManager = oDef.RepresentationsManager
Dim oDesignViewReps As Inventor.DesignViewRepresentations = oRepMan.DesignViewRepresentations
Dim oFace As Inventor.Face = Feature.IsActive("Revolved Feature1")
Dim oAnnoPlaneDef As Inventor.AnnotationPlaneDefinition = oDef.ModelAnnotations.CreateAnnotationPlaneDefinitionUsingPlane(oDef.WorkPlanes(2))
Dim oLeaderPoints As Inventor.ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection
oLeaderPoints.Add(oTG.CreatePoint(1, 0,1))
Dim oLeaderIntent As Inventor.GeometryIntent = oDef.CreateGeometryIntent(oFace)
oLeaderPoints.Add(oLeaderIntent)
Dim oLeaderDef As Inventor.ModelLeaderNoteDefinition = oDef.ModelAnnotations.ModelLeaderNotes.CreateDefinition(oLeaderPoints, "2000", oAnnoPlaneDef)
Dim oLeader As Inventor.ModelLeaderNote = oDef.ModelAnnotations.ModelLeaderNotes.Add(oLeaderDef)