Rebar Container is placed completely outside of its host

Rebar Container is placed completely outside of its host

Anonymous
Not applicable
680 Views
1 Reply
Message 1 of 2

Rebar Container is placed completely outside of its host

Anonymous
Not applicable

When I try to create a rebar container I get this error inside Revit after running:

Warning - can be ignored

"Rebar Container is placed completely outside of its host."

I don't know how should I avoid this error. Here is the code:

 

containertype = RebarContainerType.
                GetOrCreateRebarContainerType(Doc, "myContainer");
container = RebarContainer.Create(Doc, hostObject, containertype);
0 Likes
681 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

I managed to regenerate this warning by adding these lines in the sdk Sample "Reinforcement" and "ColumnFramReinMaker.cs" class constructor ( line 183)  as belwo:

 

      public ColumnFramReinMaker(ExternalCommandData commandData, FamilyInstance hostObject)
         : base(commandData, hostObject)
      {
         ...

         //create a ColumnGeometrySupport instance 
         m_geometry = new ColumnGeometrySupport(hostObject, geoOptions);
// The following lines will create rebar container: ElementId m_containertype = RebarContainerType.CreateDefaultRebarContainerType(m_revitDoc); RebarContainer m_container = RebarContainer.Create(m_revitDoc, m_hostObject, m_containertype); }

If there is any thing that you can think of so I can avoid creating the container outside of its host I would appreciate letting me know.

 

Is there any property that can be set for the rebar container class to keep it withing its host?

0 Likes