Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LOD to Model states causing problems with derived parts??

2 REPLIES 2
Reply
Message 1 of 3
cencinaNB2ET
482 Views, 2 Replies

LOD to Model states causing problems with derived parts??

Im really confused...

I have a derived assembly part that needs to open the main assembly with suppressed cable harness parts.

 

Now the open parent assembly code only opens the assembly on a master level.

 

 

I had a LOD called custom where i had suppressed Cable harness assemblies depending on the code selection etc...

 

oAsmDef.RepresentationsManager.LevelOfDetailRepresentations("Custom").activate

 

 

Now this is creating a so called model states...

 

the issue is i then derive many configurations into a part from this assembly and i use this code to obtain a few details from the parent assembly ( iproperties, etc...)

 

using this..

For Each oDerAssemblyComp In Doc_P.ComponentDefinition.ReferenceComponents.DerivedAssemblyComponents
oDerAssemblyCompDef = oDerAssemblyComp.Definition
Full_File_Name = oDerAssemblyComp.ReferencedDocumentDescriptor.FullDocumentName
Next


oDoc_Parent = ThisApplication.Documents.Open(Full_File_Name, False)
oAsmDef = oDoc_Parent.ComponentDefinition

 

But this only opens the Master version of the parent assembly so now i cant get any details from the parent assembly for some reason...

 

Why was LOD replaced with model states?

 

I cant suppress Harness parts in Master level of model states so Im left with nothing it seems???

 

 

 

 

 

Please see screenshots attached...

Labels (3)
2 REPLIES 2
Message 2 of 3

Hi,

 

Sorry but I don't understand the problem you have.

I don't see any code that pulls properties from the one to the other file.

Could you please share your complete code here to investigate and help you further.

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 3 of 3
cencinaNB2ET
in reply to: cencinaNB2ET

Well i have two problems..

the code is extensive because there are more than a few external rules completing a few tasks.

Ill have to clean them and take out all references first and create a copy of the assembly etc.. just to show you.

But here is a screen cast link with another problem i think also caused by model states.

 

I hide visibility of components on the parent assembly and i let the designer access it through a derived part.

the issue is that derived part cant include workplanes anymore for some reason. i need those planes for connecting them .

so its either a master view with non hidden parts or a default view linked to the parent assembly without planes.

I derived it including all workfeatures but for some reason this is not including them in Inventor 2022.

 

https://autode.sk/3yth1I0

 

 

Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report