Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Placing families (structural columns on a line with a specific distance )using C#

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
ahmadkhalaf7892
266 Views, 4 Replies

Placing families (structural columns on a line with a specific distance )using C#

Distance.PNG

3D.PNG


hi guys I wanted to ask how can I place a family on a model curve with a specific distance in C# (like the photo above ) I have done before using Dynamo , but my company thinks that it would be better to place them via C#. I just need some help because I have only started using C# two month ago. 
I would love to hear how it is done, or if I can get the method to place families, or load them according to the shapes above. 
Thanks

4 REPLIES 4
Message 2 of 5

Well, placing the instances is not a problem:

  

  

Determining equidistant points along a straight line is trivial.

 

The more complex problem of determining equidistant points along a curve is harder and has been discussed here many times. Here are some hits searching for 'equidistant':

  

  

Some of those have the exact same goal as you describe.

    

So, searching can help.

  

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

Hi Jeremy,
thanks a lot for the sources. They helped me understand how to divide a line/curve in Revit API. However I was unable to know the method for placing a family in a specific location/point.
May I ask what method is used for such a thing ?
thanks
Message 4 of 5

Hmm. That question is answered quite a (large) number of times by the articles in The Building Coder topic group on family instance placement that I pointed out in my previous answer above:

  

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

  

For an even shorter answer: NewFamilyInstance Method:

  

https://www.revitapidocs.com/2023/451ee414-cea0-e9bd-227b-c73bc93507dd.htm

  

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

Thank you very much

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report