LODs as Multi value list?

LODs as Multi value list?

nnguyenETKNW
Participant Participant
800 Views
8 Replies
Message 1 of 9

LODs as Multi value list?

nnguyenETKNW
Participant
Participant

Hi everyone,

 

I have a lot of different LODs with the possibility of adding more, I've been searching and I'm now wondering if there was a way to throw all of them into a list to make selecting them neater.

 

I've had luck throwing appearances into an array and being able to select the various appearances from a list, and I'm interested in being able to do the same with LODs.

 

I'm aware that upon opening the assembly there is a LOD selector available, but is there one possible while the assembly is already open?

 

Cheers,

0 Likes
Accepted solutions (1)
801 Views
8 Replies
Replies (8)
Message 2 of 9

bradeneuropeArthur
Mentor
Mentor
You can simply activate them manually so no code required!
Or am I missing something here?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 9

nnguyenETKNW
Participant
Participant

I have been selecting them manually through the design tree so far, however the list is getting long and messy.

 

What I'm after is being able to have them all in a drop down list, sorted alphabetically, so that I can scroll through in a form.

 

I came across a similar idea for material appearances which I've also incorporated, but I have no idea how to do it with LoDs. Any help would be greatly appreciated.

 

Regards,

0 Likes
Message 4 of 9

bradeneuropeArthur
Mentor
Mentor
Tommorow ok?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 9

nnguyenETKNW
Participant
Participant
Absolutely, that would be amazing!
0 Likes
Message 6 of 9

bradeneuropeArthur
Mentor
Mentor
Accepted solution

Hi,

This is the VBA Code:

put it into a Userform and add a listbox to it.

 

Private Sub ListBox1_Click()
Dim a As Application
Set a = ThisApplication

Dim b As AssemblyDocument
Set b = a.ActiveDocument

Dim LOD As LevelOfDetailRepresentation
Dim LODS As LevelOfDetailRepresentations
Set LODS = b.ComponentDefinition.RepresentationsManager.LevelOfDetailRepresentations

LODS.Item(ListBox1.Text).Activate
End Sub

Private Sub UserForm_activate()
Dim a As Application
Set a = ThisApplication

Dim b As AssemblyDocument
Set b = a.ActiveDocument

Dim LOD As LevelOfDetailRepresentation
Dim LODS As LevelOfDetailRepresentations
Set LODS = b.ComponentDefinition.RepresentationsManager.LevelOfDetailRepresentations

For Each LOD In LODS
ListBox1.AddItem LOD.Name

Next
End Sub

 

 

I have also uploaded the complete form for you.

 

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 7 of 9

nnguyenETKNW
Participant
Participant

Thank you so much!

I tested out your VBA code and it works perfectly.

 

I had to make some adjustments to adapt it to my iLogic form but it's working perfectly.


Thanks again, all the best!

0 Likes
Message 8 of 9

bradeneuropeArthur
Mentor
Mentor

Your thanks are appreciated.

 

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 9 of 9

j_weber
Mentor
Mentor

Searching for a solution of a german case I found this and it is fantastic.

 




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





0 Likes