Skip to Content
0

failed to load content resource

Sep 27, 2017 at 09:37 AM

40

avatar image

Hi,

I am trying to load my .vds file into view but it is throwing an error saying “Failed to build a scene from the loaded content resources. code: -6, message: Incorrect format”. Please give the solution to my email id raheenafshan1@gmail.com.

Below is the code,

	
<App>
 <pages>
	<Page title="{i18n>title}">
	     <content>
		<MessageStrip class="sapUiSmallMarginBottom" text="To play each step select the step or else can play all steps together" showIcon="true"/>
		<vk:Viewer id="viewer" toolbarTitle="3D Viewer" enableSceneTree="false" showSceneTree="false" showStepNavigation="true" visible="true"
						width="100%" height="85%">
                </vk:Viewer>
	     </content>
	</Page>
  </pages>
</App>

// Controller

jQuery.sap.require("sap.ui.vk.GraphicsCore");
sap.ui.define([
	"sap/ui/core/mvc/Controller",
	"sap/ui/vk/ContentResource"
], function(Controller, ContentResource) {
	"use strict";


return Controller.extend("threeDObj.controller.View1", {


onInit: function() {
	var mainScene;
	var that = this;
	var sourceData = {
	localFile: undefined,
	remoteUrl: "images/myTurbineNewWithoutAllSteps.vds"
	};
	var view = this.getView();
	var viewer = view.byId("viewer");
        that.loadModelIntoViewer1(viewer, sourceData);
},
loadModelIntoViewer1: function(viewer1, sourceData) {
	if (viewer1.getScene() === null) {
             var source = sourceData.remoteUrl || sourceData.localFile;
	     if (source) {
		var contentResource = new ContentResource({
				        	source: source,
						sourceType: "vds",
						sourceId: "abc"
					});
		viewer1.addContentResource(contentResource);
		}
	}
    }
});
});

Regards,

Raheen

error1.png (29.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers