Method GetDocument
- Namespace
- vdWebLibrary
- Assembly
- JsPropertiesExtractor.dll
GetDocument()
Returns the document object associated with the control, or null if no document is selected.
the return document object model has mostly the same structure of properties as the VectorDrawFramework VectorDraw.Professional.vdObjects.vdDocument object
public object GetDocument()
Returns
Examples
// Inside vdAfterOpenDocument handler:
var doc = vdcanvas.GetDocument();
if (doc != null) {
var path = doc.pathname; // access document properties
}
Remarks
The returned object represents the in-memory document referenced by this canvas.
Note that the returned document object is an in-memory representation of the .vds file, and not the file itself.
Modifying the returned document object does not affect the original .vds file on disk, and any changes will be lost when the document is closed or a different document is selected.
Accessing the document is generally safe inside event handlers such as vdAfterOpenDocument.
If no document has been selected via SelectDocument(string, bool, SelectDocumentFinishedDelegate)
or loaded via SelectDocumentBlob(string, string, SelectDocumentFinishedDelegate), this method returns null.