How are changing beams the start and end point?

How are changing beams the start and end point?

AD8080202
Advocate Advocate
1,201 Views
1 Reply
Message 1 of 2

How are changing beams the start and end point?

AD8080202
Advocate
Advocate

 

How are changing beam the start and end point ?

 

Thanks in advance

0 Likes
Accepted solutions (1)
1,202 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

This question has been answered here and elsewhere many times.

 

Please research before posting!

 

Normally, you can simply set the start and end point of the beam location line, as demonstrated by the FrameBuilder SDK sample:

 

R:\Samples\FrameBuilder\CS\FrameBuilder.cs(285):

/// <summary>
/// set location line to the Element
/// </summary>
/// <param name="elem">goal Element</param>
/// <param name="startPnt">start point of the line</param>
/// <param name="endPnt">end point of the line</param>
/// <returns>is successful</returns>
private bool SetLocationLine(ModelElement elem, XYZ startPnt, XYZ endPnt)
{
  LocationCurve elemCurve = elem.Location as LocationCurve;
  if (null != elemCurve && !elemCurve.IsReadOnly)
  {
    try
    {
      Line line = m_appCreator.NewLineBound(ref startPnt, ref endPnt);
      elemCurve.Curve = line;
      return true;
    }
    catch (Exception ex)
    {
      Debug.WriteLine(ex.ToString());
    }
  }
  return false;
}

 

Cheers,

 

Jeremy

 

 



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