Arguments
TaskScript
Design Automation for Fusion has a unique parameter named TaskScript. If you have a small script you can use this to define it inline instead of an AppBundle. For example:
{
"arguments":{
"TaskScript":"import { adsk } from \"@adsk/fas\"; adsk.log(\"Hello Fusion\");"
}
}
TaskScriptUrl
Design Automation for Fusion has a unique paramater named TaskScriptUrl. If you have a large script you can use this to define a URL to the script instead of an AppBundle. For example:
{
"TaskScriptUrl":{
"url":"https://<YOUR_SERVER_URL>/script/sample.ts",
"header":{
"Authorization":"Bearer <YOUR_ACCESS_TOKEN>"
}
}
}
The header is optional and can be used to pass a token to the server
TaskParameters
Design Automation for Fusion has a unique parameter named TaskParameters. This parameter is used to pass parameters to the script. For example:
{
"TaskParameters":"{\n \"fileURN\": \"urn:adsk.wipprod:dm.lineage:shuH8zKvThW_4Tdu-m22sw\",\n \"parameters\": {\n \"d3\": \"40mm\"\n }\n}"
}
The TaskParameters object is a JSON object that can be used to pass parameters to the script.