Quick Start

Click [Open App], then enter your app's ID and secret code for 7cad Forge Player connect with your Forge app.

Go to AppBundles tab and upload an add-in app's bundle. It should be the app that you want to develop to run over the Forge machine. But it is ok if you just want to play with some script, then, upload any dump bundle.

Go to Run tab, fill your Activity and WorkItem with script and input data. You can get start from a Template by click to [Template] button on the menu bar. The template already has sample script for you to Run right away.

Click Run and check the Result.

If unsucess, check the logs, find errors, go back edit your script, edit your bundle, upload it, and click Run again. This well-known loop process is called "Debugging"

General Usage Instructions

Firstly, you got to create a Forge App. No coding requires here. Sign into your account at https://forge.autodesk.com/myapps/ and click [Create App].

For 7cad Forge Player is Design Automation technology, your app must have Design Automation and Data Management services enabled.

If you haven't decided to create a Forge App yet, you can just go using 7cad Forge Player with its default 7cad Forge Player app. It is my app, therefore you don't have full control over it (like rename, delete bundle, etc). More, since it is a shared app, if it is used extensively, it can reach the Forge usage quotas, or get conflict with other users who are also playing.

Therefore, create your own Forge app is recommended.

Secondly, you need to know what an add-in app bundle is; what a script (or lisp code) is; and what is the accoreconsole. Those are basic knowledge if you want to create an AutoCAD add-in app, by yourself or by hiring some developers (like me).

Finally, if you haven't, go and find great instructions about Autodesk Forge here https://forge.autodesk.com/en/docs/design-automation/v3/tutorials/autocad/ You don't have to master it before using 7cad Forge Player. I create 7cad Forge Player for the opposite: play with my app, then, master those tutorials later.

-----------------------------

HOW 7CAD FORGE PLAYER WORKS

-----------------------------

1. AutoCAD Forge will create a temporary working folder.

2. The [InputDwg] will be uploaded to the cloud and downloaded to the working folder.

3. This text content (if not empty) will be uploaded to the working folder as "input.json" file

4. The [Input folder] (it not empty) will be compressed and uploaded and decompressed to a folder name "Input"

5. An "output" folder is created.

6. So, in the working folder over the cloud, you have:

  • The [InputDwg]: its name is exactly the drawing file name.
  • (optional) "input.json" file: the file name is exactly "input.json", hard coded.
  • (optional) "input" folder: the folder name is exactly "input", hard coded.
  • An "output" folder: the folder name is exactly "output", hard coded.

7. The Forge AutoCAD engine will open the [InputDwg]

8. The Forge AutoCAD engine will load specified bundles. They can be Lisp or .NET app, etc.

9. The Forge AutoCAD engine will run the Activity Script.

10. The time quota limit to run the script is 400 seconds.

11. If the run successes, you receive a download link to download the "output" folder

12. The [InputDwg] will be saved to the "output" folder if the "Save drawing to output folder to download" checkbox is checked.

------------------------------------------------------

HOW THE RUN (ACTIVITY AND WORKITEM) SHOULD BE DESIGNED

------------------------------------------------------

In the Activity Script, you can call custom command defined in the bundles. Activity Script is not supposed to be too long. If you want a long one, simply put it in the "Input" folder and call it via the Activity Script.

Put any input and support files to "Input" folder, and code the Activity Script (and any custom command arises from it) to read data from that "Input" folder.

Normally, a custom command will need input arguments like height = ..., width = ..., length = ..., block name = ... etc. Those inputs are collected by a Window Form, or by a Web App. Then, they should be "compiled" to an json content. Fill the Input.json textbox with that json content. It will be uploaded and saved to the working folder as "input.json" file. Code the Activity Script to get input arguments from reading that "input.json" file.

In summary, look carefully at HOW IT WORKS > item number (6): In the working folder over the cloud, you have:

1. The [InputDwg]: its name is the uploaded drawing file name.

2. (optional) "input.json" file: the file name is exactly "input.json", hard coded.

3. (optional) "input" folder: the folder name is exactly "input", hard coded.

4. An "output" folder: the folder name is exactly "output", hard coded.

Design your Activity Script to work with just those items in just that working folder. Any output file of the Activity Script should be written to the "output" folder if you want to download it. Otherwise, write to the working folder will be fine, but all will be deleted after the run session ends.

You should not read and write file anywhere else, even in temp folder. The Activity is performing on Autodesk Forge Machine, and you don't have much permission. Otherwise, the run session will crash.

Forge API allow you to have more customization like upload more files and folders with different names to the working folders. But in the scope of this app, the "input.json", the "input" folder and the "output" folder are fixed.

Screenshots

Main Tab



Appbundles Tab



Run Tab



The Result



Version History

Version Number Version Description

1.0

Initial release.