70001249 Handle AddBlockFromFile load

Article 70001249
Type Wish
Product WebJS
Version 7012
Date Added 1/5/2018
Fixed 7.7014.0.5 (1/5/2018)
Submitted by VectorDraw Team


How can i know when a block has been loaded successfully.


A new delegate in AddBlockFromFile method was added in versio 7014.0.5 so user will be able to know when the block has been loaded successfully.
Bellow is an example for how to use the delegate.

  function _loadedDelegate(xrefargs) {
          var block = xrefargs.Block;
          vdcanvas.scriptCommand.blockref("myblock", null);
  function test() {
          var blk = vdcanvas.AddBlockFromFile("test.vds", "myblock", false, _loadedDelegate);

Send comments on this topic.