Quantcast
Channel: RevitNetAddinWizard & NavisworksNetAddinWizard
Viewing all articles
Browse latest Browse all 872

Revit .NET: XYZ and Vector

$
0
0

Revit API provides the XYZ type to represent both points and vectors. It saves a bit space and memory of computers but at the same time may cause a bit confusions to people since they have to distinguish those methods that only apply to vectors with those only apply to points.

For example, the following methods only apply to points:

DistanceTo

A lot more only apply to vectors:

Divide
Multiply
Normalize
Subtract
Negate
AngleTo
AngleOnPlaneTo
DotProduct
CrossProduct
TripleProduct
IsUnitLength
IsZeroLength
GetLength

A few are ambiguous, which can apply to both points and vectors:

Equals
IsAlmostEqualTo(XYZ)
IsAlmostEqualTo(XYZ, Double)


Revit Addin Wizard (RevitAddinWizard) provides various wizards, coders and widgets to help program Revit addins. It can be downloaded from the Download link at the bottom of the blog index page.


Viewing all articles
Browse latest Browse all 872

Trending Articles