I want to to pass a json payload to my DA4R plugin but cannot find any example for that. The CountIt Sample (Beta) you posted on your documentation pages is useless without the C# code of the Visual Studio project that goes along...
Asked
Active
Viewed 122 times
1 Answers
1
The input as plain JSON is saved as a file (e.g. params.json
or any name that you specify on the Activity localName
argument), so you can pass using (nodejs
):
let payLoad = {
activityId: ForgeUtils.ACTIVITY_ID,
arguments: {
sketchItInput: {
url: 'data:application/json,'+JSON.stringify(elements)
},
onComplete: {
verb: 'post',
url: NgrokUtils.getServerUrl() + '/workitemcomplete'
},
result: {
verb: 'put',
url: signedUrl
}
}
};
See sample here.

Augusto Goncalves
- 8,493
- 2
- 17
- 44
-
This is not what I'm looking for, sorry if the question wasn't clear enough... I wanted to see the Revit addin C# code that parses and uses the JSON payload. The examples are of limited use without the C# addin code. I could find on your repo at https://github.com/Autodesk-Forge/design.automation-nodejs-sketchIt/blob/b372aad96e3035af9364efd4a35c2500df62d15a/SketchIt/Revit.Addin/SketchItApp/SketchIt.cs. Thanks – Felipe Mar 12 '19 at 07:51
-
Oh ok, got it. Here is another one: https://github.com/Autodesk-Forge/learn.forge.designautomation/blob/master/updateRVTParam/Commands.cs#L33 And check the tutorial at http://learnforge.autodesk.io – Augusto Goncalves Mar 12 '19 at 10:37