Calculate The Referenced Model Break Line Gap For a Drawing View With A Break Line

Document created by Michael Kozikowski Employee on Sep 22, 2017Last modified by Michael Kozikowski Employee on Sep 22, 2017
Version 3Show Document
  • View in full screen mode

This VBA macro example calculates the break line gap for the referenced model in a drawing view when that drawing view has a break, a set of break lines, in other words. The resultant calculation could also be called the missing portion of the referenced model due to a drawing view break, or the dimensional distance of the broken part of the referenced model between the break lines.


The macro uses IView::BreakLineGap to find the gap in the context of the drawing view. From there, the macro uses transforms to get the gap in the view's referenced model context. The calculation also takes into account the drawing view scale. The drawing view HAS to be in an "unbroken" state for this to work. For that reason, the macro temporarily makes any "broken" drawing views, unbroken, and then sets the state back afterward.


The macro works with a drawing view with a single break in it, one pair of break lines. The user will have to adapt it for usage with multiple breaks. The macro also makes the calculation for a horizontal break, using the x coordinate values. The user will have to adapt the code to deal with a different situation, for example, use y coordinates values if the referenced part is vertical in the drawing view. The macro is for demonstration of the API uses only.