Repositioning Detail View ID Tag in Autodesk Inventor 2026 API

<?xml encoding=”UTF-8″>by Chandra shekar Gopal,

When working in Autodesk Inventor, keeping your drawings clean and readable is essential. A common challenge faced by users is repositioning the detail view ID tag—the identifier that marks a detail or section view. While moving a view label is straightforward, adjusting the position of the ID tag using the Inventor API has traditionally been far more complex. This blog explores the current limitations and a practical VBA workaround, and highlights a major improvement coming in Inventor 2026.

Understanding the Challenge

The Inventor API currently allows you to manipulate the fence (the circular or rectangular boundary around a detail view), including its shape and size. However, repositioning the ID tag that labels the view is not directly supported.

Some users attempt to work around this by deleting and recreating the detail view, which causes the reference to reappear next to the fence—but notably, without a leader. Unfortunately, the API doesn’t yet support adding a leader to restore that visual connection.

What’s Coming in Inventor 2026

There’s good news on the horizon. The Inventor 2026 release introduces a new API object: DrawingViewAnnotation. This enhancement includes the TextPosition property, which allows developers to programmatically move the ID tag of a drawing view—something that was previously unsupported.

The beta version of Inventor 2026 is already available, and we encourage developers and power users to begin testing these new capabilities.

Sample VBA Code to Reposition the ID Tag

To help you get started, here’s a simple VBA script that demonstrates how to move the annotation text of a detail or section view using the new functionality:


Sub MoveViewAnnotationTextPositionSample()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oView As DrawingView
Dim oTemp As DrawingView
For Each oTemp In oDoc.ActiveSheet.DrawingViews
If oTemp.ViewType = kDetailDrawingViewType Or oTemp.ViewType = kSectionDrawingViewType Then
Set oView = oTemp
Dim oViewAnnotation As DrawingViewAnnotation
Set oViewAnnotation = oView.ViewAnnotation
' Move the annotation text
Dim oPt As Point2d
Set oPt = oViewAnnotation.TextPosition
oPt.X = oPt.X + 2
oPt.Y = oPt.Y + 3
oViewAnnotation.TextPosition = oPt
oDoc.Update
End If
Next
End Sub

Visual Example

Before
The view ID tag is misaligned or overlapping other elements.

Before

After
The tag is repositioned cleanly within the drawing border.

After

Conclusion

While current versions of Autodesk Inventor have limitations in handling detail view ID tags via the API, the Inventor 2026 update is a game changer. With the new DrawingViewAnnotation object, developers will gain the long-awaited ability to programmatically reposition ID tags—improving drawing clarity and maintaining compliance with drafting standards.

<

p class=””>Until then, the provided VBA workaround can help you manage your annotations more effectively and keep your documentation professional and clean.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading