New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement BIM diagram on JavaScript client #632

Open
wxxtqk opened this Issue Oct 20, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@wxxtqk

wxxtqk commented Oct 20, 2017

requirejs.config({
    baseUrl: address + "/js", // address should be the address of your bimserver, including optional port
    urlArgs: "bust=" + version // the version you use here will be used for caching
});

requirejs(["bimserverapi_BimServerApi", "bimserverapi_BimServerApiPromise"], function(BimServerApi, BimServerApiPromise) {
	if (address.endsWith("/")) {
		address = address.substring(0, address.length - 1);
	}
	if (BimServerApi != null) {
		var bimServerApi = new BimServerApi(address, notifier);
		bimServerApi.init(function(){
			// This function gets called on success, you can use bimServerApi now
		});
	} else {
		// error
	}
}, function (err) {
	// Error
});

i think this demo code is not complete,can you give me a detailed document

@rubendel

This comment has been minimized.

Show comment
Hide comment
@rubendel

rubendel Oct 25, 2017

Member

Would be useful if you would tell is where this example comes from. If you are trying to run on NodeJS or similar, that's not working at the moment.

Member

rubendel commented Oct 25, 2017

Would be useful if you would tell is where this example comes from. If you are trying to run on NodeJS or similar, that's not working at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment