Dear Mr. Ekins,
Thank you, this simplified it extremely. It was a good suggestion to think of it more in terms of how I would do it manually, rather than trying to think of it purely as a coding problem.
import adsk.core, adsk.fusion, adsk.cam, traceback
def run(context):
ui = None
try:
# Getting the object Application (All of Fusion)
app = adsk.core.Application.get()
#Getting UI if needed (dialog box, etc.)
ui = app.userInterface
#get active object design
design = app.activeProduct
# Get the root component of the active design (the main component that encompasses all)
rootComp = design.rootComponent
# Get object features
features = rootComp.features
# Get object sketches
sketches = rootComp.sketches
# Take existing sketch (only one present)
aerofoil = sketches.item(0)
# Get parameters from object design
parameters = design.allParameters
# Obtain dimensions
X1 = parameters.itemByName('X1')
Z1 = parameters.itemByName('Z1')
X2 = parameters.itemByName('X2')
Z2 = parameters.itemByName('Z2')
X3 = parameters.itemByName('X3')
Z3 = parameters.itemByName('Z3')
X4 = parameters.itemByName('X4')
Z4 = parameters.itemByName('Z4')
X5 = parameters.itemByName('X5')
Z5 = parameters.itemByName('Z5')
X6 = parameters.itemByName('X6')
Z6 = parameters.itemByName('Z6')
# Alter Dimensions
#X1.expression = str(20)
#Z1.expression = str(30)
#X2.expression = str(20)
#Z2.expression = str(30)
X3.expression = str(95)
Z3.expression = str(95)
X4.expression = str(250)
Z4.expression = str(33)
#X5.expression = str(20)
#Z5.expression = str(30)
#X6.expression = str(20)
#Z6.expression = str(30)
# Take a profile (Enclosed curves or line (sketch) creates a profile)
#prof = aerofoil.profiles.item(0)
## Create an extrusion from profile
# Get object extrudeFeatures
#extrudes = features.extrudeFeatures
#Create set of instructions for the extrusion operation
#extInputs = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
#extInputs.setDistanceExtent(False, adsk.core.ValueInput.createByReal(-1))
#extrudeFeature = extrudes.add(extInputs)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))