autodesk-forge

How to re-process an existing Autodesk file with updated version?

∥☆過路亽.° 提交于 2019-12-13 03:01:35
问题 We have a scenario where Box(box.com) has multiple versions for same file and we need to update and process the current version of file in our application. Please let me know the process to upload new file version in same bucket and process it. Currently, we are unable to render the updated Autodesk file view. It is still showing the old file view. 回答1: You can simply upload a new version of the file using the same bucketKey/objectKey pair, first make sure that you are using x-ads-force set

persistence of externalId Navisworks files

点点圈 提交于 2019-12-13 02:07:07
问题 I've been using the externalId to uniquely refer to objects in the forge viewer and connect them with outside data about these objects. This has worked well for revit files, which have a kind of GUID 86715290-fa28-4ff5-aef9-8c75d7c81e77-0012917b . Now I'm working with a Navisworks file, and their externalId use looks very different with values like a , 0 or 0/0/0/ . How persistent are these, I can imagine not globally unique, but do changes/removals/additions keep them unique within the file?

SVF model derivative downloaded as an (almost) empty ZIP file (Autodesk Forge)

喜你入骨 提交于 2019-12-12 20:57:23
问题 I have been a happy developer on Autodesk Forge these recent months, and have been able to perform several tasks using the API's. However, I can't seem to be able to download SVF model derivatives properly (derived either from IFC or RVT files). I've tried the direct curl command or the forge-apis NPM package, without success. Oddly the download works fine, but all I get is a ZIP file with empty directories ("geometry", "material", "scene"), and (non-empty) "manifest.json" and "metadata.json"

Determine if node is an assembly or part in viewer

孤人 提交于 2019-12-12 04:45:08
问题 I am looking to determine if a node is an assembly or a part. I have looked through the viewer3D.js code and came across the below flags: Although when I work access these flags, the result is always 0 for all nodes regardless whether it is a GEOMETRY, COMPOSITE OR ASSEMBLY. Are these flags currently in use? Or are they legacy code that is no longer being used? 回答1: You can simply check if the node has children or not. Only leaf nodes have geometry. I don't know of a more direct way to do

Autodesk forge RGraph extension not working properly

╄→гoц情女王★ 提交于 2019-12-12 04:38:06
问题 I have an Autodesk Forge extension(RGraph). I have followed the the steps as mentioned in http://adndevblog.typepad.com/cloud_and_mobile/2016/02/rgraph-chart-library-and-view-data-api.html But I get an error at the function getLeafComponentsRec(parent) and the error would be Cannot read property 'children' of undefined . I have also tried to modify the whole extension according to my knowledge but I'm not successful even there. My modified extension would be something like this. /////////////

How to create a Docking Panel

坚强是说给别人听的谎言 提交于 2019-12-12 04:23:48
问题 How to create a docking panel? I am using the code from the example https://developer.autodesk.com/en/docs/viewer/v2/reference/javascript/dockingpanel/ that should inherit and override needed methods. SimplePanel = function(parentContainer, id, title, content, x, y) { this.content = content; Autodesk.Viewing.UI.DockingPanel.call(this, parentContainer, id, ''); // Auto-fit to the content and don't allow resize. Position at the coordinates given. // this.container.style.height = "auto"; this

Load multiple URN in a same Viewer

匆匆过客 提交于 2019-12-12 04:07:16
问题 How to load multiple URN or and array of URN in a viewer and also use the GlobalOffest of the 1st URN to load the 2nd URN in same viewer 回答1: It's simple, the basic scenario is from this official blog's loadModel function. You can load 2nd model while Autodesk.Viewing.GEOMETRY_LOADED_EVENT was fired and apply 1st model's GlobalOffest to the 2nd model in my experience. Here is the example for this case: function _onGeometryLoaded( event ) { if( urns.length <= 0 ) { viewer.removeEventListener(

Autodesk Forge Viewer : f2d get frag from dbid

岁酱吖の 提交于 2019-12-12 02:46:54
问题 I am trying to fill in room with color on a revit converted file's 2d viewer. I have a Revit file that has "rooms" defined. The Revit file also has sheets defined "Floor one", "Floor two". When I convert it using the Forge API I get a svf for the Revit 3D view and f2d files for "Floor one" and "Floor Two" sheets. For the svf I was able to get fragid from dbids other post Now Im trying to do the same for the f2d files. I am able to change the color of the room walls if I know the wall shapes

How to get location with dbid in 2D

风格不统一 提交于 2019-12-12 01:26:54
问题 How can I get location (x and y) of object with dbid in 2D viewer? What about properties of object with dbid? The format of the 2D file is dwg. 回答1: What about properties of object with dbid? You can use getSelection() method followed by getProperties(dbid, onSuccessCallback, onErrorCallback) which Gets the properties for an ID. Once the properties are returned, the method raises a onPropertiesReady event. You can check the Documentation here. https://developer.autodesk.com/en/docs/viewer/v2

How can I download plan pdf file by bim360 api or sdk?

纵饮孤独 提交于 2019-12-11 20:29:43
问题 According to the documentation (https://forge.autodesk.com/en/docs/data/v2/tutorials/download-file/) I should get the storage object id from included.relationships.storage.data.id. I can do it for all files uploaded to the bim360 except plans pdf files. There is nothing about 'storage' in a whole response. Here is "included" from my response: ''' "included": [ { "type": "versions", "id": "XXX", "attributes": { "name": "1ST FLOOR PLAN", "displayName": "1ST FLOOR PLAN", "createTime": "2019-01