Article | 70001885 |
Type | Wish |
Product | WebJS |
Version | 8006 |
Date Added | 12/10/2020 |
Fixed | 8.8007.0.1 (12/10/2020) |
Submitted by | Bogumil Styczen |
Summary
I would like to pass a file data string to AddBlockFromFile method instead of a filename of a .vds file.
Solution
In version 8.8007.0.1 we add a new parameter on the AddBlockFromFile method so the user is able to pass a file data string instead of a filename of a vds file.
AddBlockFromFile(string filename, string blockname, bool overwrite, vdLoadXrefDelegate loadedDelegate, string fileDataString)
"filename" > The filename of the file from where all the entities for the block will be taken.
"blockname" > The name of the block to be added.
"overwrite" > If the passed blockname exist and the overwrite is true the the block entities will be replaced from the passed filename drawing model entities.
"loadedDelegate" > Optional. If present, is a user define function that will be called when the block if successfully loaded.
"fileDataString" > Optional.If present and not is null represents the contents of filename that used to be loaded instead of downlonding the paseed filename.
returns > The created block object.
Note If we pass a file string data instead of a filename of a .vds file, we have to pass again a filename which maybe does not exist.