There isn't anything built-in to Fusion for saving a sketch except as part of a full design. However, I did a quick test, which may be a good option. You can create a design that contains all of your sketches and then copy them from that design into the new design as needed.
Here's my test code. To use it create a design that contains two sketches in the root component. You can draw whatever you want in the sketches, including dimensions and text. Have that design active, and then run the script. It will create a new design and copy the sketches into it on different construction planes. In practice, you would open the design that contains the sketches when you need it and then copy those sketches into another design that you're working on.
def run(context):
try:
app = adsk.core.Application.get()
ui = app.userInterface
sourceDoc = app.activeDocument
sourceDes: adsk.fusion.Design = sourceDoc.products.itemByProductType('DesignProductType')
sourceSk1 = sourceDes.rootComponent.sketches[0]
sourceSk2 = sourceDes.rootComponent.sketches[1]
targetDoc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType, True)
targetDes: adsk.fusion.Design = targetDoc.products.itemByProductType('DesignProductType')
targetRoot = targetDes.rootComponent
targetSk = targetRoot.sketches.add(targetRoot.xYConstructionPlane)
CopySketch(sourceSk1, targetSk)
targetSk = targetRoot.sketches.add(targetRoot.xZConstructionPlane)
CopySketch(sourceSk2, targetSk)
except:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
def CopySketch(sourceSk: adsk.fusion.Sketch, targetSk: adsk.fusion.Sketch):
try:
col = adsk.core.ObjectCollection.create()
for curve in sourceSk.sketchCurves:
col.add(curve)
for text in sourceSk.sketchTexts:
col.add(text)
pnt: adsk.fusion.SketchPoint = None
for pnt in sourceSk.sketchPoints:
if pnt.connectedEntities is None:
col.add(pnt)
trans = adsk.core.Matrix3D.create()
sourceSk.copy(col, trans, targetSk)
except:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
---------------------------------------------------------------
Brian EkinsInventor and Fusion 360 API Expert
Website/Blog:
https://EkinsSolutions.com