10-05-2017
01:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-05-2017
01:06 PM
Hello,
You can add these several lines into your code to create a sketch point, before you exit the sketch env.
// Add a sketch point to a planar sketch
Dim oPointOnFace As Point
Set oPointOnFace = planarEntity.PointOnFace //just use the PointOnFace as an example, sounds you will get user input anyway
sk.SketchPoints.Add sk.ModelToSketchSpace(oPointOnFace)
After you exit the sketch env, you can add these lines to execute the Punch Tool command which will pop up the dialog. Hope this is helpful.
// Find the ButtonDefinition of Punch Tool command and execute it
Dim oDef As ButtonDefinition
For Each oDef In ThisApplication.CommandManager.ControlDefinitions
If oDef.InternalName = "SheetMetalPunchToolCmd" Then
oDef.Execute
End If
Next