Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
I have tried reaching out to a number of Inventor advisors/ Collaborators/Contributors etc regarding this particular segment and no one seems to assist.
In hopes of finding a solution I have perused other posts where users are able to do this in an assembly environment which is far more complex than my simple task/request and they are receiving assistance.
I would like to automate the process of creating a leader text in the model environment that points to a feature on the part. There are more than one features, and each is to be named differently. I have attached a snippet for better understanding.
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("Revolved Feature1, FCW1 AT TUBE C ") oLeaderPoints.Add(oLeaderIntent) 'Leader.ArrowheadType(kClosedArrowheadType) As ArrowheadTypeEnum Dim oLeaderDef As Inventor.ModelLeaderNoteDefinition = oDef.ModelAnnotations.ModelLeaderNotes.CreateDefinition(oLeaderPoints, "2000", oAnnoPlaneDef) Dim oLeader As Inventor.ModelLeaderNote = oDef.ModelAnnotations.ModelLeaderNotes.Add(oLeaderDef)
Solved! Go to Solution.