Hi @MJBusseyMS
Here's an example ilogic rule, it might need some error checking to ensure that the face is a planer face so that the sketch can be made, (never mind that, I forgot the pick filter was filtering for planer surfaces only ) or other things, but this should get you pointed in the right direction.
Out of curiosity, why does using the command manager not work for your needs?
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim oCompDef As PartComponentDefinition
oCompDef = ThisApplication.ActiveDocument.ComponentDefinition
Dim oPrompt1 As String
oPrompt1 = "Select a face to export..."
Dim oFace As Face
oFace = ThisApplication.CommandManager.Pick _
(SelectionFilterEnum.kAllPlanarEntities, oPrompt1)
If oFace Is Nothing Then
Return 'exit rule
End If
' Create a new sketch.
'True specifies To include the edges of the face in the sketch.
Dim oSketch As PlanarSketch
oSketch = oCompDef.Sketches.Add(oFace, True)
' Get the DataIO object.
Dim oDataIO As DataIO
oDataIO = oSketch.DataIO
''Check for the DXF folder and create it if it does not exist
oFolder = "C:\temp\DXF\"
If Not System.IO.Directory.Exists(oFolder) Then
System.IO.Directory.CreateDirectory(oFolder)
End If
' Create the DXF file.
oDataIO.WriteDataToFile ("DXF",oFolder & "My_DXF.dxf")
oSketch.Delete
Process.Start(oFolder)