Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Connector Numbers of Mechanical Equipment

Anonymous

Connector Numbers of Mechanical Equipment

Anonymous
Not applicable

 

I created a mechanical exhaust fan with four connectors for testing something else.

The interesting is when I was creating a system, revit asked me which connector I wanted to use. In the list of connectors, it looks like each one has its own connector number (connector 4 to 7).

 

Can someone tell me where is this parameter saved in revit family and am I able to change that?

 

Thanks for any comment!Cat Happy

 

 

 

2017-02-11_230904.png

0 Likes
Reply
Accepted solutions (1)
1,781 Views
10 Replies
Replies (10)

fabiosato
Mentor
Mentor

Hello,

 

Do you have any other type of connector in the family, usually they are numbered after the placement sequence.

To include a text use the description parameter of the connector properties, will make your life easier in this selection window.

Fábio Sato
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

robert.klempau
Advisor
Advisor
Accepted solution

Hello @Anonymous,

 

I created a Video for you where I show you what to do when adding connectors of the same System classification to your family.

@fabiosato is right.

That you see only connector 4 till 7 and not 1 till 4 can have several reasons.

 

  1. There are other connectors in your model like Duct, conduit, cable tray or electrical connectors in your family.
  2. There are connectors in your family but you removed some of them.

In your case I see 4 Duct connector and 1 electrical connector.

 

Don't worry about the Connector Numbers.

As @fabiosato mentioned, add the description to the connector so you know exactly which connector is which.

 

select connector.png

 

See my video below.

 

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

Kind regards,
Robert Klempau
Senior Consultant AEC
Cadac Group AEC BV

Anonymous
Not applicable

Thanks rklempau,

 

You are right. There is an electrical connector. Besides it, initially there were two duct connectors and I removed them, then I added four duct connectors. That explains why my duct connectors in the dialog starts from "4".

 

However, if two initial duct connectors had been removed, why the current duct connectors start numbering from "2". Does it mean these two initial connectors are still in my family? Do I need to find out them and delete?

0 Likes

robert.klempau
Advisor
Advisor

Hello @Anonymous,

 

When you add a connector to your family, Revit will give it a number. 

That connector always keeps that number.

If I am correct, and I will ask @jeremytammik:

When you remove the connector Revit will remove also that number. 

Revit will no use the deleted number again.

Every new connector gets the highest connector number in your family +1.

So a removed connector will stay unused.

I used the Revit Lookup Tool to have a deep look in the Revit family and there you see that there are only the connectors that are present in the family.

 

Snoop DB family connectors.png

My conclusion:

When removing a connector, it will be removed permanently and it will not reuse that connector number again.

 

 

Note: The Snoop DB (Revit Lookup) is an Add-In I use to look directly into the Revit Database. Please see: 

Revit 2016: click here

Revit 2017: click here

 

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

Kind regards,
Robert Klempau
Senior Consultant AEC
Cadac Group AEC BV

0 Likes

jeremytammik
Autodesk
Autodesk

Checking with the development team for you... hang on...



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

jeremytammik
Autodesk
Autodesk

I talked with the development team, and they say:

 

Checking the code, there is one key function to get the “Connector number” in edit family environment:

 

  int ConnectorElem::defaultIndex()
  {
    ...
  
    for(elemIter.initIter(); !elemIter.isDone(); elemIter.increment()){
  
      pElem = getDocument()->getElement(elemIter.getElementId());
      if (!pElem){
        continue;
      }
  
      if (IS_A(ConnectorElem, pElem)){
        pConnectorElem = downcast<const ConnectorElem*>(pElem);
        nIndex      = pConnectorElem->getIndex();
  
        if (nIndex > nMaxIndex){
          nMaxIndex = nIndex;
        }
      }
    }
  
    //We want to start the indices at 1 if there are none.
 
    if (nMaxIndex <= 0){
      nMaxIndex = 1;
    }
    else{
      nMaxIndex++;
    }
 
    return nMaxIndex;
  }

The index that you refer to as connector number is serialized with the ConnectorElem, so it remains unchanged once the connector exists.

 

Based on the above implementation, we can draw the following conclusions:

 

  • The index starts from 1. In some old family, we found the index is from 0, caused by old code.
  • The newly created connector index is the highest index + 1.
  • The index might not be continuous. If you removed an 'inner' connector whose index is in [1, maxIndex), maxIndex is kept, so the index will be skipped.
  • The index might be reused, if user removes all indices in [index, maxIndex].

 

So, to answer your questions:

 

  • When you add a connector to your family, Revit will give it a number. [Yes]
  • That connector always keeps that number. [Yes]
  • When you remove the connector, Revit will remove also that number. [Yes]
  • Revit will no use the deleted number again. [No]: If you removed the maxIndex, and the maxIndex will be reused.
  • Every new connector gets the highest connector number in your family +1. [Yes] So a removed connector will stay unused.
  • I used the Revit Lookup Tool to have a deep look in the Revit family and there you see that there are only the connectors that are present in the family. [Index is one serialized parameter of connector element, but it is not visible to user]

 

I hope this helps.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

robert.klempau
Advisor
Advisor

Hello @jeremytammik,

 

Thanks for your splendid answer. Smiley Happy

 

It confirms what I thought.

 

@Anonymous,

 

Was this enough info for you?

 

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

Kind regards,
Robert Klempau
Senior Consultant AEC
Cadac Group AEC BV

0 Likes

jeremytammik
Autodesk
Autodesk

Dear Robert,

 

Glad you like it and thank you for your appreciation.

 

For better readability and future reference, I added it to The Building Coder blog as well:

 

http://thebuildingcoder.typepad.com/blog/2017/02/revit-mep-connector-number.html

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

Anonymous
Not applicable

Thank you @jeremytammik!

Thank you @robert.klempau!

 

So busy these days. Just read your answers. My doubt is cleared up.

 

 

0 Likes

Anonymous
Not applicable

I understand that how this value comes to be, and that it is unchangeable. However, I don't understand why this value is unchangeable, or even shown at all. Couldn't it just show "Connector" and then the description? It can get confusing if you would like to use numbers in the description and then they conflict with the connector number. 

 

 

connector number.PNG

0 Likes