Rebar creation issue in some API-created objects

Rebar creation issue in some API-created objects

Anonymous
Not applicable
358 Views
1 Reply
Message 1 of 2

Rebar creation issue in some API-created objects

Anonymous
Not applicable

Hi, I'm working with Revit API to create rebar objects.

I've attached a .rvt file that has two beams, identical in geometry but one created directly by hand and the other created programmatically by API code.

I've used the normal creation method below to create the beam, in Autodesk.Revit.Creation.

 

 

public FamilyInstance NewFamilyInstance(Curve curve, FamilySymbol symbol, Level level, StructuralType structuralType);

 

 

As you can see in the sample file, rebar could not be correctly placed in the programmatically-created beam.

When I tried to place rebar in the beam, it would pop out to whole other places.

Some of other beams created in the same programmatic way don't have the problem, so I'm wondering about the reason.

Please he

0 Likes
359 Views
1 Reply
Reply (1)
Message 2 of 2

mikako_harada
Community Manager
Community Manager

Hello, 

 

For the sake of community who are wondering what is causing this issue, and as a way of recording as a knowledge for future occurrence - 

 

We had a separate thread on this topic through the ADN channel. We have asked the Revit product team. In the situations like this, possible place to look are: 

 

1) This is sometimes caused by using the wrong overload of NewFamilyIntance().  

 

2) If the result of the non-rounded numbers is a beam whose curve is “slightly off axis”, this could be the source of some trouble. We don't see the numbers, but if the X coordinate changes from something like 1.00046 to 1.000085 or something, that could be the slightly off axis result.

 

In this specific case, #1 seems to be okay.  The customer's investigation suggests #2 is causing the issue.  

 

FYI 


Mikako Harada
Developer Technical Services
0 Likes