I'm new to Forge, and I would like to build a offline 3d viewer with my server, but the language option is not totally functional, like the screenshot below:
Problem screenshot
The language only in cube is same with the browser configuration (Chinese in picture) , others are all default English words.
All the .js/.css file is stored on server, and if I set the option in Autodesk.Viewing.Initializer({language: '***someLanguage***'}). it's only works in the cube, others are still English.
But if I change the main js file source to AutoDesk's CDN below(other js files still on local server) https://developer.api.autodesk.com/derivativeservice/v2/viewers/viewer3D.min.js?v=v3.3 (both of the versions are same within offline and online), the language will completely be replaced by option and works right.
For reproducing the problem, you can export a model from https://extract.autodesk.io/, then run the download files in a local http server.
In china we got bad connection with oversea server, so I would prefer local storage for better UE, are there some get/post requests should be handled on local, and I missed it?
I tried with language: 'zh-Hans' and worked fine, also tried and Chinese (seems fine). Using Viewer v6. As per license you should be using the .js file from Autodesk hosted URL (i.e. CDN):
The Autodesk Forge viewer can only be used to view files generated by Autodesk Forge services. The Autodesk Forge Viewer JavaScript must be delivered from an Autodesk hosted URL.
Related
I would like to be able to use a local navisworks or revit file to be available when using an online viewer app on forge.
I have so far followed the tutorial here - https://learnforge.autodesk.io/#/datamanagement/oss/ that allows me to upload a file for viewing from the client side. I would like to remove the ability to upload from the client side and choose a local file to be viewed instead.
I would also like to know how to remove additional buckets / objects placed from the client side from the side menu (circled in the image)
Thank you in advance!
All our sample apps work like this (e.g. https://github.com/Autodesk-Forge/learn.forge.viewmodels/tree/nodejs):
all the client-side content (html, js, css) is in a specific folder (in case of nodejs samples it's called public)
all the rest is part of the server-side
all the Forge related functionality is exposed to the client-side through server-side endpoints
When the page is opened then the browser fetches the client-side components (1) - i.e. html, css, js files
When needed, the client-side code calls an endpoint on the server (2) which in turn reaches out to Forge (3) and passes back the result to the client
The only client-side part that communicates directly with Forge is the Viewer (4)
If you want to remove some of the functionality presented to the user, you can just remove them from the client-side part (e.g. from the html file)
In the server-side code, you can also combine multiple Forge calls: e.g. create a bucket, upload model file into it from the server, translate the model to SVF
If there are operations you only want to do just once (e.g. delete a bucket), you can also use utilities like https://oss-manager.autodesk.io/ or use this Visual Studio Code Extension: https://forge.autodesk.com/blog/forge-visual-studio-code
If you want to add controls to the toolbar this should be of help: https://learnforge.autodesk.io/#/tutorials/extensions
If you want to add something custom then you can use HTML/CSS/JS in your client-side code to implement those
I have a word file, and I want to open up that word file for preview/viewing purposes only, not to edit. How could I go by this?
I have a Django application and one of the main purpose of the application is to view documents that people upload on the site. However for testing purposes I cannot get to preview documents for reasons I do not know.
I am using Microsoft office viewer to view the files.
This is my html code in Django:
<iframe
src="https://view.officeapps.live.com/op/embed.aspx?src=http://127.0.0.1:8000/media/project/1/f73ab109-dcaa-4cc3-bbfc-7121eca10118.doc">
</iframe>
And of course media/project/1/f73ab109-dcaa-4cc3-bbfc-7121eca10118.doc is the location of the file. The error displayed in the html:
I am assuming that the office viewer is expecting a "real" internet directory and not something locally.
The solution is simple.
To open a file from something like Office Viewer, the file must be accessible from anywhere on the Internet.
"127.0.0.1" is your local loopback address, which is accessible only from your computer, so the Office Viewer can not access.
Even in a test environment, you will need to upload the media file to public storage and make it accessible from the Internet.
Deploy your Django App to a publicly hosted instance, or use Django-Storage app to serve MEDIA files from a public storage service such as AWS S3.
Is there a local version of the SVF translation process that I could use locally on my computer without having to send my design to forge platform ?
- a standalone application under Autodesk license
- or a revit module ?
I work on project where people do not want to send their design online but still want to use the local version of the viewer.
thank you.
Autodesk Forge doesn't offer a locally hosted translation service. Unfortunately, that means that if your customer is not willing to even temporarily upload their file to the Autodesk server, then they cannot use the Forge Viewer to view their files.
If your customer is ok to temporarily upload a file, then they can upload the file, translate it, download the resulting SVF, and then delete the original file. This sample on GitHub demonstrates that process - https://github.com/cyrillef/extract.autodesk.io.
You can use 3ds MAX to export your files to SVF
I have a static website with 7844 pages on 1 topic (schools in Holland). This is based on 7844 named folders with 7844 index.html files, total size 209 MB. E.g. this is a published page.
The manual upload to my AWS S3 bucket (management console, select bucket, select folder, select upload, drag and drop) is very slow, it sometimes takes 12 hours to upload a new version of all pages.
I therefore wanted my Synology DiskStation to do the upload in the background. Using the DiskStation "Cloud Sync" tool.
The upload runs but the result is strange: the uploaded page is no longer served as webpage by S3 but instead triggers a download of the index.html files. E.g. this page that was uploaded by DiskStation Cloud Sync.
Hoping for an explanation of this behavior and advise on the best solution to do the upload in an easy way... (I am looking into using boto on python now).
FYI Synology tech support has analysed the logfiles and confirms that this is an issue with the software. I.e. Cloud Sync 'isn't setting the correct mime types for a static website' as Mark suggested. -> The issue is that the mime type on set by Cloud Sync is "document". It would need to be "text/html" for the browser to view it as a website.
Synology Technical Support recorded the issue and states that their developers are working on it and hope to fix it in future Cloud Sync package update.
I am very much impressed by the way this app was build , https://chrome.google.com/webstore/detail/visual-history/emnpecigdjglcgfabfnmlphhgfdifaan
I wonder if SAP Lumira was involved in this application, for the live visualitations to work fine. but i am not sure of how it was developed as an app as it can only export as png files and the data can only be from flat files and hana database. Any help to analyse the nature of this application is appreciated.
I think your question is not stated correctly: it's like asking "how to build visualizations for the web" (in other words, it's too broad and it's not specific to Chrome apps). I think what you want is a way to analyze the source of an app. What you can always do for that is:
After installing the app you're interested in, visit chrome://extensions.
Turn on the Developer mode (a check box in the upper-right corner).
Find the app in the list and note down its app ID.
Go to Chrome settings directory, e.g. ~/.config/google-chrome for Linux - the location will depend on the OS and the Chrome channel that you're using.
Find the app's installation directory, which will look something like <Chrome settings directory from #4>/Profile N/Extensions/<app ID>/<app version>.
You will see the entire app's source there.
Specifically for this app, you can see in the sources that it uses something called JavaScript Graph framework (see /canvas.js) together with D3.js (see /protovis-3.2/).