Class ScriptCommands
- Namespace
- vdWebLibrary
- Assembly
- JsPropertiesExtractor.dll
Represents an object that exports commands which are support Undo History and exporting to Script
It is accessible by scriptCommand
public class ScriptCommands
- Inheritance
-
ScriptCommands
- Inherited Members
Fields
- ActiveSelectionModify
Represents a user define function of type ActiveSelectionModifyDelegate that will be called for every entity added or remove to the ActiveSelection()
Methods
- ActiveSelection()
Returns an array copy of the active selected entities.
It is updated after each select command and after each erase command but it is not updated after move, copy, scale or rotate commands because these commands do not change the active selection but they change the entities geometry.
- RegisterFigure(object, bool, bool)
Add the passed figure to the active layout of the selected document and set a new HandleId for the figure. Also write the add action to the undo history so the figure will be mark as deleted if the user call the undo command.
- arc(object[], ScriptEntityDelegate)
Add an arc to the document. Check the function finished throw the passed callback delegate
- blockref(string, object[], ScriptEntityDelegate)
Add a block reference to the document. Check the function finished throw the passed callback delegate
- box(object[], ScriptEntityDelegate)
Add a new box to the document. Check the function finished throw the passed callback delegate
- circle(object[], ScriptEntityDelegate)
Add a circle to the document. Check the function finished throw the passed callback delegate
- clearCommands()
Clear the script command buffer.
- clearSelection()
Clears - Empty the Active selection.See also select(object[], ScriptSelectDelegate) , ActiveSelection()
- color(string)
Selects the passed color as active. Commands that create new objects like line(object[], ScriptEntityDelegate) set the color of created entities to that color.
- cone(object[], ScriptEntityDelegate)
Add a new cone to the document. Check the function finished throw the passed callback delegate
- copy(object, object, ScriptSelectDelegate)
Copy the passed entities from a point in worldcs to an other in worldcs. It also write to UndoHistory() and script buffer Check the function finished throw the passed callback delegate
- dim(object[], ScriptEntityDelegate)
Add a dimension block to the document according the the active dimension style properties dimvar(string, string). Check the function finished throw the passed callback delegate
- dimvar(string, string)
Set dimension style properties used to draw a dimension executed be command dim(object[], ScriptEntityDelegate)
- doubleline(object[], bool, int, ScriptEntityDelegate)
Add a doubleLine polyline to the document. Check the function finished throw the passed callback delegate
- doublelinerect(object[], ScriptEntityDelegate)
Add a doubleLine rect to the document. Check the function finished throw the passed callback delegate
- doublelinewidth(double)
Set the passed value as active width in Drawing units for the double line draw commands. Commands that create new double line like doubleline(object[], bool, int, ScriptEntityDelegate) and doublelinerect(object[], ScriptEntityDelegate) select this value as the width of eah segment in drawing units.
- ellipse(object[], ScriptEntityDelegate)
Adds a new vdEllipse object in the document. Check the function finished throw the passed callback delegate
- enableScript(bool)
Enable / Disable the writing to script commands buffer
- erase()
Erase the default active selection entities, and clear the ActiveSelection by calling the clearSelection method. It also write to UndoHistory() and script buffer
- explode()
Explode the default active selection entities
New sub entities are added to the active layout and seleced original entities are mark as Deleted.
See also ExplodeObjects(object)
It also write to UndoHistory() and script buffer
- getCommands()
Returns the current script command buffer
- hatch(string, string, string, double, double, int, int)
Select active hatch properties for hatched filled objects (rect polyline circle arc ellipse).
- image(string, string, object[], ScriptEntityDelegate)
Add an image reference to the document. Check the function finished throw the passed callback delegate
- isActive()
Returns true is script is enable else false enableScript(bool)
- join()
Joins the entities, if posible, in the ActiveSelection()
- layer(string)
Set the passed layer name as active. Commands that create new objects like line(object[], ScriptEntityDelegate) add the created entities to that layer.
- layout(string)
Set the passed layout name as active. Commands that create new objects like line(object[], ScriptEntityDelegate) add the created entities to that layout.
- line(object[], ScriptEntityDelegate)
Add a line to the document. Check the function finished throw the passed callback delegate
- linetype(string)
Set the passed linetype name as active. Commands that create new objects like line(object[], ScriptEntityDelegate) select this linetype for the created entities.
- lineweight(double)
Set the passed lineweight as active. Commands that create new objects like line(object[], ScriptEntityDelegate) select this lineweight for the created entities.
- ltscale(double)
Set the passed linetypescale as active. Commands that create new objects like line(object[], ScriptEntityDelegate) select this linetypescale for the created entities.
- mirror(object, double, ScriptSelectDelegate, bool)
Mirror the passed entities around an Axis that defined from the passed axisPoint in world CS and passed axisAngle in radians. It also write to UndoHistory() and script buffer Check the function finished throw the passed callback delegate
- move(object, object, ScriptSelectDelegate)
move the passed entities from a point in worldcs to an other in worldcs. It also write to UndoHistory() and script buffer Check the function finished throw the passed callback delegate
- parseCommands(string[])
Parse the passed command buffer. If the passed commands are undefined then it parses the active script command buffer getCommands()
- penwidth(double)
Set the passed penwidth as active. Commands that create new objects like line(object[], ScriptEntityDelegate) select this penwidth for the created entities.
- polyline(object[], bool, int, ScriptEntityDelegate)
Add a polyline to the document. Check the function finished throw the passed callback delegate
- ray(object[], ScriptEntityDelegate)
Create and add a new infinity Ray line to active layout entities using the active common properties. Check the function finished throw the passed callback delegate
- rect(object[], ScriptEntityDelegate)
Add a rect to the document. Check the function finished throw the passed callback delegate
- redo()
Redone the last item stored in the redo list and the last command in script buffer.If a start group item is last then redones all items of the group in redo history.
- rotate(object, double, ScriptSelectDelegate)
Rotate the passed entities around a point reference in worldcs with passed angle in radians. It also write to UndoHistory() and script buffer Check the function finished throw the passed callback delegate
- rotate3d(object, double, object, ScriptSelectDelegate)
Rotate the passed entities around the passed axis passed angle in radians. It also write to UndoHistory() and script buffer Check the function finished throw the passed callback delegate
- scale(object, double, ScriptSelectDelegate)
Scales the passed entities by a point reference in worldcs. It also write to UndoHistory() and script buffer Check the function finished throw the passed callback delegate
- select(object[], ScriptSelectDelegate)
Add passed entities to default active selection Check the function finished throw the passed callback delegate
- sphere(object[], ScriptEntityDelegate)
Add a new sphere to the document. Check the function finished throw the passed callback delegate
- text(string, object[], ScriptEntityDelegate)
Add a text to the document. Check the function finished throw the passed callback delegate
- textstyle(string, double, string, string)
Set the passed textstyle name as active. Commands that create new text objects like text(string, object[], ScriptEntityDelegate) select this textstyle for created entities.
- thickness(double)
Set the passed thickness value as active. Commands that create new objects like line(object[], ScriptEntityDelegate) select this thickness for the created entities and will be drawn extruded to their extrusion vector.
- tooltip(string)
Set the passed textvalue as active tooltip for the new added entities
- undo()
Undone the last item stored in the undo list and the last command in script buffer.If an end group item is last then undone all items of the group in undo history.
- undogroup(string)
Begin/Close a group of commands in order to be undo or redo with one single action.
- xline(object[], ScriptEntityDelegate)
Create and add a new infinity X line to active layout entities using the active common properties. Check the function finished throw the passed callback delegate