Hi @rickzacher. I don't know how you planned on getting the source sketch object, so I just assumed that the 'Pick' method would be OK to start with. I also did not know which origin plane in the new part you would want to paste the sketch to, so I just chose the first one, because that is simple. With that in mind, here is an iLogic example of one way to do it that worked for me.
Dim oSourceSketch As Sketch = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kSketchObjectFilter, "Select a Sketch to copy.")
If oSourceSketch Is Nothing OrElse (Not TypeOf oSourceSketch Is Sketch) Then
MsgBox("Either nothing, or wrong type selected. Exiting.", , "")
Exit Sub
End If
Dim oSourcePDef As PartComponentDefinition = oSourceSketch.Parent
Dim oSourcePDoc As PartDocument = oSourcePDef.Document
oSourcePDoc.SelectSet.Clear
oSourcePDoc.SelectSet.Select(oSourceSketch)
ThisApplication.CommandManager.ControlDefinitions.Item("AppCopyCmd").Execute
Dim oPDoc As PartDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kPartDocumentObject, , True)
oPDef = oPDoc.ComponentDefinition
oSketches = oPDef.Sketches
oPlane = oPDef.WorkPlanes.Item(1)
oSketch = oSketches.Add(oPlane)
oSketch.Edit
ThisApplication.CommandManager.ControlDefinitions.Item("AppPasteCmd").Execute
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
If you want and have time, I would appreciate your Vote(s) for My IDEAS 💡 or you can Explore My CONTRIBUTIONS
Wesley Crihfield

(Not an Autodesk Employee)