CountItApp | Count It , Never lose the count
kandi X-RAY | CountItApp Summary
kandi X-RAY | CountItApp Summary
Count It, Never lose the count again
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of CountItApp
CountItApp Key Features
CountItApp Examples and Code Snippets
Community Discussions
Trending Discussions on CountItApp
QUESTION
Within a web client using the Forge API, I would like to get a JSON array of Revit elements in a model. Using the Design Automation API, I am creating an Activity that uses FilteredElementCollector
to retrieve the elements, but once I have the elements I'm not sure the best way to retrieve those results in my web service. This Activity does not need to write back to an .rvt file.
The CountItApp tutorial writes the results to a results.txt file in cloud storage, and the web app then downloads that results.txt file and parses the results. On my web client I want to display these results, but file I/O does not seem like a very good solution for JSON data. A couple alternatives I've considered:
- Write results to an external database and query that database in my web application once the WorkItem completes. As far as I know this is not possible due to Forge's restrictions on network access within an Activity.
- Pass the results with the
onComplete
callback. I don't know if this is possible.
ANSWER
Answered 2020-Jul-23 at 05:52Design automation allows you to post a workitem with output arguments with POST
callback. This allows you to receive the output data as application/json
if your output file generated by your activity is a json file.
Design automation also allows you to specify a variable workitem.id
in your output url. When your workitem completes we shall call this url with the variable expanded to the id of that workitem. This dynamic variable path allows you to determine the workitem id associated with that callback.
Here is how you could go about. First define an activity with such an output parameter (verb: post
) with a hardcoded local name result.json
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install CountItApp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page