Autodesk files
For a more technical API reference, please see the following pages:
The AutodeskFileField
lets the user select a single file from Autodesk cloud storage. For the AutodeskView
an
access token is required, meaning that an Autodesk Platform Services integration should be set up beforehand, and the
corresponding integration name should be passed as parameter in the AutodeskFileField
to connect to that specific
integration.
import viktor as vkt
class Parametrization(vkt.Parametrization):
autodesk_file = vkt.AutodeskFileField("Select a file", oauth2_integration="autodesk-integration")
The user input can be obtained through the params argument and can have the following values:
AutodeskFile
object: when a file is selectedNone
: when empty
Expand to see all available arguments
In alphabetical order:
-
description: add a tooltip with additional information
vkt.AutodeskFileField(..., description="This field represents the ...")
-
file_types: optional restriction of file type(s) (case-insensitive)
vkt.AutodeskFileField(..., file_types=[".rvt"])
-
flex: the width of the field between 0 and 100 (default=33)
vkt.AutodeskFileField(..., flex=50)
-
name: defines the position of the parameter in the params
vkt.AutodeskFileField(..., name="f") # obtained using params.f
-
visible: can be used when the visibility depends on other input fields
vkt.AutodeskFileField(..., visible=vkt.Lookup("another_field"))
See 'Hide a field' for elaborate examples.