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: 

How to Hide suppressed elements?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
509 Views, 4 Replies

How to Hide suppressed elements?

I have using Inventor api to open an assembly file.But while open the .iam file it will show all the suppressed elements.how can we hide this suppressed elements from showing?

 

here is my code

 

Dim asdoc As AssemblyDocument
asdoc = inventorApp.Documents.Open("F:\Arun\Master\Master_RF-VH-ZZ-0800-0500-0600.iam")

 Any one help??

Tags (1)
4 REPLIES 4
Message 2 of 5
jdkriek
in reply to: Anonymous

When you suppress a component it creates a LOD (Level Of Detail), if you saved on Master then all those components would be visible again. Saving on the LOD will keep the supressed parts from showing up again.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 5
Mike.Wohletz
in reply to: Anonymous

Suppressing elements will create a LOD and if you wish to open the document with the API you also will need to get the last LOD that was saved. You can do this as shown below and this is also an example that I had gotten from this forum someplace in the past. You can also look at all the LOD's and have an options box to pick what you want with a little more work as well. 

 

  Dim strFullFileName As String
        strFullFileName = "F:\Arun\Master\Master_RF-VH-ZZ-0800-0500-0600.iam"


        Dim oFileManager As FileManager
        oFileManager = ThisApplication.FileManager

        Dim strLastActiveLOD As String
        strLastActiveLOD = oFileManager.GetLastActiveLevelOfDetailRepresentation(strFullFileName)


        Dim strFullDocumentName As String
        strFullDocumentName = oFileManager.GetFullDocumentName(strFullFileName, strLastActiveLOD)

        Dim oDocOpenOptions As NameValueMap
        oDocOpenOptions = ThisApplication.TransientObjects.CreateNameValueMap

        Dim oDoc As Document
        oDoc = ThisApplication.Documents.OpenWithOptions(strFullDocumentName, oDocOpenOptions, True)

 

Message 4 of 5
Anonymous
in reply to: jdkriek

okey..
Message 5 of 5
Anonymous
in reply to: Anonymous

Thanks....  Got the solution..This will help me a lot.. and change the LOD using code its working..

 

there some other code I  checked ,it is also working.here is the code

 

Dim oLOD As LevelOfDetailRepresentation
Dim oCompDef As AssemblyComponentDefinition
oCompDef = inventorApp.ActiveDocument.ComponentDefinition
oLOD = oCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item(5)
oLOD.Activate()

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

Post to forums  

Autodesk Design & Make Report