Processes
The process essentially manages a graphics state of a scene on a client side. The process is interactive one and a long-term variation of a command.
Running Process
Example of running a process (TypeScript):
view.runCommand({
name: "RunProcessCommand", // name of command
// next arguments
process: {
name: "Selection", // process name
options: {}, // process options
events: {} // process events
}
})
The command doesn’t return anything as a result. User interaction is carried out with event callbacks in process.events
and updating process command.
Stopping Process
Any process cannot be terminated on its own. So, to stop a process, you should use the following command.
Stop the process command (TypeScript):
view.runCommand({
name: "StopProcessCommand",
})
The command doesn’t return anything as a result.
Updating Process
This command make it possible to change the initial process.options
during
a process executing.
Example of updating a comment process (TypeScript):
view.runCommand({
name: "UpdateProcessCommand",
options: {
name: "AddComment", // process name
text: "New comment text", // text of the new comment object
font: {
size: 18,
family: 'Font1'
}
}
})
The command doesn’t return anything as a result.
You can find more details about updating comment options here.
Each process documentation is contained in a relevant section.