Anuncios
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Connecting Duct Fitting to Duct, the fitting does not inherite Duct Dimensions

ABertzouanis9F98Y
Enthusiast

Connecting Duct Fitting to Duct, the fitting does not inherite Duct Dimensions

ABertzouanis9F98Y
Enthusiast
Enthusiast

In the Revit UI when sliding the Duct's control point next to the fitting's connectors the Duct Fitting inherits the dimensions of the duct. Is there any way I could reproduce this behaviour using Revit API? Duct Fittings_01.PNG

I tried using the connector's ConnectTo, however this extends the duct but it does not change any of the dimensions of the duct's fitting to much the dimensions of the duct.
Duct Fittings_02.PNG 

 

 

0 Me gusta
Responder
793 Vistas
11 Respuestas
Respuestas (11)

jeremy_tammik
Autodesk
Autodesk

That sounds like an error to me. Afaik, ConnectTo should display the same behaviour as you see in the UI. Can you put together a minimal reproducible case to demonstrate exactly how you are calling the method, and the model it is running in, so we can pass it on for analysis to the development team?

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

Thank you!

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Me gusta

ABertzouanis9F98Y
Enthusiast
Enthusiast

@jeremy_tammik

Here is an example where the ConnectTo Revit API method does not make Duct Fitting dimensions to be inherited by the connected ducts. Any advise will be really appreciated.

 

Please, download the Sample Revit file and dynamo script that uses ConnectTo method from the link below.

https://we.tl/t-uUojWYcztA

 

1.Configuration with two Ducts and one Fitting

DuctFittingConnectionIssue_01.PNG

 

2.Selecting and moving the Duct 1 proves that it is not connecting to the fitting. Duct 1 moves independently from the fitting.

DuctFittingConnectionIssue_02.PNG

 

3.When running the Dynamo Script which connects the Ducts to the Fitting the issue appears. The Duct fitting dimensions are not inherited by the two connected ducts. To also prove that items are connected (which means that dynamo script worked), when trying to move the Duct 1 the two ducts and the fittings are moving together.

DuctFittingConnectionIssue_03.PNG

 

4.Changing one of the duct's dimension parameters (i.e. Height) makes the duct to adapt to the duct dimensions. ConnectTo method is not enough for the fitting to inherit its dimensions from the ducts. An extra step is needed to change on of the ducts dimensions. This looks like a Revit internal regeneration issue for me! 

DuctFittingConnectionIssue_06.PNG

 

0 Me gusta

MarryTookMyCoffe
Collaborator
Collaborator

@jeremy_tammik wrote:

That sounds like an error to me.

 


 the real error here is that we can't change connector size in transition. Making ConnectTo do extra staff just make life more difficult, we never know what api will do.


@jeremy_tammik wrote:

 ConnectTo should display the same behaviour as you see in the UI.

  


there is no button ConnectTo. We can make transition from one duct to another and this in api work the same way as in UI.
pls don't make my life harder by changing how ConnectTo work.

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
0 Me gusta

ABertzouanis9F98Y
Enthusiast
Enthusiast

@jeremy_tammik 

It sounds this is currently a Revit API limitation. Should I post this in the Revit API Ideas?

0 Me gusta

jeremy_tammik
Autodesk
Autodesk

Yes please, if you have verified with your product usage expert and application engineer that no better solution exists, a wish list item would help make the development team aware of this lack of functionality. Thank you!

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Me gusta

ABertzouanis9F98Y
Enthusiast
Enthusiast
0 Me gusta

richard.laroche
Contributor
Contributor

@jeremy_tammik 

 

Hi Jeremy,

 

Just wanted to draw your attention to what I posted here about the behavior of the "ConnectTo" method versus the use of the "Connect Into" button from the UI:

https://forums.autodesk.com/t5/revit-ideas/connectto-revit-api-method-to-behave-similar-to-the-revit...

 

Sorry if I'm reporting information at the wrong place on this forum.

 

Thanks!

jeremy_tammik
Autodesk
Autodesk

Thank you for the heads-up. I asked the development team for their opinion and suggestions.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Me gusta

richard.laroche
Contributor
Contributor
Just an update about this issue.
I tinkered something that works even though I dont't actually know why it does work.
I noticed that the FamilyInstance that I spawn always had doc.GetElement(MagicConnector.Id).Location.Point = XYZ(0,0,0)
All the time, even if I clearly see the object on the face of the pipe in the model.
So i just added a line of code before the "ConnectTo" and a 1mm "Offset from Host" to the familyinstance:
MagicConnOffsetfromHost = getParamObj(MagicConnector,"Offset from Host")
MagicConnOffsetfromHost.Set(1/304.8)
doc.GetElement(MagicConnector.Id).Location.Move(XYZ(0,0,0))
connecfrom = list(MagicConnector.MEPModel.ConnectorManager.UnusedConnectors)
connecfrom[0].ConnectTo(Connecto)

TaDam!
Now it works with vertical pipes.

I can send you the complete python code if needed.

Thanks for the quick reply!

jeremy_tammik
Autodesk
Autodesk

Oh dear. So, maybe I acted too fast. Well, congratulations on the success! Looking forward to seeing the final resolution. Thank you.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Me gusta

jeremy_tammik
Autodesk
Autodesk

Many thanks to all for your valuable input and patience with this.

 

The development team replied:

 

The ConnectTo API was the barebone connection only. It does not have the rich capability of the UI. It has been a known issue for a long time. We will take this as an API feature request to be prioritized.

 

Checking the forum discussion, it seems the customer found some workaround to move forward; not sure how that impacts the priority. The underlying issue is real, valid and requires a fair amount of effort. Ideally, we like the UI and API user calling into the same method. Unfortunately, that is not the case of ConnectTo at this point.

 

We may explore the possibility of putting a wrapper and validation around the internal method RbsEditorUtils::RbsConnectionElementPickEditorSolution to expose that to the API. We logged a development ticket REVIT-205160 for this under MEP Mechanical Routing Solutions.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open