Autodesk.Viewing
Profile
new Profile(profileSettings)
Profiles encapsulate viewer settings, extensions to unload, and extensions to load.
The profileSettings.settings
parameter will override the existing preferences upon calling the apply method. The profileSettings.extensions.load
and profileSettings.extensions.unload
arrays are used to load and unload extensions. Make sure to set the profile by using the Autodesk.Viewing.Viewer3D#setProfile method.
Parameters
profileSettings* | the profile settings. |
* Required
Examples
const profileSettings = {
name: "mySettings",
description: "My personal settings.",
settings: {
ambientShadows: false,
groundShadows: true
}
persistent: ['ambientShadows'],
extensions: {
load: ["Autodesk.BimWalk"], // Extensions to load
unload: ["Autodesk.ViewCubeUi"] // Extensions to unload and to not load
}
Show More
}; const profile = new Autodesk.Viewing.Profile(profileSettings);
Methods
apply(prefs, override)
Applies the profile’s settings to the viewer preferences. To make the viewer react to the updated preferences please reference Autodesk.Viewing.Viewer3D#setProfile.
Parameters
prefs* | preferences instance. |
override boolean | Override all existing preferences with the profile’s preferences. |
* Required