find level of detail using ilogic

find level of detail using ilogic

Anonymous
Not applicable
684 Views
2 Replies
Message 1 of 3

find level of detail using ilogic

Anonymous
Not applicable

i'd like to drive a parameter depending on the level of detail being shown.

 

How can find which LOD is active within ilogic?

 

I'll use this for driving a weldment : when the weld is on the bead parameter = 6 when the weld is off the bead parameter = 0.1

 

Thanks

 

MES

0 Likes
685 Views
2 Replies
Replies (2)
Message 2 of 3

xiaoyan.qi
Alumni
Alumni

you can get the current Level of detail name by "AssemblyDocument.LevelofDetailName"

suppose you have a LOD named "Weld" in your weldment, try the iLogic code as below

=================================

doc = ThisDoc.Document

If doc.LevelofDetailName = "Weld" Then
     ' BeadSize is the parameter name for bead    

      BeadSize = 0.1
Else
      BeadSize = 0.2
End If

=================================

 

Let me know if it works

Thanks

Mick

Message 3 of 3

Anonymous
Not applicable

Thanks, it works but I'm stupid - I really should of used:

weld.PNG

 

Slightly on the same issue - Trying to trigger your code to refresh automatically - i.e the View Changes when a LOD is selected - currently need to run rule then press update.

I have other code & the refresh & update always needs clicking & updating manually.

Secondly trying to have a drawing view swap between LOD & update is just wrong thinking on my part - the drawing can only reference the model & LOD only loads & unloads - two models will not exist showing two different weld sizes.

 

Thanks

MES

0 Likes