autodesk-forge

Can I create document (pushpin) issues via api?

白昼怎懂夜的黑 提交于 2019-12-25 01:36:42
问题 I want to integrate my web api with bim360 api. In my app I need to create pushpin issues. Can I do it by bim360 api? The documentation says yes and no: https://forge.autodesk.com/en/docs/bim360/v1/tutorials/issues/create-issues/ https://forge.autodesk.com/en/docs/bim360/v1/reference/http/field-issues-POST/ What is the truth? 回答1: Sorry for the confusion, but pushpin issue was supported recently, you can check the ChangeLog for the information. I believe the doc is not updated well, will

Can I change text contents in the viewer?

爱⌒轻易说出口 提交于 2019-12-25 01:26:01
问题 I understand that access to the db is read-only, but can I change the text that is displayed by the viewer, i.e. overwrite the displayValue attribute of MText elements? Kind regards, Gregor viewer.getProperties(dbid, (props) => { // get set of properties for a dbid // var properties = props.properties is an array of properties } { attributeName: "Contents" displayCategory: "Text" displayName: "Contents" displayValue: "some text i would like to change" hidden: false precision: 0 type: 20 units

Autodesk Forge: Measurement and Slice not working - Not an instance of THREE.Object3D

旧时模样 提交于 2019-12-25 01:12:18
问题 I have created a Forge Viewer using version 7 of the viewer3d.js and can view a model within it. My issue is that the measurement and slice tools aren't working as expected. FYI I'm using typescript - angular 8. I'm expecting the graphics to look like this for a slice: Instead the plane and gyroscope symbol never appear: Similarly with the measurement tool, the mouse cursor changes to the measurement cursor, but when i click on a surface, nothing happens. Here is my code for loading the

How do can I load model and change materials before showing it in the Forge Viewer

主宰稳场 提交于 2019-12-25 00:18:03
问题 I want to be able to show a model in the forge viewer but before the model shows I need to change the materials from its defaults. Currently I register the Autodesk.Viewing.GEOMETRY_LOADED_EVENT and when I receive the event I hide the model, change the materials and then show the model. This works except that the default model displays in the viewer for a second or two before I can hide it. How can I prevent that from happening? After initializing the viewer here is code that loads the

Get a list of all objects from loaded model

邮差的信 提交于 2019-12-25 00:15:57
问题 I need to get all the properties from all the objects in the currently loaded model. If I have a list of all the dbIds, I can use the Autodesk.Viewing.Viewer3D.getProperties(dbid,onSuccessCallback,onErrorCallback) method to retrieve them. Is there a way to get a list of the dbIds of all the objects in the viewer? Or is there a better way to achieve this? 回答1: Here is how you can get all the dbIds in the model: Get all database id's in the model Now we also have a function to retrieve

Change content of Model Browser in Forge Viewer

走远了吗. 提交于 2019-12-24 21:26:05
问题 Is there an easy way to change the content of Model Browser in the Forge Viewer? I would like to rename som nodes, add and remove node. 回答1: Unfortunately Model Browser sources its data from the object tree ( model.getInstanceTree() ) which is immutable and can only be extended by re-creating your own data structure. Here’s a couple of good starting points: Data Structure: https://forge.autodesk.com/blog/supporting-multiple-models-new-modelstructurepanel Behavior: https://forge.autodesk.com

How can I create an activity for data conversion in Design Automation API?

二次信任 提交于 2019-12-24 19:42:53
问题 I'm prototyping a web service to convert data using Design Automation API in Autodesk Forge. My approach is to invoke an activity that executes a script to import a target data file (such as STEP, IGES format). As an example, I created an activity to convert a STEP file to DWG as follows: { "HostApplication": "", "RequiredEngineVersion": "22.0", "Parameters": { "InputParameters": [{ "Name": "Source", "LocalFileName": "input.stp" }, { "Name": "HostDwg", "LocalFileName": "$(HostDwg)" }],

Loading IconMarkupExtension

被刻印的时光 ゝ 提交于 2019-12-24 18:55:22
问题 Trying to add labels with text on top of the objects in 3D viewer. I found the following post about an extension that does this: https://twitter.com/augustomaia/status/1205652823733460993 viewer.loadExtension('IconMarkupExtension', { icons: [ { dbId: 987,label: '300C',css:'fas fa-thermometer' } ] }); Loading this extension, produces the following error: "Extension not found: IconMarkupExtension. Has it been registered?" Is this part of the official Extensions? Or is there similar

Download file from Autodesk Forge 3D viewer

被刻印的时光 ゝ 提交于 2019-12-24 11:24:56
问题 How do I download a file from the 3D viewer in Autodesk Forge. I am using 2 legged authorization and I am able to upload files to the bucket, but I am not sure how to download the file from them in the 3D viewer. The code below downloads files but there is nothing contained inside them: var element = document.createElement('a'); element.setAttribute('href', '#'); element.setAttribute('download', node.text); element.style.display = 'none'; document.body.appendChild(element); element.click();

Is there a way to get co-ordinates of the elements of a model?

岁酱吖の 提交于 2019-12-24 08:43:56
问题 For the purpose of comparing two models, is there a method or a function that i can use to get the co-ordinates out of elements of a model. 回答1: Unfortunately, Forge viewer doesn't play well with GIS information currently as I know. Apologizing for any inconvenience caused. However, you can use the following codes to disable the centralize behavior of the Forge Viewer (after v.3.1), if your Revit models are configurated with Revit shared coordinates system. Afterward, you models will be