SetOption - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DocumentTools[Canvas][Script]

  

SetOption

  

set canvas or canvas element properties

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

SetOption(script,property,value)

Parameters

script

-

DocumentTools:-Canvas:-Script object

property

-

string; property name

value

-

property value

Description

• 

The SetOption command allows you to set properties of the active canvas element and/or the entire canvas.   The options set by this command only control script playback within the Maple Learn environment, and are invisible to operation within Maple.

• 

The options that can be set are as follows:

Option

Value

Default

Description

"ANGLE"

"RAD","DEG"

"RAD"

Set angles to radians or degrees

"DELAY"

0 .. 5000

200

Set delay between script commands in milliseconds

"ISTEXT"

truefalse

false

Toggle between Math and Text. In Text mode, content is not evaluated and no result or plot is displayed

"PLOT"

truefalse

true

Enable/disable showing the current expression on the plot preview

"READONLY"

truefalse

false

Enable/disable read-only setting on math container. If read-only is set, that also disables calculator results

"RESET"

truefalse

false

Causes the document to be reset to the initial state

"RESULT"

truefalse

true

Enable/disable showing the calculator result on the currently active math content

"SHOWERROR"

truefalse

true

Enable/disable showing of error messages next to math cell

"SLIDER"

truefalse

true

Enable/disable slider on currently active (math) content. Also has effect on any subsequently created math content

"SLIDER:INC"

numeric

1

The increment value is not currently used, except for deciding whether the slider is discrete (integer value) or continuous (float value)

"SLIDER:MAX"

numeric

10

Set the maximum endpoint of the slider for the currently active math content

"SLIDER:MIN"

numeric

-10

Set the minimum endpoint of the slider for the currently active math content

• 

A "canvas" is an interactive section of a Maple document created by the NewCanvas command, or a shared web-based Maple Learn document.   See the Script command for a more complete description.

Examples

withDocumentTools:-Canvas:

scScriptmode=Learn:

SetOptionsc,ANGLE,DEG

SetActivesc,1:0

SetOptionsc,PLOT,true

SetActivesc,1:1

SetOptionsc,SLIDER,true

SetOptionsc,SLIDER:MIN,0

SetOptionsc,SLIDER:MAX,360

SetActivesc,1:2

SetOptionsc,PLOT,true

SetActivesc,1:3

SetOptionsc,PLOT,true

SetActivesc,1:4

SetOptionsc,PLOT,true

cvNewCanvasUnit Circle,Groupx2+y2=1,n&:=360,P&:=Pointcosn,sinn,SegmentPoint0,0,P,SegmentPointcosn,0,sc:

ShareCanvascv

Compatibility

• 

The DocumentTools[Canvas][Script][SetOption] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

Math

NewCanvas

Script

SetActive

SetMath

SetText