







JsPropertiesExtractor | Send comments on this topic. |
blockref Method | |
See Also Example |
![]() |
vdWebLibrary Namespace > ScriptCommands Class : blockref Method |
- blockname
- The name of an existing block in the GetBlocks .Required.
- parameters
- A array of parameters in the following order, used for no user action. 1.Insertion point in world coordinate system, as an array of 3 numbers(X,Y,Z) 2.Scale in X,Y of the block 2.Rotation angle in radians
- callback
- A user function of ScriptEntityDelegate type, that will be called when the command finish successfully.It can be ignored.
JScript | |
---|---|
public function blockref( blockname : String, parameters : Object[], callback : ScriptEntityDelegate ); |
Parameters
- blockname
- The name of an existing block in the GetBlocks .Required.
- parameters
- A array of parameters in the following order, used for no user action. 1.Insertion point in world coordinate system, as an array of 3 numbers(X,Y,Z) 2.Scale in X,Y of the block 2.Rotation angle in radians
- callback
- A user function of ScriptEntityDelegate type, that will be called when the command finish successfully.It can be ignored.
C# | ![]() |
---|---|
|
C# | ![]() |
---|---|
// Inserts a new block in the document using active , color , linetype,layer etc properties, reference to block with name 'VectorDraw', insertion point 2,2 Scale 2 and rotation angle 45 degrees |
C# | ![]() |
---|---|
// Inserts a new block in the document using active , color , linetype,layer etc properties, reference to block with name 'VectorDraw', insertion point 2,2 Scale 2 and rotation angle 45 degrees |
if passed parameters not exist or it is null then start a new user action and prompts the user to draw a block reference. If parameters are not null then a new block reference 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.
NOTE: When adding a new text, the characters must be already defined in the vds file that you already select to vdcanvas. By default all characters from 0 to 255 for all textstyles and additionally all characters that are used by vdText,vdMtext objects in the drawing, are exported . If you want to use additional characters or to ensure that some characters always exist in the webControl, you must add them during the vddocument.ExportScript call from VectorDraw FrameWork It can be done by using the 3rd parameter in the parameters argument of the ExportScript
For Example string ensureCharacters = "Coffee - Filter and Ground"; object [] paramenters = new object[]{null,6,ensureCharacters .ToCharArray()}; document.ExportScript("myfilename.vds",null,paramenters );