AnsweredAssumed Answered

Macro: Make a constructed Hole Callout Referenced

Question asked by Dave Paul on Jan 26, 2016
Latest reply on Feb 1, 2016 by Olivier 42 Name



Sometime ago I wrote a VBA macro that will add the bolt circle diameter and hole angles to a hole callout.  It's not pretty but it works well for what it does.


How it works:

Insert a hole callout.

Select the hole feature and any additional features that make up that hole pattern (circular or linear) from the feature tree.

Start the Hole Points macro.  (Attached)

The bolt circle size and hole angles are calculated relative to the drawing view (taking into account view rotation).

After the instruction dialog box is dismissed, the existing hole callout is selected and the additional text is added.


The issue that I'm having is that if the model changes, the this constructed hole callout does not update (for obvious reasons).


Thinking out loud on possible fixes:

  1. I can insert a angle dimension for every hole and a bolt circle size dimension onto a hidden layer and build the note with those items.  This would update correctly, if the hole references are not changed or deleted.
  2. Reference the features that are used to create the callout.  If the features change, update the callout.  (Is this possible?)  Would need a callback to the macro when the feature is updated.


All thoughts and ideas are appreciated.

Thanks - Dave