When working with Autodesk Inventor, one of the challenges you might encounter is repositioning the detail view ID tag. While moving a view label is straightforward, adjusting the ID tag can be complex, especially using the Inventor API. Here, we will explore how to manage this task effectively, ensuring your tags remain within the drawing border when the parent view changes.
Current Limitations and Workarounds
As of now, the Inventor API allows you to move the fence and change its shape and size. However, repositioning the ID tag remains a challenge. If you delete and recreate the detail, the detail reference reappears next to the fence without a leader. Unfortunately, there is no API support to add a leader either.
Upcoming Changes in Inventor 2026
Good news for Inventor users! The upcoming Inventor 2026 release will introduce DrawingViewAnnotation, enabling you to move the tag using the DrawingViewAnnotation.TextPosition property. The beta build for Inventor 2026 is available for testing, and users are encouraged to try it out.
Sample VBA Code to Move View Annotation Text Position
Below is a VBA code sample that demonstrates how to move the view annotation text position. You can create a detail or section drawing view and run this code to see how it works:
The image below illustrates the drawing view ID prior to applying the VBA code
The image below illustrates the drawing view ID after applying the VBA code
Conclusion
While the current version of the Inventor API has limitations in repositioning the detail view ID tag, the upcoming Inventor 2026 release promises enhanced functionality with the introduction of DrawingViewAnnotation. By using the provided VBA script, you can ensure your annotations remain within the drawing border, maintaining the integrity and readability of your drawings.