
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I required help for performing a operation in Inventor 2014. It is repeated task.
I need a VBA macro for creating one sketch, a single point and use that point for punch a mark.
so, steps are as follows for macro. (Note - Below all steps should be in a single macro.)
1. Create Sketch (need to select face manually of sheet metal part) --> I already have one macro for the same. I can share, taken from forum.
2. on the same sketch, plotting a single point. Co-ordinates for point will be Introduced manually by the user.
3. and the last step just open punch tool window, let the user select punch and press "OK".
Macro for creating sketch as i said earlier : Please see if below macro can help.
__________________________________________________________________________
Public Sub NewSketchOnPlane()
Dim partDoc As PartDocument
Set partDoc = ThisApplication.ActiveDocument
' Create a new sketch on a selected face.
Dim planarEntity As Object
Set planarEntity = ThisApplication.CommandManager.Pick(kAllPlanarEntities, _
"Select a face or work plane.")
Dim sk As sketch
Set sk = partDoc.ComponentDefinition.Sketches.Add(planarEntity)
' Bring the sketch into edit mode.
sk.Edit
End Sub"
_______________________________________________________________
thanks in advance.
Solved! Go to Solution.