







JsPropertiesExtractor | Send comments on this topic. |
dim Method | |
See Also Example |
![]() |
vdWebLibrary Namespace > ScriptCommands Class : dim Method |
- parameters
- Null for user input or an array of parameters in the following order, used for no user action. 1.Dimension line point 1 in world Coordinate System 2.Dimension line point 2 in world Coordinate System 3.Dimension line location in world Coordinate System 4.optional Dimension line text.If not present then the length of the dimesion is used
- callback
- A user function of ScriptEntityDelegate type, that will be called when the command finish successfully.It can be ignored.
JScript | |
---|---|
public function dim( parameters : Object[], callback : ScriptEntityDelegate ); |
Parameters
- parameters
- Null for user input or an array of parameters in the following order, used for no user action. 1.Dimension line point 1 in world Coordinate System 2.Dimension line point 2 in world Coordinate System 3.Dimension line location in world Coordinate System 4.optional Dimension line text.If not present then the length of the dimesion is used
- callback
- A user function of ScriptEntityDelegate type, that will be called when the command finish successfully.It can be ignored.
We create a new line from [-3,-3,0] to [3,3,0] and we add a new vertical,horizontal and align dimension on it
C# | ![]() |
---|---|
|
if passed parameters not exist or it is null then start a new user action and prompts the user to draw a dimension line.
If parameters are not null then a new dimension block is added synchronously depend on the passed parameters.
The command add the action to undo history and also to script lines getCommands
If parameters are not null and after this command is finished the object is not drawn on screen
In order to display it call DrawEntity and Refresh inside the user define callback .See example.