OptionalautoThe flag whether to auto resize canvas when container size changed. Default is false.
OptionalbaseBase URL to load resources (such as fonts annd drawing templates) needed
OptionalcontainerOptional HTML container element for rendering. If not provided, a new container will be created
OptionalheightHeight of the canvas element. If not provided, use container's height
OptionalnotThe flag whether to load default fonts when initializing viewer. If no default font loaded, texts with fonts which can't be found in font repository will not be shown correctly.
OptionalpluginsConfiguration for automatic plugin loading.
Plugins can be loaded automatically during initialization from:
OptionalfromConfig?: (AcApPlugin | () => AcApPlugin)[]Load plugins from a configuration array. Each item can be a plugin instance or a factory function that returns a plugin.
OptionalfromFolder?: { continueOnError?: boolean; folderPath: string; pluginList: string[] }Load plugins from a folder using dynamic imports.
OptionalcontinueOnError?: booleanContinue loading other plugins if one fails (default: false)
Path to the folder containing plugin files
List of plugin file names to load
// Load plugins from configuration
AcApDocManager.createInstance({
plugins: {
fromConfig: [
new MyPlugin1(),
() => new MyPlugin2()
]
}
});
// Load plugins from folder
AcApDocManager.createInstance({
plugins: {
fromFolder: {
folderPath: './plugins',
pluginList: ['Plugin1.js', 'Plugin2.js'],
continueOnError: true
}
}
});
OptionaluseThe flag whether to use main thread or webwork to render drawing.
OptionalwebworkerURLs for Web Worker JavaScript bundles used by the CAD viewer.
OptionalwidthWidth of the canvas element. If not provided, use container's width
Options for creating AcApDocManager instance