Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Community,
I am developing code (VBA) that will create drawing views from assembly Design View Representations (DVRs).
Using this code, I can get the count and names of the DVRs:
Public Sub ListDesignViewReps()
Dim oView As Inventor.DesignViewRepresentation
Dim oCompDef As ComponentDefinition
Set oCompDef = ThisApplication.ActiveDocument.ComponentDefinition
MsgBox ("Number of DVRs: " & oCompDef.RepresentationsManager.DesignViewRepresentations.Count)
For Each oView In oCompDef.RepresentationsManager.DesignViewRepresentations
MsgBox ("DVR Name: " & oView.Name)
Next
End SubHowever, if the Master DVR is active, the number of DVRs reported is Actual + 1.
For example, an assembly with a Master and Default DVR will report a count of 3 and Master is listed twice.
If Default is active, the count reports as 2 and Master is listed only once.
Can anyone explain why having the Master DVR active changes the actual count?
I can likely workaround this issue, but I found it confusing. I have not tested with Pos Reps or LODs.
Regards,
Jerry
-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
Solved! Go to Solution.