Class BaseActionObj
- Namespace
- vdWebLibrary
- Assembly
- JsPropertiesExtractor.dll
Contains all the properties of an Action. BaseActionObj is not defined, it cannot be used directly, rather it exists here in order to showcase the methods and properties of all the actions.
public class BaseActionObj
- Inheritance
-
BaseActionObj
- Inherited Members
Properties
- CurrentPoint
Returns the current mouse location in World Coordinate System
- DefaultActions
Defines if the basic actions (panning with left mouse, zoomming with mouse wheel, zoomExtents with double click) will be used during the Action. Any of them can be disabled or enabled.
- DispProps
Gets and sets the action's display properties number. This number defines if the fill color of the created Entities will be using the action's crossfillcolor or fillcolor (check ACTION_DISPLAY_USEFILLCOLOR, ACTION_DISPLAY_USECROSSCOLOR, ACTION_DISPLAY_DEFAULT).
- DrawActionDefault
Get/Set if the default rubber reference line will be drawn
- IsSelectMode
Defines if the action is in select mode , waiting from the user to select entities
This is done by default by the vdcanvas.scriptCommand ->select , move rotate etc./>
- OrthoMode
Get/ Set the OrthodeMode that controls the action movement to be parallel to X,Y Axis
See also SetActionOrthoMode(bool)
- OrthoPoint
Returns a point in World Coordinate System parallel to x or y axis relative to ReferencePoint and when the OrthoMode is on
If OrthoMode is off then the null is return
- OsnapPoint
Returns the current osnap location in current View Coordinate System as an array of 4 values x,y,z,osnaptype osnaptype can be one of the following OsnapMode_END , OsnapMode_MID , OsnapMode_CEN, OsnapMode_INS, OsnapMode_NEA, OsnapMode_NODE, OsnapMode_QUA, OsnapMode_PER, OsnapMode_EXTENSION, OsnapMode_APPINT, OsnapMode_APPEXT
- PanMouseButton
Specifies which mouse button will perform the pan action. Default is MouseLeftButton
- ReferencePoint
Get/Set the reference point of the action in World Coordinate System in case the actionType is other than ACTION_POINT_WORLD
- ResValue
Gets the point or points concerning the action that is being executed.
Developer must get this value only when the action is finished with flag 'end' inside the function delegate that is passed with in GetUserPoint(onStateChangedDelegate) or GetUserLine(onStateChangedDelegate) or GetUserRect(onStateChangedDelegate)
In case of actionType == ACTION_POINT_WORLD it is a point with (x,y,z) in world coordinate system
In case of actionType == ACTION_LINE_WORLD it is an array of two points in world coordinate system.The first one if the refeference point and the second is the result of the user pick point.
In case of actionType == ACTION_RECT_VIEW it is an array of two points in view coordinate system.The first one if the refeference point and the second is the result of the user pick point.
Note: When OrthoMode is on and actionType == ACTION_LINE_WORLD then the user pick point has the same Z value as the ReferencePoint
- RotateModelOrigin
Get/Set the origin used to rotate the scene model
- RotateMouseButton
Specifies which mouse button will perform the 3d model rotate action. Default is MouseRightButton
- TouchCancelTimeOut
Get/Set a delay in miliseconds after which the action will be canceled, and when the user pointer is pressed and is holds for this delay. If it is 0 then the action will not canceled. Default value is negative(-1200) then automatically scan if is touch screen device supported and if so , uses absolute of the value for delay, else it uses value of 0. Useful for touch pointers. A suggested value for single touch pointers is 1200.
- TouchSupported
Returns true if tha action is supported by touch events.
- ZoomScaleMouseButton
Specifies which mouse button will perform the zoom in - zoom out action. Default is MouseMiddleButton
- actionCount
Gets the count of the actions that have been initiated whithoug being ended in the document.
- actionType
Gets the action's type (check ACTION_POINT_WORLD, ACTION_LINE_WORLD, ACTION_RECT_VIEW).
- customData
Returns the user custom data for this action
- render
Return the render context used to draw when the action is active. It can be passed as extra parameter in DrawEntity(object, object, int) exmaple vdcanvas.DrawEntity(entity,vdcanvas.ActiveAction().render);
Methods
- DrawDefaultAxis()
Draws the default cursor in the current position
- DrawPoint()
Returns the action point in World Coordinate System used to draw, which is OrthoPoint if it is not null else CurrentPoint
- IsCanceled()
If true, the Action has been canceled by the user.
- IsPaused()
Get the pause status of the action
- IsStarted()
If true, the Action has been initiated.
- Pause(int)
Pause the active user action.
- Resume()
Resume the active user action previous paused by Pause(int).
- SelectedPoint()
Returns the finally user selected point in World Coordinate System, after the action was successfully finished
- cancel()
Cancel user active action
- draw(bool)
Draw/Hide the action drawing elements. If call it like draw(true), hides the action context, else draw() shows the context
- parse(string)
Parses the passed command string
Returns true if successful
For example user can pass a text input from a textbox in the following form
1. x,y,z coordinate values
separate values by ',' symbol
vdcanvas.ActiveAction().parse('5.5,2.1,0.5');
2. distance < angle polar values
distance is a double value in drawing units
angle is a double value in degrees
separate values by '<' symbol
vdcanvas.ActiveAction().parse('7.8 < 45.0');
3. Xoffset,Yoffset relative values
vdcanvas.ActiveAction().parse('@2.5,3.7');
NOTE: A prefix '@' is needed
- vdrawOwner()
The action's vdrawObj owner.