I am being much too busy in the Revit API discussion forum these days.
However, you can check the discussions there yourself.
Here and now, I'll mention some completely different topics – oops, one of them is from there after all:
ExecuteCommand
The development team recently discussed the question of public documentation and getting started information on storing and querying structural results from Revit via the Structural Toolkit.
We see an increasing number of partners and customers adopting it; still, there is many more who are simply not aware of this.
Some are now struggling to simply understand how to store a results package (e.g., internal structural analysis forces) into Revit elements, such as columns and beams, and how to retrieve it for, e.g., connections design.
Everything you need for this is provided as part of the Revit SDK, by the Structural Analysis Software Development Toolkit (SDK), in the Structural Analysis SDK subfolder.
The first suggestion for seeing live how the structural analysis storage and reading works recommended starting from 2m50s in the Structural Analysis for Revit video presentation in the AEC Collection Workflow series:
Structural Analysis for Revit provides cloud-based analysis to structural engineers as a part of the BIM process. With Structural Analysis for Revit, engineers and designers can extend design models from Revit to the cloud for structural analysis. Results can then be visualized and explored within Revit and disruptions to a designers or engineer’s workflow are minimized by performing analysis in the cloud as design continues.
Later in the ensuing discussion, the development team suggested that the five and a half-minute video on Linking Revit with Robot Structural Analysis might be better suited for this purpose:
Complementing BIM workflows, Robot Structural Analysis Professional can help customers:
- Explore more design options that are analytically modeled and checked and linked to design models.
- Improve collaboration across BIM-enabled design teams by analyzing and incorporating changes more seamlessly to all members of the structural team.
- Design a range of structure types more efficiently with country-specific design codes and support for multiple languages and units.
The videos shows the UI that is currently shipping to manage the results.
The SDK includes templates for Visual Studio, documentation and samples that support creation of structural analysis and code checking applications using the Revit Structural results builder component and code checking framework.
Here is an edited version of the Structural Analysis SDK contents listed in its read-me-first documentation:
This question was raised in the Revit API discussion forum thread on getting the file path of a recently exported file, and Revitalizer shared the perfect solution for it, although it seems not to work under all circumstances:
Question: Say I export a file as an FBX, I would like to store its file path as a string.
How do I accomplish this?
If I were using the
standard Document Export method taking an FBXExportOptions
argument,
I would know, of course, and set the corresponding option properties defining the export folder and filename or prefix.
However, I am using PostCommand
, so I have no control:
RevitCommandId id = RevitCommandId.LookupPostableCommandId( PostableCommand.ExportFBX); uiapp.PostCommand(id);
The user can select the folder to save the FBX file in.
After it exports, I want to determine the selected directory where it was saved.
Answer: The Application
class provides a FileExported
event, providing a Path
property in its FileExportedEventArgs
argument.
The ControlledApplication
also provides this FileExported
event.
Response: Thank you!
I tried using what you suggested and display a dialog box to pop up after exporting the fbx file that prints the file location:
private void App_FileExported(object sender, FileExportedEventArgs e) { TaskDialog.Show("Test", e.Path); }
In the IExternalApplication
OnStartup
method, I added
app.FileExported += App_FileExported;
The task dialog pops up after exporting the FBX.
However, it only works when I choose "FBX files (*.fbx)" under "Files of type:" in the FBX export dialogue box.
It doesn't when the default option "FBX 2015 and Previous (*.fbx)" is selected.
Weird.
We are checking with the development team...
Aside from Revit, are you also using NavisWorks and would you like to drive it programmatically as well?
If so, check out JHoward_Hob's interesting House of BIM article on
the NavisWorks .NET ExecuteCommand
method.
Another little news item that just happened to catch my attention, on how Autodesk’s assistant Ava attempts to avoid uncanny valley.
That led me to look up uncanny valley on Wikipedia:
In aesthetics, the uncanny valley is a hypothesized relationship between the degree of an object's resemblance to a human being and the emotional response to such an object. The concept of the uncanny valley suggests humanoid objects which appear almost, but not exactly, like real human beings elicit uncanny, or strangely familiar, feelings of eeriness and revulsion in observers. Valley denotes a dip in the human observer's affinity for the replica, a relation that otherwise increases with the replica's human likeness.