08-04-2021
11:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-04-2021
11:34 PM
Hello
Can you try this:
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 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Select a face to attach leader")
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)
R. Krieg
RKW Solutions
www.rkw-solutions.com