cloudcad.file


The cloudcad.file namespace provides functionality for saving and loading CAD files in the user's SkyCiv cloud storage.


cloudcad.file.save#

Save a CAD model to the user's SkyCiv cloud storage.

important

cloudcad.model.create must be called earlier in the session.

KeyTypeDescription
namestringFile name of the CAD model.
pathstringPath in the user's cloud file storage.
public_sharebooleanAlso return a public share link (view only). (false by default)
return_uid_urlbooleanThe link returned will use the UID (i.e. ?u= parameter in the URL) rather than the name and path. (false by default)
Sample input for cloudcad.file.save
{
"function": "cloudcad.file.save",
"arguments": {
"name": "my-cad-drawing",
"path": "api/cad-files/",
"public_share": true
}
}
Sample response for cloudcad.file.save
{
"status": 0,
"msg": "CAD model was successfully saved to your SkyCiv cloud storage in the folder api/cad-files/. You can access this file from your SkyCiv Dashboard.",
"data": "https://platform.skyciv.com/cad?preload_name=my-cad-drawing&preload_path=api/cad-files/",
"public_link": "https://platform.skyciv.com/cad-viewer?project_id=..."
}


cloudcad.file.open#

Load a CAD model from the user's SkyCiv cloud storage.

KeyTypeDescription
namestringFile name of the CAD model.
pathstringPath in the user's cloud file storage.
uidstringProvide the file's UID rather than the name and path. When using this argument, name and path can be omitted.
Sample input for cloudcad.file.open
{
"function": "cloudcad.file.open",
"arguments": {
"name": "my-cad-drawing",
"path": "api/cad-files/"
}
}
Sample response for cloudcad.file.open
{
"status": 0,
"msg": "File Loaded: CAD model 'my-cad-drawing' is set."
}