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

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

ron.c
Advocate Advocate
1,628 Views
2 Replies
Message 1 of 3

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

ron.c
Advocate
Advocate

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

0 Likes
Accepted solutions (1)
1,629 Views
2 Replies
Replies (2)
Message 2 of 3

Jef_E
Collaborator
Collaborator
Accepted solution

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
0 Likes
Message 3 of 3

ron.c
Advocate
Advocate

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!

 

0 Likes