[iLogic] 'rebuild all' error

[iLogic] 'rebuild all' error

matroosoft
Advocate Advocate
3,644 Views
22 Replies
Message 1 of 23

[iLogic] 'rebuild all' error

matroosoft
Advocate
Advocate

Am trying to perform a 'rebuild all' on the active (assembly) document using iLogic, using:

 

ThisApplication.ActiveDocument.Rebuild()

 

It returns "incorrect parameter. Exception from HRESULT: 0x80070057 (E_INVALIDARG))". Also tried to use 'rebuild2', but that gave the same error. What am I doing wrong?

0 Likes
Accepted solutions (2)
3,645 Views
22 Replies
Replies (22)
Message 21 of 23

matroosoft
Advocate
Advocate
Accepted solution

After some testing I've found it has something to do with a certain subassembly having a temporary Level of Detail.

 

When our configurator plugin suppress/unsuppress items in one subassembly it gets a temporary Level of Detail named '~1' the other subassemblies (being the same assembly file) keep their default Level of Detail. If I reset the one with the temporary LoD to it's default LoD, the iLogic rule runs without any problem.

0 Likes
Message 22 of 23

bradeneuropeArthur
Mentor
Mentor
Than set your design view and your representation back to master first with some code!

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 23 of 23

matroosoft
Advocate
Advocate
Accepted solution

I needed the suppressed/unsuppressed states represented in that subassembly, so resetting to master LoD wouldn't have been a solution. Instead I've written some iLogic checking which items of the subassembly are suppressed/unsuppressed and store those values in an array. Then set the LoD of the subassembly to Default and restore the suppression states of it's items using the values in the arrays.

 

Not sure though why Inventor is creating a temporary LoD instead of editing the LoD called 'default'.

 

Thanks for all the replies anyway, I consider this as solved.

0 Likes