VectorAtPoint Class

VectorAtPoint Class

Stores vectors at one domain point. Each vector corresponds to a "measurement" for which this vector was calculated.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBValueAtPointBase
    Autodesk.Revit.DB.AnalysisVectorAtPoint

Namespace: Autodesk.Revit.DB.Analysis
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class VectorAtPoint : ValueAtPointBase
Public Class VectorAtPoint
	Inherits ValueAtPointBase
public ref class VectorAtPoint : public ValueAtPointBase
type VectorAtPoint = 
    class
        inherit ValueAtPointBase
    end

The VectorAtPoint type exposes the following members.

Constructors
 NameDescription
Public methodVectorAtPoint(IListXYZ) Creates object from an array of vectors
Public methodVectorAtPoint(VectorAtPoint) Creates a copy of the given VectorAtPoint instance.
Top
Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
(Inherited from ValueAtPointBase)
Top
Methods
 NameDescription
Public methodClearAllFlags Sets flags for all measurements to ValueAtPointFlags::None.
(Inherited from ValueAtPointBase)
Public methodClearFlagsAt Sets flags for the given measurement to ValueAtPointFlags::None.
(Inherited from ValueAtPointBase)
Public methodDispose
(Inherited from ValueAtPointBase)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetFlags Returns flags for the given measurement.
(Inherited from ValueAtPointBase)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodSetFlags(IListInt32) Independently sets the flags associated to all measurements.
(Inherited from ValueAtPointBase)
Public methodSetFlags(Int32) Sets the flags associated to all measurements to the same value.
(Inherited from ValueAtPointBase)
Public methodSetFlags(Int32, Int32) Sets the flags associated to a given measurement.
(Inherited from ValueAtPointBase)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Example
// Place analysis results in the form of vectors at each of a beam or column's analytical model curve
Transform transform = analyticalElem.GetTransform();
int index = spatialFieldManager.AddSpatialFieldPrimitive(curve, Transform.Identity);

IList<double> doubleList = new List<double>();
doubleList.Add(curve.GetEndParameter(0)); // vectors will be at each end of the analytical model curve
doubleList.Add(curve.GetEndParameter(1));
FieldDomainPointsByParameter pointsByParameter = new FieldDomainPointsByParameter(doubleList);

List<XYZ> xyzList = new List<XYZ>();
xyzList.Add(curve.ComputeDerivatives(0, true).BasisX.Normalize()); // vectors will be tangent to the curve at its ends
IList<VectorAtPoint> vectorList = new List<VectorAtPoint>();
vectorList.Add(new VectorAtPoint(xyzList));
xyzList.Clear();
xyzList.Add(curve.ComputeDerivatives(1, true).BasisX.Normalize().Negate());
vectorList.Add(new VectorAtPoint(xyzList));
FieldValues fieldValues = new FieldValues(vectorList);
' Place analysis results in the form of vectors at each of a beam or column's analytical model curve
Dim analyticalModel As Autodesk.Revit.DB.Structure.AnalyticalElement = Nothing
Dim relManager As Autodesk.Revit.DB.Structure.AnalyticalToPhysicalAssociationManager = Autodesk.Revit.DB.Structure.AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(doc)

If (relManager Is Nothing) Then
   Exit Sub
End If

   Dim counterpartId As ElementId = relManager.GetAssociatedElementId(familyInstance.Id)
   If (counterpartId Is Nothing) Then
   Exit Sub
End If

analyticalModel = doc.GetElement(counterpartId)

Dim curve As Curve = analyticalModel.GetCurve()
Dim transform__1 As Transform = familyInstance.GetTransform()
   Dim index As Integer = spatialFieldManager.AddSpatialFieldPrimitive(curve, Transform.Identity)

   Dim doubleList As IList(Of Double) = New List(Of Double)()
   doubleList.Add(curve.GetEndParameter(0))
   ' vectors will be at each end of the analytical model curve
   doubleList.Add(curve.GetEndParameter(1))
   Dim pointsByParameter As New FieldDomainPointsByParameter(doubleList)

   Dim xyzList As New List(Of XYZ)()
   xyzList.Add(curve.ComputeDerivatives(0, True).BasisX.Normalize())
   ' vectors will be tangent to the curve at its ends
   Dim vectorList As IList(Of VectorAtPoint) = New List(Of VectorAtPoint)()
   vectorList.Add(New VectorAtPoint(xyzList))
   xyzList.Clear()
   xyzList.Add(curve.ComputeDerivatives(1, True).BasisX.Normalize().Negate())
   vectorList.Add(New VectorAtPoint(xyzList))
   Dim fieldValues As New FieldValues(vectorList)

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also