Community
ReferenceArray thirdDimension = new ReferenceArray(); IList<Reference> myRefs = uidoc.Selection.PickObjects(ObjectType.Element, "Pick"); foreach(Reference r in myRefs) { Element element = doc.GetElement(r); Grid grid = element as Grid; Line gridLine = grid.Curve as Line; XYZ direction = gridLine.Direction; thirdDimension.Append(gridLine.Reference); } XYZ firstPoint = uidoc.Selection.PickPoint("Select first point"); Line firstLine = Line.CreateBound(new XYZ(firstPoint.X + 200, firstPoint.Y, firstPoint.Z), new XYZ(firstPoint.X - 200, firstPoint.Y, firstPoint.Z)); using (Transaction t = new Transaction(doc, "Add Dimension")) { t.Start(); Dimension third = doc.Create.NewDimension(doc.ActiveView, firstLine, thirdDimension); t.Commit(); }
Helo everyone
The code above works revit 2015 but does not work 2016
There is no error when compling
How can i solve this
Thanks in advance...
Solved! Go to Solution.
Solved by boostyourbim. Go to Solution.
Can't find what you're looking for? Ask the community or share your knowledge.