We essentially work with Revit and its API.
We export our Revit models into Forge for our customers to view them.
But we would like them to be able to do simple modifications (such as textures modification) and later larger modifications (change an object for another). And of course visualize the modified model.
Let's start with the simplest task: modify a texture. Is that possible? I understand from that post that I could modify metadata of the model. Does this include textures, and does it mean that the modified texture will appear in the model in Forge?
Thanks by advance
Benoit
In general, the answer is Yes. You can use the API to modify the metadata, geometry and texture as you mentioned. You can do most of the job that you did in your Revit desktop plugin which doesn't require UI interaction. Of course, it still has some limitation, please refer Design Automation for Revit limitation for some details.
Back to your question to view the Revit model, that's another topic, after you modified the texture of Revit model, you need to trigger another translation and then view it in browser, there are some issue or limitation of Revit material/texture to be translated/viewed in Forge viewer, handle revit custom texture is some suggestion while viewing custom texture.
Related
We have been using Autodesk Forge for viewing our STL 3D models, this has been working great.
We have some new file types, glTF (.glb) that we would like to use. Unfortunately the Measuring Tool in the Viewer is only allowing a small area for measurement.
When the model is loading into the viewer it is loading it in "sections". I am only able to measure one of those sections.
You can view an example here:
https://architecturalinfo.com/autodesk-forge/viewer-test.html
I appreciate your help.
From your demo site, I can see you're using a legacy Forge Viewer (v6.6.4), please consider upgrading it to v7 at least. Our engineering team made lots of improvements on this.
I tested the sample experiment/gltf2 from this blog, and it looks fine. The measurement tool works as expected.
https://forge.autodesk.com/blog/gltf-20-support-forge-viewer
I am working on a Revit plugin to run on Forge (Design Automation app) that exports a 3D view through a custom exporter. As an input argument, it requires the name (or ElementID) of one of the 3D views from the Revit model. Is there a way to query the name of the views of a Revit model through other Forge solutions (like Data Management API)?
I couldn't find anything, if there is not an http api for that I assume I have to do it as part of my plugin run. What's the best to do that then?
Should I have a separate plugin that extracts the view names?
Thank you so much!
From your description, it appears that you have very little experience with Revit API add-ins. Maybe you should take a look at the getting started material first and work through the video tutorial. It explains a lot of important fundamentals, including covering this current question of yours.
The (almost) one and only way to retrieve elements from the Revit database is to use a filtered element collector. That would be the method of choice to find the element id of the 3D view you are looking for.
You cannot have searched very exhaustively, because many discussions by The Building Coder on the custom exporter and other topics include a code snippet showing how to pick a 3D view suitable for exporting.
To ensure you really have a 3D view set up just as you need it, you might prefer creating a new one from scratch.
Out of curiosity, is your task associated with the discussion thread on Revit API vs. ReCap API for historic project?
Actually, I want to find a way to work with .rvt file without starting Revit Application. I want to create monitoring plugin to track changes in Revit Document Model. I suppose it can be made with Application events DocumentChanged. But it may slow the work with model for users. So I'm trying to find a way to work with .rvt file without starting Revit. So, does command that implements IExternalDBApplication need working instance of Revit application?
Your question is confusing.
I assume you are confused.
There are two ways (and two ways only) to access Revit API functionality:
Install Revit on the desktop and launch an interactive end user session. Within that session, you can set up a .NET Revit add-in to subscribe to certain events and make use of the Revit API functionality within those event handlers.
Make use of the Forge Design Automation API for Revit.
In the latter case, you do not have Revit installed locally.
Instead, you upload your application to the Forge system and make use of the Forge API via HTTP requests to launch a Revit engine in the cloud and process your Revit API functionality.
In both cases, however, there is a running instance of the Revit application somewhere providing the Revit API functionality you make use of. This cannot be avoided.
Some helpful links for you:
Getting started with the Revit desktop .NET API
Forge Design Automation for Revit
The Building Coder discussion on DA4R, Design Automation for Revit
I hope this clarifies.
I'm building a cross platform 3D viewing application in C#/C++ and would like to add support for Autodesk SVF files.
I looked at Autodesk Forge but it has limited support for exporting to open formats such as OBJ, and Autodesk SVF does not appear to be the same format as the similarly named Simple Vector Format (http://www.svf.org/) as was stated here: https://forge.autodesk.com/blog/updated-little-more-detail-behind-autodesk-forge-apis-0
Is there a schema or specification available somewhere that details the structure of Autodesk's SVF format?
The short answer: no there isn't as it's a proprietary format (that has been breached in some country already and legal actions were needed to resolve the issue...)
The long answer and please view this as my personal rambling w/o any real authority or credibility:
I'd recommend to stay tuned to the official Forge website and see if they'd choke up more info on SVF(aka the Streaming Viewing Format) for public knowledge.
I am an App developer with no experience with AutoCAD at all, and for my current project I need to convert DWG files into Spatial Data - ESRI Shapefile / GeoJSON, etc.
Given that DWG is a proprietary format owned by Autodesk, the Autodesk Forge API becomes my only option to interpret such file. I have been evaluating the Model Derivative API for a week now, and what I found is that it won't work for my purposes. It has only 3 output formats (f2d, f3d, rvt) for DWG files and none of them fits my purpose.
For this reason, I started to look at others API's in the platform and ended up finding the Design Automation API which might be helpful, however it lacks documentation.
One of the examples in the API is the PlotToPdf activity that exports a DWG into a PDF. I wonder if there is a way to export other formats other than PDF.
I tried to find the possible "commands" in the interface by listing all the activities, workItems and AppPackages but none of these end-points returned me any useful information.
So here are my questions?
How can I can convert a DWG into a non Autodesk format? Being more specifically, the output must be an open format that I can interpret without using proprietary tools.
If the answer for the first question is Autodesk Forge API, which one should I use?
In case I should be using Design Automation API for that, where can I find complementary documentation once the one provided is lacking details?
I would say that Design Automation API is the best option if you don't have (or don't want) AutoCAD running (or any other DWG compatible desktop app).
To be complete: Design Automation includes an instance of AutoCAD running on the cloud, where you can upload a .DWG with a sequence of commands (script) and a .NET custom app to execute more advanced routines. Then download the results. By default, neither AutoCAD nor Design Automation can export to GIS formats (like those you mentioned), only some verticals, like Civil 3D or Map 3D, but these are not available on Design Automation. As you mentioned, Model Derivative API (via REST calls) don't have what you need, it's focused on metadata, not the specifications of the geometry.
Design Automation API supports the same commands AutoCAD Console does. For DXF creation, you can use DXFOUT command, your script would be something like (not tested):
FILEDIA
0
DXFOUT
outputfilename.dxf
QUIT
As per comment, it's a huge effort to just convert to .DXF. I'm not familiar with other libraries do perform the same task.
Now I'm not an expert on GIS data formats, but you may consider move from .DWG to .DXF then an approach like described here.
I don't quite understand this point that you are making in the comments:
I would only use the API to convert DWG to DXF, which means a huge waste of resources considering the monthly cost of the API and the time to develop and maintain the interface.
Can you clarify? Are you saying that transaction cost for Design Automation is too high? Or are you saying that development cost associated with deploying the script that Augusto gave you is too high?
Thanks
Right now the derivativeApi is the way to go for this: You can convert any input format from this list (https://developer.autodesk.com/en/docs/model-derivative/v2/overview/supported-translations/) to the "intermediate format" svf and the convert the svf file to obj for example. This will also create a material file which can be downloaded seperately. I am evaluation the forge api right now and can produce obj from dwg files right now.