Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
ron.c
1562 Views, 2 Replies

How to use iLogic to change the Level of Detail in a Drawing View

In the API help I see ways to read the current LOD in drawing views and I see a method for setting LOD in an assembly, but no method that sets the LOD in a particular view in a drawing.

 

Can it be done?

 

Thanks!

 

- Ron

Jef_E
in reply to: ron.c

You should look under the drawingview object.

 

If can catch the correct drawingview you can set the active LOD

 

DrawingView.ActiveLevelOfDetailRepresentation Property

Parent Object: DrawingView

 

Description

Property that returns the name of the active Level of Detail Representation for a drawing view of an assembly. This property returns a null string for drawing views of parts and presentations and in the case where the model (assembly) is unresolved.

 

Syntax

DrawingView.ActiveLevelOfDetailRepresentation() As String

 

Version

Introduced in Inventor version 11



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
ron.c
in reply to: Jef_E

That is what I needed.   Here's a more complete post on the matter: https://forums.autodesk.com/t5/forums/forumtopicprintpage/board-id/120/message-id/59347/print-single...

Here's some example code:

 

Sub DrawingView_ChangeLOD()
    'active drawing doc
    Dim oDrawDoc As DrawingDocument
    Set oDrawDoc = ThisApplication.ActiveDocument
    'active sheet
    Dim oSheet As Sheet
    Set oSheet = oDrawDoc.ActiveSheet
    'the 1st drawing view
    Dim oView As DrawingView
    Set oView = oSheet.DrawingViews.Item(1)
    
    'specify the custom LoD by its name
    oView.ActiveLevelOfDetailRepresentation = "ONE"
    oSheet.Update
    
    Beep
End Sub

Thanks!