How does Revit change the diameter from the perspective of the Autodesk API?

How does Revit change the diameter from the perspective of the Autodesk API?

dominik_krzywik
Contributor Contributor
147 Views
2 Replies
Message 1 of 3

How does Revit change the diameter from the perspective of the Autodesk API?

dominik_krzywik
Contributor
Contributor

Hi all,

Does anyone know how the process of switching diameters works in Revit for presented operation?

What happens in the background?

For example, after selecting a pipe and choosing a new diameter:

  1. Does Revit API disconnect the elements first,
  2. Change the diameter,
  3. And then reconnect everything?

Or does it change the diameter from larger to smaller in a specific sequence?

Or is it just randomly switching diameters on the connected system?

 

0 Likes
148 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Autodesk
Autodesk

The Revit API is not involved at all in the steps you show, afaik. All that functionality is built into the Revit product. The API provides a wrapper around that functionality to enable access to certain entry points from .NET, from outside the Revit product. You can determine how the diameter changes are applied by snooping the system using RevitLookup and other database exploration tools. It helps to understand the optimal workflow and best practices from a high-level BIM and an end user perspective before trying to look at things from the API point of view.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

dominik_krzywik
Contributor
Contributor

Basically, I'm looking for the most optimal way to replace diameters in a pipe network for a given pipe type. Imagine you have a system with various diameters, but you need to replace them with entirely different ones while minimizing errors as much as possible. For instance, avoiding the disintegration of families caused by the changes,  removing unnecessary transitions in one place, adding new transitions elsewhere, or replacing tee diameters in a way that doesn't break them, etc.

The question is, what's the best way to approach this? Manual changes are something Revit handles quite well, but if you were to make these diameter changes through the programming, what path would be best to take? Should you disconnect the system, or is it better to do it while everything is connected? There are many questions, but maybe there’s a specific workflow or sequence to follow, for example, replacing elbows first, then tees, and so on? Do you perhaps have any experience and tips, knowing Revit's behavior inside out?

0 Likes