on Revit 2014,my program ok,but on Revit 2016,it's give me a error,I search web along time,have not find the Reason
Main code
====================================
ReferenceArray refArray = new ReferenceArray();//分尺寸
foreach (ElementId e in eSet)
{
if (doc.GetElement(e).GetType() == typeof(Grid))
{
Grid gr = doc.GetElement(e) as Grid;
Curve cv = gr.Curve;
refArray.Append(cv.Reference);
}
}
if (!doc.IsFamilyDocument)
{
doc.Create.NewDimension(doc.ActiveView, line, refArray);//分尺寸
}
else
{
doc.FamilyCreate.NewDimension(doc.ActiveView, line, refArray);//分尺寸
}
====================================
The "line"'s start point is pick a point(snap on a Grid point),end point Calculation by start point,Increasing along the X axis.
thinks.
Dear cao2013,
Have you debugged your code?
If not, please do.
The answer is probably quite simple.
Nobody but you can debug your code without a full and really minimal reproducible case to examine:
http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b
Best regards,
Jeremy