open an attahced pdf on click of a part in 3d model
I want to open an attached pdf when i click on a part of 3d model.
when i try host.exportDataObject({ cName: "MindSphere_GettingStarted.pdf", nLaunch: 2 }); it throws an error
this is my complete code:
//start
var myMouseHandler = function( event ) {
if ( event.isMouseUp ) {
var myMesh = null;
if ( event.hits.length > 0 ) {
myMesh = event.hits[0].target;
}
if ( myMesh != null ) {
host.exportDataObject({ cName: "MindSphere_GettingStarted.pdf", nLaunch: 2 });
}
}
}
var mouseEventHandler = new MouseEventHandler();
mouseEventHandler.onMouseDown = false;
mouseEventHandler.onMouseMove = false;
mouseEventHandler.onMouseUp = true;
mouseEventHandler.onEvent = myMouseHandler;
runtime.addEventHandler( mouseEventHandler );
