Thanks, good to know that it should work. Most likely my second script will work for you too, but we should give it a try. I've pasted in a simplified version of the second script below, and attached one of the .dxf files that I've tried.
The problem shows up before anything else is done. I start with an empty design, run the "insertDxf" script from my previous post, and the inserted sketch does not appear in the timeline. Here's a screen shot that shows the empty timeline:

# -*- coding: utf-8 -*-
"""
Created on Tue Aug 28 07:56:27 2018
@author: metd01567
"""
import adsk.core, adsk.fusion, traceback
# Global set of event handlers to keep them referenced for the duration of the command
_handlers = []
# Event handler that reacts to when the command is destroyed. This terminates the script.
class MyCommandDestroyHandler(adsk.core.CommandEventHandler):
def __init__(self):
super().__init__()
def notify(self, args):
try:
app = adsk.core.Application.get()
ui = app.userInterface
# When the command is done, terminate the script
# This will release all globals which will remove all event handlers
adsk.terminate()
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
# Event handler that reacts when the command definition is executed which
# results in the command being created and this event being fired.
class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
def __init__(self):
super().__init__()
def notify(self, args):
try:
# check workspace, must be in Model
app = adsk.core.Application.get()
ui = app.userInterface
product = app.activeProduct
design = adsk.fusion.Design.cast(product)
if not design:
ui.messageBox('This script is not supported in current workspace, please change to MODEL workspace and try again.')
return False
# Get the command that was created.
cmd = adsk.core.Command.cast(args.command)
###################################
# create and register event handlers
onDestroy = MyCommandDestroyHandler()
cmd.destroy.add(onDestroy)
_handlers.append(onDestroy)
onExecute = MyExecuteHandler()
cmd.execute.add(onExecute)
_handlers.append(onExecute)
###################################
# add controls
# Create a selection input for sweep profiles
profileSelectionInput = cmd.commandInputs.addSelectionInput('profileSelection', 'Profiles', 'The selected profiles should intersect x,y: 0,0, they will be swept along the selected path')
profileSelectionInput.setSelectionLimits(1)
profileSelectionInput.addSelectionFilter("Profiles")
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
def run(context):
try:
app = adsk.core.Application.get()
ui = app.userInterface
# Get the existing command definition or create it if it doesn't already exist.
cmdDef = ui.commandDefinitions.itemById('simpleSweep')
if not cmdDef:
cmdDef = ui.commandDefinitions.addButtonDefinition('simpleSweep', 'Simple Sweep', 'Command to sweep a profile along a selected path.')
# Connect to the command created event.
onCommandCreated = MyCommandCreatedHandler()
cmdDef.commandCreated.add(onCommandCreated)
_handlers.append(onCommandCreated)
# Execute the command definition.
cmdDef.execute()
# Prevent this module from being terminated when the script returns, because we are waiting for event handlers to fire.
adsk.autoTerminate(False)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
# Event handler that reacts to any changes the user makes to any of the command inputs.
class MyExecuteHandler(adsk.core.CommandEventHandler):
def __init__(self):
super().__init__()
def notify(self, args):
try:
app = adsk.core.Application.get()
ui = app.userInterface
product = app.activeProduct
design = adsk.fusion.Design.cast(product)
activeComp = design.activeComponent
eventArgs = adsk.core.CommandEventArgs.cast(args)
inputs = eventArgs.command.commandInputs
###############################################
# verify selections
profileSelectionInput = inputs.itemById('profileSelection')
if not profileSelectionInput:
return False
###############################################
# copy the profiles into a collection
selectedProfiles = adsk.core.ObjectCollection.create()
for thisEntity in range(profileSelectionInput.selectionCount):
selectedProfiles.add(profileSelectionInput.selection(thisEntity).entity)
if selectedProfiles == None:
ui.messageBox('software error: profile selection could not be used')
return False
###############################################
# derive usable entities and parameters, and verify inputs meet requirements
###############################################
# determine the reference plane based on one of the profiles
referencePlane = selectedProfiles[0].parentSketch.referencePlane
if not referencePlane:
ui.messageBox("invalid profile reference plane")
return False
###############################################
# create a thin extrusion
###############################################
# extrude a thin body from the reference profile. thickness is arbitrary, but keep it well above the model's resolution
thickness = adsk.core.ValueInput.createByReal(0.1)
extrude = activeComp.features.extrudeFeatures.addSimple(selectedProfiles, thickness, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
# name the body for user convenience
extrudeBody = extrude.bodies.item(0)
if extrudeBody == None:
ui.messageBox('temp extrude failed\n\noperation not complete')
return False
extrudeBody.name = "generatedSweepProfile"
adsk.terminate()
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))