How can I get the connectors of a FamilyInstance?

How can I get the connectors of a FamilyInstance?

Bruno_Neves_Pires_Silva
Advocate Advocate
3,892 Views
4 Replies
Message 1 of 5

How can I get the connectors of a FamilyInstance?

Bruno_Neves_Pires_Silva
Advocate
Advocate

Hi,

 

  How can I get the connectors of a FamilyInstance?

 

Thanks in advance.

0 Likes
Accepted solutions (1)
3,893 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni
Accepted solution

Dear Bruno,

 

Thank you for your query.

 

Please perform a search of your own before asking questions here, both for your own efficiency and the sake of others.

 

In this case, a search for 'revit api familyinstance connectors' or 'thebuildingcoder familyinstance connectors' will certainly provide some starting points for you:

 

https://duckduckgo.com/?q=revit+api+familyinstance+connectors

 

Obviously, you should also always search the Revit API help file.

 

That immediately yields the following call sequence to explore: FamilyInstance > MEPModel > ConnectorManager > Connectors.

 

Next, turn to the Revit SDK samples and search for something like ConnectorManager; that causes 132 hits in 8 files.

The Building Coder samples also provides a whole bunch of samples handling connectors in various ways:

 

https://github.com/jeremytammik/the_building_coder_samples

 

That should give you more than enough to get started, and hopefully answer an infinite number of similar future questions at the same time.

 

I hope this helps.

 

Best regards,

 

Jeremy

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

Bruno_Neves_Pires_Silva
Advocate
Advocate

Hello, Jeremy

 

I did a search using the searching tool provided by the forum:
http://forums.autodesk.com/t5/forums/searchpage/tab/message?filter=location&q=ConnectorManager+famil...

 

But after looking several posts, I was not getting anywhere. I've found several posts about connectors and connectormanager, but I couldnt find anything showing how could I get the connectormanager of a FamilyInstance.

 

I did not look in your stuff, however, sorry. There I've found the answer:
(https://github.com/jeremytammik/the_building_coder_samples)

 

Thank you for finally taking your sweet time to answer one of my questions. 

 

Bruno.

0 Likes
Message 4 of 5

jeremytammik
Autodesk
Autodesk

Dear Bruno,

 

Thank you for your appreciation and sorry for the delay and inconvenience.

 

To efficiently address a Revit API question, there are indeed several levels of information that are worthwhile checking out.

 

I keep trying to create the ultimate complete list of them, and have not succeeded to my complete satisfaction so far.

 

Here is one of my recent attempts:

 

http://thebuildingcoder.typepad.com/blog/2016/09/trusted-signature-motivation-and-fishing.html#3

 

Let me expand that based on what I said above and elsewhere in the past few days:

 

How to Research for a Revit API Solution

 

  1. Determine the optimal solution manually through the end user interface. Make sure you follow best practices and make use of existing built-in Revit functionality. If you skip this step or do not research deeply enough, you run a large risk of programming something that will be painful both to implement, maintain, debug and use.

 

  1. Determine the names of the Revit classes, methods and properties that will help you achieve your task. For example, create the appropriate situation and sample BIM via the user interface and analyse it before and after making the modifications you need, e.g., using:

 

  1. Once you know what Revit API objects are required, learn how to access, manipulate and drive them, their relationships and how they interact with each other:

 

After you have exhausted those options, search the Internet for 'revit api' or 'thebuildingcoder' plus the Revit API names that you are interested in.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 5 of 5

Bruno_Neves_Pires_Silva
Advocate
Advocate

Thank you, Jeremy!!

 

  This will certainly help me much in the future!

0 Likes