Table of Contents

Method SelectDocument

Namespace
vdWebLibrary
Assembly
JsPropertiesExtractor.dll

SelectDocument(string, bool, SelectDocumentFinishedDelegate)

Opens the given filename. If reload is true the drawing will be reloaded from its source. We are also able to pass parameters in the function and an access token like: vdObj.SelectDocument("vddocument.vds?param1=param1& param2=param2&token= 123"); or vdObj.SelectDocument("vddocument.vds?token= 123"); Note: The token parameter has to be written exactly like: token= myvalue.

public void SelectDocument(string filename, bool reload, SelectDocumentFinishedDelegate finishedcallback)

Parameters

filename string

The filename or URL of the document.

reload bool

If false the document will be loaded from cache if available.

If not available in cache or parameter is true, the document will be loaded from its source.

finishedcallback SelectDocumentFinishedDelegate

A user define function to be called when the procedure finished

Remarks

The function is running asynchronously, vdAfterOpenDocument is fired when the selected file is loaded Also the vdprogress is fired to display the progress

If the document has an external reference (xref) to another document, you may have to override vdLoadXref method in order to select the right path for the external reference drawing. Note that if the main selected drawing and the xref exist in the same path as the html page, you don't have to override the vdLoadXref because the xref will be loaded automatically without the need to specify its path.