- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Line line = Line.CreateBound(topleft, botleft);
DetailLine detailLine = doc.Create.NewDetailCurve(doc.ActiveView, line) as DetailLine;
Reference ref = new Reference(detailLine);
arrRef.Append(ref);
I am making an API to draw the dimensions for elements automatically. I have some issue with the duct's dimension.
I created the dimension with this method:
doc.Create.NewDimension(doc.ActiveView, dimensionLine, refArr);
and I prepared the referenceArray with the duct by creating a new reference from the duct
Reference ductRef = new Reference(duct);
refArr.Append(ductRef);
This's what I got:
The witness line of the dimension refers to the center of the duct. But I want to create the dimension like this:
I want the witness line to refer to two sides of the duct. Is there a way to do that?
I researched, and there is a suggestion about creating a line that is parallel with the duct sides and getting references from that line.
Line line = Line.CreateBound(topleft, botleft);
DetailLine detailLine = doc.Create.NewDetailCurve(doc.ActiveView, line) as DetailLine;
Reference ref = new Reference(detailLine);
arrRef.Append(ref);However, I don't really want to create another line to the model like this. Is there a way to get the reference directly from two sides of the duct?
Solved! Go to Solution.
Developer Advocacy and Support +