I get this error when trying the script.
The doc I read from is attached.
File "C:/Users/*****/Dropbox/*****/Fusion/Script/Import CSV/ImportCSVIntoFXparameter/ImportCSVIntoFXparameter.py", line 44, in run
File "C:\Users/*****/AppData/Local/Autodesk/webdeploy/production/80334f1f1d9684bdf5e16fc8205e53367e0cee32/Api/Python/packages\adsk\fusion.py", line 72069, in evaluateExpression
#Script start here.
from asyncio import constants
import adsk.core, adsk.fusion, adsk.cam, traceback
def run(context😞
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
design = adsk.fusion.Design.cast(app.activeProduct)
doc = app.activeDocument
# # Read the csv file.
file = open('C://temp//test.txt')
for line in file:
# Get the values from the csv file.
pieces = line.split(',')
# sheetDimX = [4]
xstock = [4]
sheetDimY = [5]
xLength = pieces[7]
yLength = pieces[8]
xMatrix = pieces[9]
yMatrix = pieces[10]
sheetDimXName = 'SheetDimInX'
sheetDimX = xstock
sheetDimYName = 'SheetDimInY'
sheetDimY = 445
# xLength = 6.7
xLengthName = 'LengthInX'
# yLength = 22.7
yLengthName = 'LengthInY'
xMatrixName = 'MatrixInX'
yMatrixName = 'MatrixInY'
thickness = 2
thicknessName = 'Thickness'
cornerRadius = 1.5
cornerRadiusName = 'Radius'
unitsMgr = design.unitsManager
# draftAngleReal = unitsMgr.evaluateExpression(str(draftAngle),'deg')
sheetDimXReal = unitsMgr.evaluateExpression(str(sheetDimX),'mm')
sheetDimYReal = unitsMgr.evaluateExpression(str(sheetDimY),'mm')
xMatrixReal = unitsMgr.evaluateExpression(str(xMatrix),'mm')
yMatrixReal = unitsMgr.evaluateExpression(str(yMatrix),'mm')
xLengthReal = unitsMgr.evaluateExpression(str(xLength),'mm')
yLengthReal = unitsMgr.evaluateExpression(str(yLength),'mm')
thicknessReal = unitsMgr.evaluateExpression(str(thickness),'mm')
# realDraft = adsk.core.ValueInput.createByReal(draftAngleReal)
realSheetDimX = adsk.core.ValueInput.createByReal(sheetDimXReal)
realSheetDimY = adsk.core.ValueInput.createByReal(sheetDimYReal)
realXMatrix = adsk.core.ValueInput.createByReal(xMatrixReal)
realYMatrix = adsk.core.ValueInput.createByReal(yMatrixReal)
realXLength = adsk.core.ValueInput.createByReal(xLengthReal)
realYLength = adsk.core.ValueInput.createByReal(yLengthReal)
realThickness = adsk.core.ValueInput.createByReal(thicknessReal)
# design.userParameters.add(draftName,realDraft,'deg','')
design.userParameters.add(sheetDimXName,realSheetDimX,'mm','')
design.userParameters.add(sheetDimYName,realSheetDimY,'mm','')
design.userParameters.add(xMatrixName,realXMatrix,'mm','')
design.userParameters.add(yMatrixName,realYMatrix,'mm','')
design.userParameters.add(xLengthName,realXLength,'mm','')
design.userParameters.add(yLengthName,realYLength,'mm','')
design.userParameters.add(thicknessName,realThickness,'mm','')