Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I newdimension between the pipe and the face of the wall, and I can create it correctly.
However, when the wall is in revitlinkinstance, an exception "invalid number of references" will be thrown. I understand that the reference of wallface should be converted, so I use reference. Createlinkreference, but it has the same effect, and I used newmodelcurve to create the edgecurve of wallface to ensure that wallface is correct.
So, how should I handle the reference of wallface?
thank you
ReferenceArray arr = new ReferenceArray();
if (wallInfo.RevitLinkInstance is null)
{
arr.Append(wallInfo.Face.Reference);
}
else
{
var xxx = wallInfo.Face.Reference.CreateLinkReference(wallInfo.RevitLinkInstance);
arr.Append(xxx);
}
arr.Append(new Reference(t));
var dimension = doc.Create.NewDimension(doc.ActiveView, dimensionLine, arr, dimensionTypeList.FirstOrDefault());
Solved! Go to Solution.