On translation of RVT file to SVF, I also want to post a job to translate and download an IFC file. Opening that IFC file after translation, it seems to use CV1 - Coordination View 1, which is a very old Model View Definition (hardly in use anymore and only for IFC2x3). If I export same RVT file in Revit 2016 with newest IFC exporter downloaded, choosing CV1 as an option, the file size of the IFC file translated from Revit is half the size of that from Forge. Is there a way to specify which MVD to use for the IFC translation using Model Derivative API, as it is in Revit (CV2, COBIE, IFC4 RV/DTV)? Since it seems that Forge uses the Revit IFC exporter, I would anticipate this be an option, but so far I have not succeeded finding it.
2019 Update
Just got informed, the issue REVIT-125299 has been resolved according to our engineering team. So, please try to submit the job body like below, use IFCExportOption instead, then you will obtain an IFC exported with the specified export setting. Cheer!
{
"input": {
"urn": "{{base64URN}}"
},
"output": {
"formats": [
{
"type": "IFC",
"views": [
"2d",
"3d"
],
"advanced": { //!<<< export options start
"IFCExportOption": "IFC4 Design Transfer View"
} //!<<< export options end
}
]
}
}
The old
After checking with our engineering team, Forge MD has supported to set IFC export options up like in Revit. For example,
{
"input": {
"urn": "{{base64URN}}",
"compressedUrn": false,
"rootFilename": "{{Filename}}"
},
"output": {
"formats": [
{
"type": "IFC",
"views": [
"2d",
"3d"
],
"advanced": { //!<<< export options start
"exportSettingName": "IFC4 Design Transfer View"
} //!<<< export options end
}
]
}
}
IFC exporter will try to seek for the saved export settings in your uploaded RVT based on the exportSettingName. If there is no matched setting, it will use IFC2X3 by default as I experience.
But there is a issue related to this feature, the output might not matched with the export settings, it has been logged as request id REVIT-125299 in our internal case system to make our team to allocate time to investigate. Apologies for any inconvenience caused.
However, you can sent the request id to forge.help#autodesk.com in the future to track updates. Thank you~
P.S. The above code sample might be changed in the future, please follow with the official documents: https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/
Related
IFC model has been uploaded and translated to SVF.
the problem is reproduced on https://autodesk-forge.github.io/forge-tutorial-postman/display_svf.html. The viewer is rendering forge logo indefinitely. The console shows an error:
"TypeError: undefined is not an object (evaluating 't.children.length')"
We are experiencing this since Tuesday, 26 Oct, 2022 06:45 AM (GMT).
This is the body of the Translate Job Post API:
{
"input": {
"urn": "{{t4_ossEncodedSourceFileURN}}"
},
"output": {
"formats": [
{
"type": "svf",
"views": [
"2d", "3d"
],
"advanced": {
"conversionMethod": "modern",
"buildingStoreys": "show",
"spaces": "show",
"openingElements" : "show"
}
}
]
}
}
The same model is successfully presented when translated to SVF2.
We tested this executing multiple scenarios using multiple models.
Using postman collections, both versions with signedcookies and without show the same behavior.
In our system , we are translating models to SVF and downloading derivatives to serve those from our own servers. The same behavior is noticed there. We are using forge-server-utils version 8.3.4 for download
Also, vscode-forge-tools Visual Studio Code extension shows the same behavior.
Models translated before the date indicated above are rendered correctly.
Kindly asking for help, this has a big impact on our service.
Hi we are trying to export a saved view from the forge viewer.
When trying to export a view with hidden entities we find that the hidden entities do not get removed from the export and the entire model gets exported as it is.
We also tried doing this in postman by only giving the dbIds of entities visible in the model. The results were same, entire model got exported instead of only the non-hidden entities.
We are doing this using the forge model derivatives API- https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/translate-to-obj/
To extract geometry in OBJ you can follow this : Extract Geometry
As you can see, you can specify dbids you want in your extract.
After the extraction is done, check the manifest and you will get all OBJ files with the list of extracted dbids like this :
{
"modelGuid": "b90bbb37-d60e-412c-aedc-bf8c049f0dc7",
"urn": "urn:adsk.viewing:fs.file:URL_SAFE_URN_OF_SOURCE_FILE/output/geometry/b576231b-9684-3609-8fa0-1221a424a77c.mtl",
"role": "obj",
"guid": "fed3c1b1-3c99-34d1-81f1-79f6fea72576",
"type": "resource",
"objectIds": [
4,
5
],
"status": "success"
}
Is there a way to translate only a specific view to IFC using the Forge Model Derivatives API? More specifically, is there a way to make it so "only export elements visible in view" were checked in the Revit export settings with a particular view selected?
To enable Export only elements visible in view, you need to the following:
Create a new IFC Export Setup Option, and check Export only elements visible in view, then give it a name to save it in the RVT file
Save changes to the RVT file
Update the modified RVT model with your own IFC export option to your Forge bucket
Submit a translation via POST job and specify your IFC export option name in the advanced.IFCExportOption like below:
{
"input": {
"urn": "{YOUR_RVT_BASE64_URN}"
},
"output": {
"formats": [
{
"type": "IFC",
"views": [
"3d"
],
"advanced": {
"IFCExportOption": "{YOUR_IFC_EXPORT_OPTION_NAME}"
}
}
]
}
}
I followed the instruction in the link below to extract Room objects from Revit models:
https://forge.autodesk.com/blog/new-rvt-svf-model-derivative-parameter-generates-additional-content-including-rooms-and-spaces
I made the changes as instructed and tested the sample Revit file (rac_basic_sample_project.rvt). But, still I don't see the rooms or the viewables (phases). Below is fhe request I post. Am I missing anything?
{
"input": {
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YzQ4ZDUxNDNhMDRiNDAxNmI3ODYxY2NlMzQ2ZDkyNjdfZmFjaWxpdHlfOTUvZWIyYzMzNDgtNDAxYS00ZjQ3LTgwM2EtMjM1OGYwYmI0YjY2LnJ2dA"
},
"output": {
"destination": {
"region": "us"
},
"formats": [
{
"type": "svf",
"views": [
"3d"
],
"advanced": {
"generateMasterViews": true
}
}
]
}
}
I just tested the feature and I can see the room data:
The JSON payload seems ok, so try checking the following things:
Make sure you use the x-ads-force header (explained in the blog post you linked to); if you had already processed your Revit model before, triggering a new Model Derivative job would not do anything unless you force the translation
Try using another design (and from a newer version of Revit if possible); in my screenshot I'm using one of the official samples for Revit 2020, although I remember being able to get the room data from older samples as well
The room data is only available in certain "viewables" so make sure you're looking at the right one; for my sample project, for example, the room data is not available in the "{3D}" viewable but it is available in the "Working Drawings" viewable
I´ve already had a look at different post like this and this but nothing seems to be answered 100%.
My current problem is, that I want to visualyze - and ideally - analyze my Neo4j-Graph with a library (or software/tool).
The database-server is running on a remote (virtual) server and it seems that there is no chance to export the database to a format where I can work on with.
I´ve tried exporting the graph in a .graphml-file to import this file in Gephi, but Gephi doesn´t find the properties. Gephi-streaming with apoc-procedures and the graph-streaming plugin also does not work, because it´s a remote server (also with the tool mentioned here).
Now I´m currently testing around with Alchemy.js... So far, so good. But as it seems there´s no way to export the graph/query to the GraphJson-format?
Is there really no "easy" way to export the data?
Thanks for your help in advance!
This is how I would proceed
Run this query from the post you mentioned in the Neo4j Browser or in any bolt driver:
MATCH (a)-[r]->(b)
WITH collect(
{
source: id(a),
target: id(b),
caption: type(r)
}
) AS edges
RETURN edges
Now that you have loaded the data, you can simply download it as JSON using download button.(if you are using bolt driver ignore)
Either you manually downloaded JSON from Neo4j Browser or you are using bolt driver, you will end up with something like this.
{
"columns": [
"edges"
],
"data": [
{
"row": [
[
{
"source": 31288,
"target": 152,
"caption": "HAS_PAYMENT_METHOD"
}
]
],
"meta": [
null
],
"graph": {
"nodes": [
],
"relationships": [
]
}
}
]
Now all you have to is to filter out data.row results and you are done. Probably using bolt driver is the better choice as you have to clean up data anyway and it doesnt run into issues with returning a lots of data to the browser(it might crash).
Update: added python version
from neo4j.v1 import GraphDatabase
driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "neo4j"))
session = driver.session()
result = session.run("MATCH (a)-[r]->(b) WITH collect({source: id(a),target: id(b),caption: type(r)}) AS edges RETURN edges")
for record in result:
print(record["edges"])
Hope this helps