Closed khilton2 closed 4 years ago
Hello,
The quotes are requirements now - as the error details said: "Variables that expand to paths must be quoted.". Please update the GetActivityCommandLine()
method. More details can be found in this blog entry:
Starting October 1st, Design Automation will enforce the quotes for start model (args[].path) and appbundle (appbundles[].path) parameters.
https://forge.autodesk.com/blog/design-automation-command-line
I've been using the same code for a while to post activities. It's suddenly failing and giving me the following error:
System.Net.Http.HttpRequestException: The server returned the non-success status code 400 (Bad Request). More error details: {"commandLine":["Invalid switch [$(appbundles[UpdateUserParameters].path)]. Variables that expand to paths must be quoted. (Parameter 'commandLine')"]}. at Autodesk.Forge.Core.HttpResponseMessageExtensions.EnsureSuccessStatusCodeAsync(HttpResponseMessage msg) at Autodesk.Forge.DesignAutomation.Http.ActivitiesApi.CreateActivityVersionAsync(String id, Activity item, String scopes, IDictionary`2 headers, Boolean throwOnError) at Autodesk.Forge.DesignAutomation.DesignAutomationClient.CreateActivityVersionAsync(String id, Activity item) at Autodesk.Forge.DesignAutomation.DesignAutomationClient.UpdateActivityAsync(Activity activity, String label) at Interaction.Publisher.PublishActivityAsync()
The inputs to the UpdateActivityAsync(activity, Constants.Activity.Label) function appear to be correct and have not changed.
The commandLine argument is: