Onion package is a small utility package developed by us. It can be used to manipulate or get data from Revit objects.
Onion Package is available through Dynamo Package Manager.
AutoJoin.JoinList – takes two elements lists and tries to join geometry of each element from list A with each element from list B. As the operation might take a while a progress bar is displayed.
CurtainWall.VGridReferences and CurtainWall.UGridReferences – outputs references to gridlines of a curtain wall; extra ‘IncludeSides’ parameter allows you to get references for sides/top/bottom of the wall.
Element.LinearIntersections – works with elements that are based on location curves – eg. walls, ducts etc. Returns intersection points of given elements – outputs three lists – elementsA, elementsB and intersection point; extra bool parameter allows you to get duplicate intersections (if element A intersects element B then also element B intersects element A). IgnoreZ parameter allows for 2d intersections – if a duct is sloped for example.
Element.Split – splits a location curve based element at a given point – similarly to Revit’s slice tool. The point has to be located on the elements’s location curve. IgnoreZ parameter allows to take only X and Y coordinates into consideration (so you can use a point that is higher or lower than element’s base)
FamilyInstance.ReferenceByName – gives you a references to a named reference plane inside a family – eg. “Left”, “Center” etc.; can be useful for dimensioning
Grid.FindClosestIntersection – returns a closest grids intersection to a given point; outputs three lists grid A, grid B and an intersection point.
Grid.Intersections – outputs intersection points for given grids; output is similar as above.
Point.FindClosest – takes a point (A) and finds a closest point from a point list (B); outputs the closest point and it’s index in the list.